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

Class: Aws::EC2::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon Elastic Compute Cloud. To construct a client, you need to configure a :region and :credentials.

ec2 = Aws::EC2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::EC2::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::EC2::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#accept_reserved_instances_exchange_quote(options = {}) ⇒ Types::AcceptReservedInstancesExchangeQuoteResult

Accepts the Convertible Reserved Instance exchange quote described in the GetReservedInstancesExchangeQuote call.

Examples:

Request syntax with placeholder values


resp = client.accept_reserved_instances_exchange_quote({
  dry_run: false,
  reserved_instance_ids: ["ReservationId"], # required
  target_configurations: [
    {
      instance_count: 1,
      offering_id: "ReservedInstancesOfferingId", # required
    },
  ],
})

Response structure


resp.exchange_id #=> String

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.

  • :reserved_instance_ids (required, Array<String>)

    The IDs of the Convertible Reserved Instances to exchange for another Convertible Reserved Instance of the same or higher value.

  • :target_configurations (Array<Types::TargetConfigurationRequest>)

    The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

Returns:

See Also:

#accept_transit_gateway_peering_attachment(options = {}) ⇒ Types::AcceptTransitGatewayPeeringAttachmentResult

Accepts a transit gateway peering attachment request. The peering attachment must be in the pendingAcceptance state.

Examples:

Request syntax with placeholder values


resp = client.accept_transit_gateway_peering_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_peering_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.status.code #=> String
resp.transit_gateway_peering_attachment.status.message #=> String
resp.transit_gateway_peering_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_peering_attachment.creation_time #=> Time
resp.transit_gateway_peering_attachment.tags #=> Array
resp.transit_gateway_peering_attachment.tags[0].key #=> String
resp.transit_gateway_peering_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the transit gateway attachment.

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

See Also:

#accept_transit_gateway_vpc_attachment(options = {}) ⇒ Types::AcceptTransitGatewayVpcAttachmentResult

Accepts a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment to reject a VPC attachment request.

Examples:

Request syntax with placeholder values


resp = client.accept_transit_gateway_vpc_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachment.transit_gateway_id #=> String
resp.transit_gateway_vpc_attachment.vpc_id #=> String
resp.transit_gateway_vpc_attachment.vpc_owner_id #=> String
resp.transit_gateway_vpc_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachment.subnet_ids #=> Array
resp.transit_gateway_vpc_attachment.subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachment.creation_time #=> Time
resp.transit_gateway_vpc_attachment.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.tags #=> Array
resp.transit_gateway_vpc_attachment.tags[0].key #=> String
resp.transit_gateway_vpc_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#accept_vpc_endpoint_connections(options = {}) ⇒ Types::AcceptVpcEndpointConnectionsResult

Accepts one or more interface VPC endpoint connection requests to your VPC endpoint service.

Examples:

Request syntax with placeholder values


resp = client.accept_vpc_endpoint_connections({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
  vpc_endpoint_ids: ["VpcEndpointId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :service_id (required, String)

    The ID of the VPC endpoint service.

  • :vpc_endpoint_ids (required, Array<String>)

    The IDs of one or more interface VPC endpoints.

Returns:

See Also:

#accept_vpc_peering_connection(options = {}) ⇒ Types::AcceptVpcPeeringConnectionResult

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.

Examples:

Request syntax with placeholder values


resp = client.accept_vpc_peering_connection({
  dry_run: false,
  vpc_peering_connection_id: "VpcPeeringConnectionId",
})

Response structure


resp.vpc_peering_connection.accepter_vpc_info.cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connection.accepter_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connection.accepter_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.owner_id #=> String
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.vpc_id #=> String
resp.vpc_peering_connection.accepter_vpc_info.region #=> String
resp.vpc_peering_connection.expiration_time #=> Time
resp.vpc_peering_connection.requester_vpc_info.cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connection.requester_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connection.requester_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.owner_id #=> String
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connection.requester_vpc_info.vpc_id #=> String
resp.vpc_peering_connection.requester_vpc_info.region #=> String
resp.vpc_peering_connection.status.code #=> String, one of "initiating-request", "pending-acceptance", "active", "deleted", "rejected", "failed", "expired", "provisioning", "deleting"
resp.vpc_peering_connection.status.message #=> String
resp.vpc_peering_connection.tags #=> Array
resp.vpc_peering_connection.tags[0].key #=> String
resp.vpc_peering_connection.tags[0].value #=> String
resp.vpc_peering_connection.vpc_peering_connection_id #=> String

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_peering_connection_id (String)

    The ID of the VPC peering connection. You must specify this parameter in the request.

Returns:

See Also:

Advertises an IPv4 or IPv6 address range that is provisioned for use with your AWS resources through bring your own IP addresses (BYOIP).

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise it from AWS. To minimize down time, you can configure your AWS resources to use an address from a BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current location and start advertising it through AWS.

It can take a few minutes before traffic to the specified addresses starts routing to AWS because of BGP propagation delays.

To stop advertising the BYOIP CIDR, use WithdrawByoipCidr.

Examples:

Request syntax with placeholder values


resp = client.advertise_byoip_cidr({
  cidr: "String", # required
  dry_run: false,
})

Response structure


resp.byoip_cidr.cidr #=> String
resp.byoip_cidr.description #=> String
resp.byoip_cidr.status_message #=> String
resp.byoip_cidr.state #=> String, one of "advertised", "deprovisioned", "failed-deprovision", "failed-provision", "pending-deprovision", "pending-provision", "provisioned", "provisioned-not-publicly-advertisable"

Options Hash (options):

  • :cidr (required, String)

    The address range, in CIDR notation. This must be the exact range that you provisioned. You can\'t advertise only a portion of the provisioned range.

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

See Also:

#allocate_address(options = {}) ⇒ Types::AllocateAddressResult

Allocates an Elastic IP address to your AWS account. After you allocate the Elastic IP address you can associate it with an instance or network interface. After you release an Elastic IP address, it is released to the IP address pool and can be allocated to a different AWS account.

You can allocate an Elastic IP address from an address pool owned by AWS or from an address pool created from a public IPv4 address range that you have brought to AWS for use with your AWS resources using bring your own IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide.

[EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You cannot recover an Elastic IP address that you released after it is allocated to another AWS account. You cannot recover an Elastic IP address for EC2-Classic. To attempt to recover an Elastic IP address that you released, specify it in this operation.

An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5 Elastic IP addresses for EC2-VPC per Region.

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

You can allocate a carrier IP address which is a public IP address from a telecommunication carrier, to a network interface which resides in a subnet in a Wavelength Zone (for example an EC2 instance).

Examples:

Example: To allocate an Elastic IP address for EC2-VPC


# This example allocates an Elastic IP address to use with an instance in a VPC.

resp = client.allocate_address({
  domain: "vpc", 
})

# resp.to_h outputs the following:
{
  allocation_id: "eipalloc-64d5890a", 
  domain: "vpc", 
  public_ip: "203.0.113.0", 
}

Example: To allocate an Elastic IP address for EC2-Classic


# This example allocates an Elastic IP address to use with an instance in EC2-Classic.

resp = client.allocate_address({
})

# resp.to_h outputs the following:
{
  domain: "standard", 
  public_ip: "198.51.100.0", 
}

Request syntax with placeholder values


resp = client.allocate_address({
  domain: "vpc", # accepts vpc, standard
  address: "PublicIpAddress",
  public_ipv_4_pool: "Ipv4PoolEc2Id",
  network_border_group: "String",
  customer_owned_ipv_4_pool: "String",
  dry_run: false,
})

Response structure


resp.public_ip #=> String
resp.allocation_id #=> String
resp.public_ipv_4_pool #=> String
resp.network_border_group #=> String
resp.domain #=> String, one of "vpc", "standard"
resp.customer_owned_ip #=> String
resp.customer_owned_ipv_4_pool #=> String
resp.carrier_ip #=> String

Options Hash (options):

  • :domain (String)

    Indicates whether the Elastic IP address is for use with instances in a VPC or instances in EC2-Classic.

    Default: If the Region supports EC2-Classic, the default is standard. Otherwise, the default is vpc.

  • :address (String)

    [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.

  • :public_ipv_4_pool (String)

    The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. To specify a specific address from the address pool, use the Address parameter instead.

  • :network_border_group (String)

    A unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.

    Use DescribeAvailabilityZones to view the network border groups.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you will receive an InvalidParameterCombination error. For more information, see Error Codes.

  • :customer_owned_ipv_4_pool (String)

    The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 select an address from the address pool. Alternatively, specify a specific address from the address pool.

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

See Also:

#allocate_hosts(options = {}) ⇒ Types::AllocateHostsResult

Allocates a Dedicated Host to your account. At a minimum, specify the supported instance type or instance family, the Availability Zone in which to allocate the host, and the number of hosts to allocate.

Examples:

Request syntax with placeholder values


resp = client.allocate_hosts({
  auto_placement: "on", # accepts on, off
  availability_zone: "String", # required
  client_token: "String",
  instance_type: "String",
  instance_family: "String",
  quantity: 1, # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  host_recovery: "on", # accepts on, off
})

Response structure


resp.host_ids #=> Array
resp.host_ids[0] #=> String

Options Hash (options):

  • :auto_placement (String)

    Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding Instance Placement and Host Affinity in the Amazon EC2 User Guide for Linux Instances.

    Default: on

  • :availability_zone (required, String)

    The Availability Zone in which to allocate the Dedicated Host.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :instance_type (String)

    Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.

    If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

  • :instance_family (String)

    Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family.

    If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

  • :quantity (required, Integer)

    The number of Dedicated Hosts to allocate to your account with these parameters.

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

    The tags to apply to the Dedicated Host during creation.

  • :host_recovery (String)

    Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host Recovery in the Amazon Elastic Compute Cloud User Guide.

    Default: off

Returns:

See Also:

#apply_security_groups_to_client_vpn_target_network(options = {}) ⇒ Types::ApplySecurityGroupsToClientVpnTargetNetworkResult

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

Examples:

Request syntax with placeholder values


resp = client.apply_security_groups_to_client_vpn_target_network({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  vpc_id: "VpcId", # required
  security_group_ids: ["SecurityGroupId"], # required
  dry_run: false,
})

Response structure


resp.security_group_ids #=> Array
resp.security_group_ids[0] #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

  • :vpc_id (required, String)

    The ID of the VPC in which the associated target network is located.

  • :security_group_ids (required, Array<String>)

    The IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.

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

See Also:

#assign_ipv_6_addresses(options = {}) ⇒ Types::AssignIpv6AddressesResult

Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see IP Addresses Per Network Interface Per Instance Type in the Amazon Elastic Compute Cloud User Guide.

You must specify either the IPv6 addresses or the IPv6 address count in the request.

Examples:

Request syntax with placeholder values


resp = client.assign_ipv_6_addresses({
  ipv_6_address_count: 1,
  ipv_6_addresses: ["String"],
  network_interface_id: "NetworkInterfaceId", # required
})

Response structure


resp.assigned_ipv_6_addresses #=> Array
resp.assigned_ipv_6_addresses[0] #=> String
resp.network_interface_id #=> String

Options Hash (options):

  • :ipv_6_address_count (Integer)

    The number of IPv6 addresses to assign to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can\'t use this option if specifying specific IPv6 addresses.

  • :ipv_6_addresses (Array<String>)

    One or more specific IPv6 addresses to be assigned to the network interface. You can\'t use this option if you\'re specifying a number of IPv6 addresses.

  • :network_interface_id (required, String)

    The ID of the network interface.

Returns:

See Also:

#assign_private_ip_addresses(options = {}) ⇒ Types::AssignPrivateIpAddressesResult

Assigns one or more secondary private IP addresses to the specified network interface.

You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide. For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

When you move a secondary private IP address to another network interface, any Elastic IP address that is associated with the IP address is also moved.

Remapping an IP address is an asynchronous operation. When you move an IP address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s in the instance metadata to confirm that the remapping is complete.

You must specify either the IP addresses or the IP address count in the request.

Examples:

Example: To assign a specific secondary private IP address to an interface


# This example assigns the specified secondary private IP address to the specified network interface.

resp = client.assign_private_ip_addresses({
  network_interface_id: "eni-e5aa89a3", 
  private_ip_addresses: [
    "10.0.0.82", 
  ], 
})

Example: To assign secondary private IP addresses that Amazon EC2 selects to an interface


# This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with.

resp = client.assign_private_ip_addresses({
  network_interface_id: "eni-e5aa89a3", 
  secondary_private_ip_address_count: 2, 
})

Request syntax with placeholder values


resp = client.assign_private_ip_addresses({
  allow_reassignment: false,
  network_interface_id: "NetworkInterfaceId", # required
  private_ip_addresses: ["String"],
  secondary_private_ip_address_count: 1,
})

Response structure


resp.network_interface_id #=> String
resp.assigned_private_ip_addresses #=> Array
resp.assigned_private_ip_addresses[0].private_ip_address #=> String

Options Hash (options):

  • :allow_reassignment (Boolean)

    Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :private_ip_addresses (Array<String>)

    One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can\'t specify this parameter when also specifying a number of secondary IP addresses.

    If you don\'t specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

  • :secondary_private_ip_address_count (Integer)

    The number of secondary IP addresses to assign to the network interface. You can\'t specify this parameter when also specifying private IP addresses.

Returns:

See Also:

#associate_address(options = {}) ⇒ Types::AssociateAddressResult

Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface.

You cannot associate an Elastic IP address with an interface in a different network border group.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.

Examples:

Example: To associate an Elastic IP address in EC2-VPC


# This example associates the specified Elastic IP address with the specified instance in a VPC.

resp = client.associate_address({
  allocation_id: "eipalloc-64d5890a", 
  instance_id: "i-0b263919b6498b123", 
})

# resp.to_h outputs the following:
{
  association_id: "eipassoc-2bebb745", 
}

Example: To associate an Elastic IP address with a network interface


# This example associates the specified Elastic IP address with the specified network interface.

resp = client.associate_address({
  allocation_id: "eipalloc-64d5890a", 
  network_interface_id: "eni-1a2b3c4d", 
})

# resp.to_h outputs the following:
{
  association_id: "eipassoc-2bebb745", 
}

Example: To associate an Elastic IP address in EC2-Classic


# This example associates an Elastic IP address with an instance in EC2-Classic.

resp = client.associate_address({
  instance_id: "i-07ffe74c7330ebf53", 
  public_ip: "198.51.100.0", 
})

Request syntax with placeholder values


resp = client.associate_address({
  allocation_id: "AllocationId",
  instance_id: "InstanceId",
  public_ip: "String",
  allow_reassociation: false,
  dry_run: false,
  network_interface_id: "NetworkInterfaceId",
  private_ip_address: "String",
})

Response structure


resp.association_id #=> String

Options Hash (options):

  • :allocation_id (String)

    [EC2-VPC] The allocation ID. This is required for EC2-VPC.

  • :instance_id (String)

    The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.

  • :public_ip (String)

    The Elastic IP address to associate with the instance. This is required for EC2-Classic.

  • :allow_reassociation (Boolean)

    [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.

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

  • :network_interface_id (String)

    [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

    For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

  • :private_ip_address (String)

    [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.

Returns:

See Also:

#associate_client_vpn_target_network(options = {}) ⇒ Types::AssociateClientVpnTargetNetworkResult

Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.

If you specified a VPC when you created the Client VPN endpoint or if you have previous subnet associations, the specified subnet must be in the same VPC. To specify a subnet that's in a different VPC, you must first modify the Client VPN endpoint (ModifyClientVpnEndpoint) and change the VPC that's associated with it.

Examples:

Request syntax with placeholder values


resp = client.associate_client_vpn_target_network({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  subnet_id: "SubnetId", # required
  client_token: "String",
  dry_run: false,
})

Response structure


resp.association_id #=> String
resp.status.code #=> String, one of "associating", "associated", "association-failed", "disassociating", "disassociated"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

  • :subnet_id (required, String)

    The ID of the subnet to associate with the Client VPN endpoint.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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

See Also:

#associate_dhcp_options(options = {}) ⇒ Struct

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To associate a DHCP options set with a VPC


# This example associates the specified DHCP options set with the specified VPC.

resp = client.associate_dhcp_options({
  dhcp_options_id: "dopt-d9070ebb", 
  vpc_id: "vpc-a01106c2", 
})

Example: To associate the default DHCP options set with a VPC


# This example associates the default DHCP options set with the specified VPC.

resp = client.associate_dhcp_options({
  dhcp_options_id: "default", 
  vpc_id: "vpc-a01106c2", 
})

Request syntax with placeholder values


resp = client.associate_dhcp_options({
  dhcp_options_id: "DefaultingDhcpOptionsId", # required
  vpc_id: "VpcId", # required
  dry_run: false,
})

Options Hash (options):

  • :dhcp_options_id (required, String)

    The ID of the DHCP options set, or default to associate no DHCP options with the VPC.

  • :vpc_id (required, String)

    The ID of the VPC.

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

  • (Struct)

    Returns an empty response.

See Also:

#associate_enclave_certificate_iam_role(options = {}) ⇒ Types::AssociateEnclaveCertificateIamRoleResult

Associates an AWS Identity and Access Management (IAM) role with an AWS Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see AWS Certificate Manager for Nitro Enclaves in the AWS Nitro Enclaves User Guide.

When the IAM role is associated with the ACM certificate, places the certificate, certificate chain, and encrypted private key in an Amazon S3 bucket that only the associated IAM role can access. The private key of the certificate is encrypted with an AWS-managed KMS customer master (CMK) that has an attached attestation-based CMK policy.

To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the AWS KMS CMK, you must grant it permission to call kms:Decrypt on AWS KMS CMK returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the AWS Nitro Enclaves User Guide.

Examples:

Request syntax with placeholder values


resp = client.associate_enclave_certificate_iam_role({
  certificate_arn: "ResourceArn",
  role_arn: "ResourceArn",
  dry_run: false,
})

Response structure


resp.certificate_s3_bucket_name #=> String
resp.certificate_s3_object_key #=> String
resp.encryption_kms_key_id #=> String

Options Hash (options):

  • :certificate_arn (String)

    The ARN of the ACM certificate with which to associate the IAM role.

  • :role_arn (String)

    The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate.

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

See Also:

#associate_iam_instance_profile(options = {}) ⇒ Types::AssociateIamInstanceProfileResult

Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

Examples:

Example: To associate an IAM instance profile with an instance


# This example associates an IAM instance profile named admin-role with the specified instance.

resp = client.associate_iam_instance_profile({
  iam_instance_profile: {
    name: "admin-role", 
  }, 
  instance_id: "i-123456789abcde123", 
})

# resp.to_h outputs the following:
{
  iam_instance_profile_association: {
    association_id: "iip-assoc-0e7736511a163c209", 
    iam_instance_profile: {
      arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
      id: "AIPAJBLK7RKJKWDXVHIEC", 
    }, 
    instance_id: "i-123456789abcde123", 
    state: "associating", 
  }, 
}

Request syntax with placeholder values


resp = client.associate_iam_instance_profile({
  iam_instance_profile: { # required
    arn: "String",
    name: "String",
  },
  instance_id: "InstanceId", # required
})

Response structure


resp.iam_instance_profile_association.association_id #=> String
resp.iam_instance_profile_association.instance_id #=> String
resp.iam_instance_profile_association.iam_instance_profile.arn #=> String
resp.iam_instance_profile_association.iam_instance_profile.id #=> String
resp.iam_instance_profile_association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.iam_instance_profile_association.timestamp #=> Time

Options Hash (options):

Returns:

See Also:

#associate_route_table(options = {}) ⇒ Types::AssociateRouteTableResult

Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.

For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To associate a route table with a subnet


# This example associates the specified route table with the specified subnet.

resp = client.associate_route_table({
  route_table_id: "rtb-22574640", 
  subnet_id: "subnet-9d4a7b6", 
})

# resp.to_h outputs the following:
{
  association_id: "rtbassoc-781d0d1a", 
}

Request syntax with placeholder values


resp = client.associate_route_table({
  dry_run: false,
  route_table_id: "RouteTableId", # required
  subnet_id: "SubnetId",
  gateway_id: "RouteGatewayId",
})

Response structure


resp.association_id #=> String
resp.association_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failed"
resp.association_state.status_message #=> String

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.

  • :route_table_id (required, String)

    The ID of the route table.

  • :subnet_id (String)

    The ID of the subnet.

  • :gateway_id (String)

    The ID of the internet gateway or virtual private gateway.

Returns:

See Also:

#associate_subnet_cidr_block(options = {}) ⇒ Types::AssociateSubnetCidrBlockResult

Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.

Examples:

Request syntax with placeholder values


resp = client.associate_subnet_cidr_block({
  ipv_6_cidr_block: "String", # required
  subnet_id: "SubnetId", # required
})

Response structure


resp.ipv_6_cidr_block_association.association_id #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.status_message #=> String
resp.subnet_id #=> String

Options Hash (options):

  • :ipv_6_cidr_block (required, String)

    The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.

  • :subnet_id (required, String)

    The ID of your subnet.

Returns:

See Also:

#associate_transit_gateway_multicast_domain(options = {}) ⇒ Types::AssociateTransitGatewayMulticastDomainResult

Associates the specified subnets and transit gateway attachments with the specified transit gateway multicast domain.

The transit gateway attachment must be in the available state before you can add a resource. Use DescribeTransitGatewayAttachments to see the state of the attachment.

Examples:

Request syntax with placeholder values


resp = client.associate_transit_gateway_multicast_domain({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  subnet_ids: ["String"],
  dry_run: false,
})

Response structure


resp.associations.transit_gateway_multicast_domain_id #=> String
resp.associations.transit_gateway_attachment_id #=> String
resp.associations.resource_id #=> String
resp.associations.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.associations.subnets #=> Array
resp.associations.subnets[0].subnet_id #=> String
resp.associations.subnets[0].state #=> String, one of "associating", "associated", "disassociating", "disassociated"

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :transit_gateway_attachment_id (String)

    The ID of the transit gateway attachment to associate with the transit gateway multicast domain.

  • :subnet_ids (Array<String>)

    The IDs of the subnets to associate with the transit gateway multicast domain.

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

See Also:

#associate_transit_gateway_route_table(options = {}) ⇒ Types::AssociateTransitGatewayRouteTableResult

Associates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.

Examples:

Request syntax with placeholder values


resp = client.associate_transit_gateway_route_table({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.association.transit_gateway_route_table_id #=> String
resp.association.transit_gateway_attachment_id #=> String
resp.association.resource_id #=> String
resp.association.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#associate_vpc_cidr_block(options = {}) ⇒ Types::AssociateVpcCidrBlockResult

Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP). The IPv6 CIDR block size is fixed at /56.

You must specify one of the following in the request: an IPv4 CIDR block, an IPv6 pool, or an Amazon-provided IPv6 CIDR block.

For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and Subnet Sizing in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.associate_vpc_cidr_block({
  amazon_provided_ipv_6_cidr_block: false,
  cidr_block: "String",
  vpc_id: "VpcId", # required
  ipv_6_cidr_block_network_border_group: "String",
  ipv_6_pool: "Ipv6PoolEc2Id",
  ipv_6_cidr_block: "String",
})

Response structure


resp.ipv_6_cidr_block_association.association_id #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.status_message #=> String
resp.ipv_6_cidr_block_association.network_border_group #=> String
resp.ipv_6_cidr_block_association.ipv_6_pool #=> String
resp.cidr_block_association.association_id #=> String
resp.cidr_block_association.cidr_block #=> String
resp.cidr_block_association.cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.cidr_block_association.cidr_block_state.status_message #=> String
resp.vpc_id #=> String

Options Hash (options):

  • :amazon_provided_ipv_6_cidr_block (Boolean)

    Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

  • :cidr_block (String)

    An IPv4 CIDR block to associate with the VPC.

  • :vpc_id (required, String)

    The ID of the VPC.

  • :ipv_6_cidr_block_network_border_group (String)

    The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the CIDR block to this location.

    You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

    You can have one IPv6 CIDR block association per network border group.

  • :ipv_6_pool (String)

    The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

  • :ipv_6_cidr_block (String)

    An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

    To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

Returns:

See Also:

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

Examples:

Request syntax with placeholder values


resp = client.attach_classic_link_vpc({
  dry_run: false,
  groups: ["String"], # required
  instance_id: "InstanceId", # required
  vpc_id: "VpcId", # required
})

Response structure


resp.return #=> true/false

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.

  • :groups (required, Array<String>)

    The ID of one or more of the VPC\'s security groups. You cannot specify security groups from a different VPC.

  • :instance_id (required, String)

    The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

  • :vpc_id (required, String)

    The ID of a ClassicLink-enabled VPC.

Returns:

See Also:

#attach_internet_gateway(options = {}) ⇒ Struct

Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC. For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To attach an Internet gateway to a VPC


# This example attaches the specified Internet gateway to the specified VPC.

resp = client.attach_internet_gateway({
  internet_gateway_id: "igw-c0a643a9", 
  vpc_id: "vpc-a01106c2", 
})

Request syntax with placeholder values


resp = client.attach_internet_gateway({
  dry_run: false,
  internet_gateway_id: "InternetGatewayId", # required
  vpc_id: "VpcId", # required
})

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.

  • :internet_gateway_id (required, String)

    The ID of the internet gateway.

  • :vpc_id (required, String)

    The ID of the VPC.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#attach_network_interface(options = {}) ⇒ Types::AttachNetworkInterfaceResult

Attaches a network interface to an instance.

Examples:

Example: To attach a network interface to an instance


# This example attaches the specified network interface to the specified instance.

resp = client.attach_network_interface({
  device_index: 1, 
  instance_id: "i-1234567890abcdef0", 
  network_interface_id: "eni-e5aa89a3", 
})

# resp.to_h outputs the following:
{
  attachment_id: "eni-attach-66c4350a", 
}

Request syntax with placeholder values


resp = client.attach_network_interface({
  device_index: 1, # required
  dry_run: false,
  instance_id: "InstanceId", # required
  network_interface_id: "NetworkInterfaceId", # required
  network_card_index: 1,
})

Response structure


resp.attachment_id #=> String
resp.network_card_index #=> Integer

Options Hash (options):

  • :device_index (required, Integer)

    The index of the device for the network interface attachment.

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

  • :instance_id (required, String)

    The ID of the instance.

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :network_card_index (Integer)

    The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

Returns:

See Also:

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

Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

After you attach an EBS volume, you must make it available. For more information, see Making an EBS volume available for use.

If a volume has an AWS Marketplace product code:

  • The volume can be attached only to a stopped instance.

  • AWS Marketplace product codes are copied from the volume to the instance.

  • You must be subscribed to the product.

  • The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.

For more information, see Attaching Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To attach a volume to an instance


# This example attaches a volume (``vol-1234567890abcdef0``) to an instance (``i-01474ef662b89480``) as ``/dev/sdf``.

resp = client.attach_volume({
  device: "/dev/sdf", 
  instance_id: "i-01474ef662b89480", 
  volume_id: "vol-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  attach_time: Time.parse("2016-08-29T18:52:32.724Z"), 
  device: "/dev/sdf", 
  instance_id: "i-01474ef662b89480", 
  state: "attaching", 
  volume_id: "vol-1234567890abcdef0", 
}

Request syntax with placeholder values


resp = client.attach_volume({
  device: "String", # required
  instance_id: "InstanceId", # required
  volume_id: "VolumeId", # required
  dry_run: false,
})

Response structure


resp.attach_time #=> Time
resp.device #=> String
resp.instance_id #=> String
resp.state #=> String, one of "attaching", "attached", "detaching", "detached", "busy"
resp.volume_id #=> String
resp.delete_on_termination #=> true/false

Options Hash (options):

  • :device (required, String)

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

  • :instance_id (required, String)

    The ID of the instance.

  • :volume_id (required, String)

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

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

See Also:

#attach_vpn_gateway(options = {}) ⇒ Types::AttachVpnGatewayResult

Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.attach_vpn_gateway({
  vpc_id: "VpcId", # required
  vpn_gateway_id: "VpnGatewayId", # required
  dry_run: false,
})

Response structure


resp.vpc_attachment.state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.vpc_attachment.vpc_id #=> String

Options Hash (options):

  • :vpc_id (required, String)

    The ID of the VPC.

  • :vpn_gateway_id (required, String)

    The ID of the virtual private gateway.

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

See Also:

#authorize_client_vpn_ingress(options = {}) ⇒ Types::AuthorizeClientVpnIngressResult

Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in AWS or on-premises networks.

Examples:

Request syntax with placeholder values


resp = client.authorize_client_vpn_ingress({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  target_network_cidr: "String", # required
  access_group_id: "String",
  authorize_all_groups: false,
  description: "String",
  client_token: "String",
  dry_run: false,
})

Response structure


resp.status.code #=> String, one of "authorizing", "active", "failed", "revoking"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

  • :target_network_cidr (required, String)

    The IPv4 address range, in CIDR notation, of the network for which access is being authorized.

  • :access_group_id (String)

    The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group. Required if AuthorizeAllGroups is false or not specified.

  • :authorize_all_groups (Boolean)

    Indicates whether to grant access to all clients. Specify true to grant all clients who successfully establish a VPN connection access to the network. Must be set to true if AccessGroupId is not specified.

  • :description (String)

    A brief description of the authorization rule.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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

See Also:

#authorize_security_group_egress(options = {}) ⇒ Struct

[VPC only] Adds the specified egress rules to a security group for use with a VPC.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address ranges, or to the instances associated with the specified destination security groups.

You specify a protocol for each rule (for example, TCP). For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

For more information about VPC security group limits, see Amazon VPC Limits.

Examples:

Example: To add a rule that allows outbound traffic to a specific address range


# This example adds a rule that grants access to the specified address ranges on TCP port 80.

resp = client.authorize_security_group_egress({
  group_id: "sg-1a2b3c4d", 
  ip_permissions: [
    {
      from_port: 80, 
      ip_protocol: "tcp", 
      ip_ranges: [
        {
          cidr_ip: "10.0.0.0/16", 
        }, 
      ], 
      to_port: 80, 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To add a rule that allows outbound traffic to a specific security group


# This example adds a rule that grants access to the specified security group on TCP port 80.

resp = client.authorize_security_group_egress({
  group_id: "sg-1a2b3c4d", 
  ip_permissions: [
    {
      from_port: 80, 
      ip_protocol: "tcp", 
      to_port: 80, 
      user_id_group_pairs: [
        {
          group_id: "sg-4b51a32f", 
        }, 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.authorize_security_group_egress({
  dry_run: false,
  group_id: "SecurityGroupId", # required
  ip_permissions: [
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
  cidr_ip: "String",
  from_port: 1,
  ip_protocol: "String",
  to_port: 1,
  source_security_group_name: "String",
  source_security_group_owner_id: "String",
})

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.

  • :group_id (required, String)

    The ID of the security group.

  • :ip_permissions (Array<Types::IpPermission>)

    The sets of IP permissions. You can\'t specify a destination security group and a CIDR IP address range in the same set of permissions.

  • :cidr_ip (String)

    Not supported. Use a set of IP permissions to specify the CIDR.

  • :from_port (Integer)

    Not supported. Use a set of IP permissions to specify the port.

  • :ip_protocol (String)

    Not supported. Use a set of IP permissions to specify the protocol name or number.

  • :to_port (Integer)

    Not supported. Use a set of IP permissions to specify the port.

  • :source_security_group_name (String)

    Not supported. Use a set of IP permissions to specify a destination security group.

  • :source_security_group_owner_id (String)

    Not supported. Use a set of IP permissions to specify a destination security group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#authorize_security_group_ingress(options = {}) ⇒ Struct

Adds the specified ingress rules to a security group.

An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6 CIDR address ranges, or from the instances associated with the specified destination security groups.

You specify a protocol for each rule (for example, TCP). For TCP and UDP, you must also specify the destination port or port range. For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all codes.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

For more information about VPC security group limits, see Amazon VPC Limits.

Examples:

Example: To add a rule that allows inbound SSH traffic from an IPv4 address range


# This example enables inbound traffic on TCP port 22 (SSH). The rule includes a description to help you identify it later.

resp = client.authorize_security_group_ingress({
  group_id: "sg-903004f8", 
  ip_permissions: [
    {
      from_port: 22, 
      ip_protocol: "tcp", 
      ip_ranges: [
        {
          cidr_ip: "203.0.113.0/24", 
          description: "SSH access from the LA office", 
        }, 
      ], 
      to_port: 22, 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To add a rule that allows inbound HTTP traffic from another security group


# This example enables inbound traffic on TCP port 80 from the specified security group. The group must be in the same VPC or a peer VPC. Incoming traffic is allowed based on the private IP addresses of instances that are associated with the specified security group.

resp = client.authorize_security_group_ingress({
  group_id: "sg-111aaa22", 
  ip_permissions: [
    {
      from_port: 80, 
      ip_protocol: "tcp", 
      to_port: 80, 
      user_id_group_pairs: [
        {
          description: "HTTP access from other instances", 
          group_id: "sg-1a2b3c4d", 
        }, 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To add a rule that allows inbound RDP traffic from an IPv6 address range


# This example adds an inbound rule that allows RDP traffic from the specified IPv6 address range. The rule includes a description to help you identify it later.

resp = client.authorize_security_group_ingress({
  group_id: "sg-123abc12 ", 
  ip_permissions: [
    {
      from_port: 3389, 
      ip_protocol: "tcp", 
      ipv_6_ranges: [
        {
          cidr_ipv_6: "2001:db8:1234:1a00::/64", 
          description: "RDP access from the NY office", 
        }, 
      ], 
      to_port: 3389, 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.authorize_security_group_ingress({
  cidr_ip: "String",
  from_port: 1,
  group_id: "SecurityGroupId",
  group_name: "SecurityGroupName",
  ip_permissions: [
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
  ip_protocol: "String",
  source_security_group_name: "String",
  source_security_group_owner_id: "String",
  to_port: 1,
  dry_run: false,
})

Options Hash (options):

  • :cidr_ip (String)

    The IPv4 address range, in CIDR format. You can\'t specify this parameter when specifying a source security group. To specify an IPv6 address range, use a set of IP permissions.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • :from_port (Integer)

    The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all types. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • :group_id (String)

    The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

  • :group_name (String)

    [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

  • :ip_permissions (Array<Types::IpPermission>)

    The sets of IP permissions.

  • :ip_protocol (String)

    The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). To specify icmpv6, use a set of IP permissions.

    [VPC only] Use -1 to specify all protocols. If you specify -1 or a protocol other than tcp, udp, or icmp, traffic on all ports is allowed, regardless of any ports you specify.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • :source_security_group_name (String)

    [EC2-Classic, default VPC] The name of the source security group. You can\'t specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.

  • :source_security_group_owner_id (String)

    [nondefault VPC] The AWS account ID for the source security group, if the source security group is in a different account. You can\'t specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

  • :to_port (Integer)

    The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all codes. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

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

  • (Struct)

    Returns an empty response.

See Also:

#bundle_instance(options = {}) ⇒ Types::BundleInstanceResult

Bundles an Amazon instance store-backed Windows instance.

During bundling, only the root device volume (C:) is bundled. Data on other instance store volumes is not preserved.

This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.

Examples:

Request syntax with placeholder values


resp = client.bundle_instance({
  instance_id: "InstanceId", # required
  storage: { # required
    s3: {
      aws_access_key_id: "String",
      bucket: "String",
      prefix: "String",
      upload_policy: "data",
      upload_policy_signature: "String",
    },
  },
  dry_run: false,
})

Response structure


resp.bundle_task.bundle_id #=> String
resp.bundle_task.bundle_task_error.code #=> String
resp.bundle_task.bundle_task_error.message #=> String
resp.bundle_task.instance_id #=> String
resp.bundle_task.progress #=> String
resp.bundle_task.start_time #=> Time
resp.bundle_task.state #=> String, one of "pending", "waiting-for-shutdown", "bundling", "storing", "cancelling", "complete", "failed"
resp.bundle_task.storage.s3.aws_access_key_id #=> String
resp.bundle_task.storage.s3.bucket #=> String
resp.bundle_task.storage.s3.prefix #=> String
resp.bundle_task.storage.s3.upload_policy #=> IO
resp.bundle_task.storage.s3.upload_policy_signature #=> String
resp.bundle_task.update_time #=> Time

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance to bundle.

    Type: String

    Default: None

    Required: Yes

  • :storage (required, Types::Storage)

    The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

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

See Also:

#cancel_bundle_task(options = {}) ⇒ Types::CancelBundleTaskResult

Cancels a bundling operation for an instance store-backed Windows instance.

Examples:

Request syntax with placeholder values


resp = client.cancel_bundle_task({
  bundle_id: "BundleId", # required
  dry_run: false,
})

Response structure


resp.bundle_task.bundle_id #=> String
resp.bundle_task.bundle_task_error.code #=> String
resp.bundle_task.bundle_task_error.message #=> String
resp.bundle_task.instance_id #=> String
resp.bundle_task.progress #=> String
resp.bundle_task.start_time #=> Time
resp.bundle_task.state #=> String, one of "pending", "waiting-for-shutdown", "bundling", "storing", "cancelling", "complete", "failed"
resp.bundle_task.storage.s3.aws_access_key_id #=> String
resp.bundle_task.storage.s3.bucket #=> String
resp.bundle_task.storage.s3.prefix #=> String
resp.bundle_task.storage.s3.upload_policy #=> IO
resp.bundle_task.storage.s3.upload_policy_signature #=> String
resp.bundle_task.update_time #=> Time

Options Hash (options):

  • :bundle_id (required, String)

    The ID of the bundle task.

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

See Also:

#cancel_capacity_reservation(options = {}) ⇒ Types::CancelCapacityReservationResult

Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to cancelled.

Instances running in the reserved capacity continue running until you stop them. Stopped instances that target the Capacity Reservation can no longer launch. Modify these instances to either target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation that has matching attributes and sufficient capacity.

Examples:

Request syntax with placeholder values


resp = client.cancel_capacity_reservation({
  capacity_reservation_id: "CapacityReservationId", # required
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :capacity_reservation_id (required, String)

    The ID of the Capacity Reservation to be cancelled.

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

See Also:

#cancel_conversion_task(options = {}) ⇒ Struct

Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.

For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI.

Examples:

Request syntax with placeholder values


resp = client.cancel_conversion_task({
  conversion_task_id: "ConversionTaskId", # required
  dry_run: false,
  reason_message: "String",
})

Options Hash (options):

  • :conversion_task_id (required, String)

    The ID of the conversion task.

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

  • :reason_message (String)

    The reason for canceling the conversion task.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#cancel_export_task(options = {}) ⇒ Struct

Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.

Examples:

Request syntax with placeholder values


resp = client.cancel_export_task({
  export_task_id: "ExportVmTaskId", # required
})

Options Hash (options):

  • :export_task_id (required, String)

    The ID of the export task. This is the ID returned by CreateInstanceExportTask.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#cancel_import_task(options = {}) ⇒ Types::CancelImportTaskResult

Cancels an in-process import virtual machine or import snapshot task.

Examples:

Request syntax with placeholder values


resp = client.cancel_import_task({
  cancel_reason: "String",
  dry_run: false,
  import_task_id: "ImportTaskId",
})

Response structure


resp.import_task_id #=> String
resp.previous_state #=> String
resp.state #=> String

Options Hash (options):

  • :cancel_reason (String)

    The reason for canceling the task.

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

  • :import_task_id (String)

    The ID of the import image or import snapshot task to be canceled.

Returns:

See Also:

#cancel_reserved_instances_listing(options = {}) ⇒ Types::CancelReservedInstancesListingResult

Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.cancel_reserved_instances_listing({
  reserved_instances_listing_id: "ReservedInstancesListingId", # required
})

Response structure


resp.reserved_instances_listings #=> Array
resp.reserved_instances_listings[0].client_token #=> String
resp.reserved_instances_listings[0].create_date #=> Time
resp.reserved_instances_listings[0].instance_counts #=> Array
resp.reserved_instances_listings[0].instance_counts[0].instance_count #=> Integer
resp.reserved_instances_listings[0].instance_counts[0].state #=> String, one of "available", "sold", "cancelled", "pending"
resp.reserved_instances_listings[0].price_schedules #=> Array
resp.reserved_instances_listings[0].price_schedules[0].active #=> true/false
resp.reserved_instances_listings[0].price_schedules[0].currency_code #=> String, one of "USD"
resp.reserved_instances_listings[0].price_schedules[0].price #=> Float
resp.reserved_instances_listings[0].price_schedules[0].term #=> Integer
resp.reserved_instances_listings[0].reserved_instances_id #=> String
resp.reserved_instances_listings[0].reserved_instances_listing_id #=> String
resp.reserved_instances_listings[0].status #=> String, one of "active", "pending", "cancelled", "closed"
resp.reserved_instances_listings[0].status_message #=> String
resp.reserved_instances_listings[0].tags #=> Array
resp.reserved_instances_listings[0].tags[0].key #=> String
resp.reserved_instances_listings[0].tags[0].value #=> String
resp.reserved_instances_listings[0].update_date #=> Time

Options Hash (options):

  • :reserved_instances_listing_id (required, String)

    The ID of the Reserved Instance listing.

Returns:

See Also:

#cancel_spot_fleet_requests(options = {}) ⇒ Types::CancelSpotFleetRequestsResponse

Cancels the specified Spot Fleet requests.

After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances. You must specify whether the Spot Fleet should also terminate its Spot Instances. If you terminate the instances, the Spot Fleet request enters the cancelled_terminating state. Otherwise, the Spot Fleet request enters the cancelled_running state and the instances continue to run until they are interrupted or you terminate them manually.

Examples:

Example: To cancel a Spot fleet request


# This example cancels the specified Spot fleet request and terminates its associated Spot Instances.

resp = client.cancel_spot_fleet_requests({
  spot_fleet_request_ids: [
    "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  ], 
  terminate_instances: true, 
})

# resp.to_h outputs the following:
{
  successful_fleet_requests: [
    {
      current_spot_fleet_request_state: "cancelled_running", 
      previous_spot_fleet_request_state: "active", 
      spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
    }, 
  ], 
}

Example: To cancel a Spot fleet request without terminating its Spot Instances


# This example cancels the specified Spot fleet request without terminating its associated Spot Instances.

resp = client.cancel_spot_fleet_requests({
  spot_fleet_request_ids: [
    "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  ], 
  terminate_instances: false, 
})

# resp.to_h outputs the following:
{
  successful_fleet_requests: [
    {
      current_spot_fleet_request_state: "cancelled_terminating", 
      previous_spot_fleet_request_state: "active", 
      spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.cancel_spot_fleet_requests({
  dry_run: false,
  spot_fleet_request_ids: ["SpotFleetRequestId"], # required
  terminate_instances: false, # required
})

Response structure


resp.successful_fleet_requests #=> Array
resp.successful_fleet_requests[0].current_spot_fleet_request_state #=> String, one of "submitted", "active", "cancelled", "failed", "cancelled_running", "cancelled_terminating", "modifying"
resp.successful_fleet_requests[0].previous_spot_fleet_request_state #=> String, one of "submitted", "active", "cancelled", "failed", "cancelled_running", "cancelled_terminating", "modifying"
resp.successful_fleet_requests[0].spot_fleet_request_id #=> String
resp.unsuccessful_fleet_requests #=> Array
resp.unsuccessful_fleet_requests[0].error.code #=> String, one of "fleetRequestIdDoesNotExist", "fleetRequestIdMalformed", "fleetRequestNotInCancellableState", "unexpectedError"
resp.unsuccessful_fleet_requests[0].error.message #=> String
resp.unsuccessful_fleet_requests[0].spot_fleet_request_id #=> String

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.

  • :spot_fleet_request_ids (required, Array<String>)

    The IDs of the Spot Fleet requests.

  • :terminate_instances (required, Boolean)

    Indicates whether to terminate instances for a Spot Fleet request if it is canceled successfully.

Returns:

See Also:

#cancel_spot_instance_requests(options = {}) ⇒ Types::CancelSpotInstanceRequestsResult

Cancels one or more Spot Instance requests.

Canceling a Spot Instance request does not terminate running Spot Instances associated with the request.

Examples:

Example: To cancel Spot Instance requests


# This example cancels a Spot Instance request.

resp = client.cancel_spot_instance_requests({
  spot_instance_request_ids: [
    "sir-08b93456", 
  ], 
})

# resp.to_h outputs the following:
{
  cancelled_spot_instance_requests: [
    {
      spot_instance_request_id: "sir-08b93456", 
      state: "cancelled", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.cancel_spot_instance_requests({
  dry_run: false,
  spot_instance_request_ids: ["SpotInstanceRequestId"], # required
})

Response structure


resp.cancelled_spot_instance_requests #=> Array
resp.cancelled_spot_instance_requests[0].spot_instance_request_id #=> String
resp.cancelled_spot_instance_requests[0].state #=> String, one of "active", "open", "closed", "cancelled", "completed"

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.

  • :spot_instance_request_ids (required, Array<String>)

    One or more Spot Instance request IDs.

Returns:

See Also:

#confirm_product_instance(options = {}) ⇒ Types::ConfirmProductInstanceResult

Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner must verify whether another user's instance is eligible for support.

Examples:

Example: To confirm the product instance


# This example determines whether the specified product code is associated with the specified instance.

resp = client.confirm_product_instance({
  instance_id: "i-1234567890abcdef0", 
  product_code: "774F4FF8", 
})

# resp.to_h outputs the following:
{
  owner_id: "123456789012", 
}

Request syntax with placeholder values


resp = client.confirm_product_instance({
  instance_id: "InstanceId", # required
  product_code: "String", # required
  dry_run: false,
})

Response structure


resp.owner_id #=> String
resp.return #=> true/false

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance.

  • :product_code (required, String)

    The product code. This must be a product code that you own.

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

See Also:

#copy_fpga_image(options = {}) ⇒ Types::CopyFpgaImageResult

Copies the specified Amazon FPGA Image (AFI) to the current Region.

Examples:

Request syntax with placeholder values


resp = client.copy_fpga_image({
  dry_run: false,
  source_fpga_image_id: "String", # required
  description: "String",
  name: "String",
  source_region: "String", # required
  client_token: "String",
})

Response structure


resp.fpga_image_id #=> String

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.

  • :source_fpga_image_id (required, String)

    The ID of the source AFI.

  • :description (String)

    The description for the new AFI.

  • :name (String)

    The name for the new AFI. The default is the name of the source AFI.

  • :source_region (required, String)

    The Region that contains the source AFI.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

Returns:

See Also:

#copy_image(options = {}) ⇒ Types::CopyImageResult

Initiates the copy of an AMI from the specified source Region to the current Region. You specify the destination Region by using its endpoint when making the request.

Copies of encrypted backing snapshots for the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted, unless you set Encrypted during the copy operation. You cannot create an unencrypted copy of an encrypted backing snapshot.

For more information about the prerequisites and limits when copying an AMI, see Copying an AMI in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To copy an AMI to another region


# This example copies the specified AMI from the us-east-1 region to the current region.

resp = client.copy_image({
  description: "", 
  name: "My server", 
  source_image_id: "ami-5731123e", 
  source_region: "us-east-1", 
})

# resp.to_h outputs the following:
{
  image_id: "ami-438bea42", 
}

Request syntax with placeholder values


resp = client.copy_image({
  client_token: "String",
  description: "String",
  encrypted: false,
  kms_key_id: "KmsKeyId",
  name: "String", # required
  source_image_id: "String", # required
  source_region: "String", # required
  dry_run: false,
})

Response structure


resp.image_id #=> String

Options Hash (options):

  • :client_token (String)

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

  • :description (String)

    A description for the new AMI in the destination Region.

  • :encrypted (Boolean)

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

  • :kms_key_id (String)

    The identifier of the symmetric AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating encrypted volumes. If this parameter is not specified, your AWS managed CMK for EBS is used. If you specify a CMK, you must also set the encrypted state to true.

    You can specify a CMK using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

    • Key alias. For example, alias/ExampleAlias.

    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    AWS authenticates the CMK asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.

    The specified CMK must exist in the destination Region.

    Amazon EBS does not support asymmetric CMKs.

  • :name (required, String)

    The name of the new AMI in the destination Region.

  • :source_image_id (required, String)

    The ID of the AMI to copy.

  • :source_region (required, String)

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

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

See Also:

#copy_snapshot(options = {}) ⇒ Types::CopySnapshotResult

Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same Region or from one Region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).

Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless you enable encryption for the snapshot copy operation. By default, encrypted snapshot copies use the default AWS Key Management Service (AWS KMS) customer master key (CMK); however, you can specify a different CMK.

To copy an encrypted snapshot that has been shared from another account, you must have permissions for the CMK used to encrypt the snapshot.

Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any purpose.

For more information, see Copying an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide.

Examples:

Copy snapshot example


source_snapshot_id = 'snapshot-id'
source_region = 'us-east-1'
target_region = 'us-west-2'

# You must configure your EC2 client for the destination region to copy
ec2 = Aws::EC2::Client(region: target_region)

resp = ec2.copy_snapshot({
    source_region: source_region,
    source_snapshot_id: source_snapshot_id,
})

snapshot_id = resp.snapshot_id

ec2.wait_until(:snapshot_completed, snapshot_ids: [snapshot_id])

Copy an encrypted snapshot


# same as above, expect you must pass `encrypted: true`
resp = ec2.copy_snapshot({
    source_region: source_region,
    source_snapshot_id: source_snapshot_id,
    encrypted: true, # required for encrypted snapshots
})

Request syntax with placeholder values


resp = client.copy_snapshot({
  description: "String",
  encrypted: false,
  kms_key_id: "KmsKeyId",
  source_region: "String", # required
  source_snapshot_id: "String", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.snapshot_id #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :description (String)

    A description for the EBS snapshot.

  • :encrypted (Boolean)

    To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

  • :kms_key_id (String)

    The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

    You can specify the CMK using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

    • Key alias. For example, alias/ExampleAlias.

    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • :source_region (required, String)

    The ID of the Region that contains the snapshot to be copied.

  • :source_snapshot_id (required, String)

    The ID of the EBS snapshot to copy.

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

    The tags to apply to the new snapshot.

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

See Also:

#create_capacity_reservation(options = {}) ⇒ Types::CreateCapacityReservationResult

Creates a new Capacity Reservation with the specified attributes.

Capacity Reservations enable you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. This gives you the flexibility to selectively add capacity reservations and still get the Regional RI discounts for that usage. By creating Capacity Reservations, you ensure that you always have access to Amazon EC2 capacity when you need it, for as long as you need it. For more information, see Capacity Reservations in the Amazon Elastic Compute Cloud User Guide.

Your request to create a Capacity Reservation could fail if Amazon EC2 does not have sufficient capacity to fulfill the request. If your request fails due to Amazon EC2 capacity constraints, either try again at a later time, try in a different Availability Zone, or request a smaller capacity reservation. If your application is flexible across instance types and sizes, try to create a Capacity Reservation with different instance attributes.

Your request could also fail if the requested quantity exceeds your On-Demand Instance limit for the selected instance type. If your request fails due to limit constraints, increase your On-Demand Instance limit for the required instance type and try again. For more information about increasing your instance limits, see Amazon EC2 Service Limits in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_capacity_reservation({
  client_token: "String",
  instance_type: "String", # required
  instance_platform: "Linux/UNIX", # required, accepts Linux/UNIX, Red Hat Enterprise Linux, SUSE Linux, Windows, Windows with SQL Server, Windows with SQL Server Enterprise, Windows with SQL Server Standard, Windows with SQL Server Web, Linux with SQL Server Standard, Linux with SQL Server Web, Linux with SQL Server Enterprise
  availability_zone: "String",
  availability_zone_id: "String",
  tenancy: "default", # accepts default, dedicated
  instance_count: 1, # required
  ebs_optimized: false,
  ephemeral_storage: false,
  end_date: Time.now,
  end_date_type: "unlimited", # accepts unlimited, limited
  instance_match_criteria: "open", # accepts open, targeted
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.capacity_reservation.capacity_reservation_id #=> String
resp.capacity_reservation.owner_id #=> String
resp.capacity_reservation.capacity_reservation_arn #=> String
resp.capacity_reservation.availability_zone_id #=> String
resp.capacity_reservation.instance_type #=> String
resp.capacity_reservation.instance_platform #=> String, one of "Linux/UNIX", "Red Hat Enterprise Linux", "SUSE Linux", "Windows", "Windows with SQL Server", "Windows with SQL Server Enterprise", "Windows with SQL Server Standard", "Windows with SQL Server Web", "Linux with SQL Server Standard", "Linux with SQL Server Web", "Linux with SQL Server Enterprise"
resp.capacity_reservation.availability_zone #=> String
resp.capacity_reservation.tenancy #=> String, one of "default", "dedicated"
resp.capacity_reservation.total_instance_count #=> Integer
resp.capacity_reservation.available_instance_count #=> Integer
resp.capacity_reservation.ebs_optimized #=> true/false
resp.capacity_reservation.ephemeral_storage #=> true/false
resp.capacity_reservation.state #=> String, one of "active", "expired", "cancelled", "pending", "failed"
resp.capacity_reservation.end_date #=> Time
resp.capacity_reservation.end_date_type #=> String, one of "unlimited", "limited"
resp.capacity_reservation.instance_match_criteria #=> String, one of "open", "targeted"
resp.capacity_reservation.create_date #=> Time
resp.capacity_reservation.tags #=> Array
resp.capacity_reservation.tags[0].key #=> String
resp.capacity_reservation.tags[0].value #=> String

Options Hash (options):

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :instance_type (required, String)

    The instance type for which to reserve capacity. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

  • :instance_platform (required, String)

    The type of operating system for which to reserve capacity.

  • :availability_zone (String)

    The Availability Zone in which to create the Capacity Reservation.

  • :availability_zone_id (String)

    The ID of the Availability Zone in which to create the Capacity Reservation.

  • :tenancy (String)

    Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

    • default - The Capacity Reservation is created on hardware that is shared with other AWS accounts.

    • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account.

  • :instance_count (required, Integer)

    The number of instances for which to reserve capacity.

  • :ebs_optimized (Boolean)

    Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

  • :ephemeral_storage (Boolean)

    Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

  • :end_date (Time)

    The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation\'s state changes to expired when it reaches its end date and time.

    You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

    If the EndDateType is limited, the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

  • :end_date_type (String)

    Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

    • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate if the EndDateType is unlimited.

    • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited.

  • :instance_match_criteria (String)

    Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

    • open - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.

    • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

    Default: open

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

    The tags to apply to the Capacity Reservation during launch.

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

See Also:

#create_carrier_gateway(options = {}) ⇒ Types::CreateCarrierGatewayResult

Creates a carrier gateway. For more information about carrier gateways, see Carrier gateways in the AWS Wavelength Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.create_carrier_gateway({
  vpc_id: "VpcId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
  client_token: "String",
})

Response structure


resp.carrier_gateway.carrier_gateway_id #=> String
resp.carrier_gateway.vpc_id #=> String
resp.carrier_gateway.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.carrier_gateway.owner_id #=> String
resp.carrier_gateway.tags #=> Array
resp.carrier_gateway.tags[0].key #=> String
resp.carrier_gateway.tags[0].value #=> String

Options Hash (options):

  • :vpc_id (required, String)

    The ID of the VPC to associate with the carrier gateway.

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

    The tags to associate with the carrier gateway.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_client_vpn_endpoint(options = {}) ⇒ Types::CreateClientVpnEndpointResult

Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.

Examples:

Request syntax with placeholder values


resp = client.create_client_vpn_endpoint({
  client_cidr_block: "String", # required
  server_certificate_arn: "String", # required
  authentication_options: [ # required
    {
      type: "certificate-authentication", # accepts certificate-authentication, directory-service-authentication, federated-authentication
      active_directory: {
        directory_id: "String",
      },
      mutual_authentication: {
        client_root_certificate_chain_arn: "String",
      },
      federated_authentication: {
        saml_provider_arn: "String",
        self_service_saml_provider_arn: "String",
      },
    },
  ],
  connection_log_options: { # required
    enabled: false,
    cloudwatch_log_group: "String",
    cloudwatch_log_stream: "String",
  },
  dns_servers: ["String"],
  transport_protocol: "tcp", # accepts tcp, udp
  vpn_port: 1,
  description: "String",
  split_tunnel: false,
  dry_run: false,
  client_token: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  security_group_ids: ["SecurityGroupId"],
  vpc_id: "VpcId",
  self_service_portal: "enabled", # accepts enabled, disabled
  client_connect_options: {
    enabled: false,
    lambda_function_arn: "String",
  },
})

Response structure


resp.client_vpn_endpoint_id #=> String
resp.status.code #=> String, one of "pending-associate", "available", "deleting", "deleted"
resp.status.message #=> String
resp.dns_name #=> String

Options Hash (options):

  • :client_cidr_block (required, String)

    The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.

  • :server_certificate_arn (required, String)

    The ARN of the server certificate. For more information, see the AWS Certificate Manager User Guide.

  • :authentication_options (required, Array<Types::ClientVpnAuthenticationRequest>)

    Information about the authentication method to be used to authenticate clients.

  • :connection_log_options (required, Types::ConnectionLogOptions)

    Information about the client connection logging options.

    If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

    • Client connection requests

    • Client connection results (successful and unsuccessful)

    • Reasons for unsuccessful client connection requests

    • Client connection termination time

  • :dns_servers (Array<String>)

    Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.

  • :transport_protocol (String)

    The transport protocol to be used by the VPN session.

    Default value: udp

  • :vpn_port (Integer)

    The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

    Valid Values: 443 | 1194

    Default Value: 443

  • :description (String)

    A brief description of the Client VPN endpoint.

  • :split_tunnel (Boolean)

    Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.

    By default, split-tunnel on a VPN endpoint is disabled.

    For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client VPN Endpoint in the AWS Client VPN Administrator Guide.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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

    The tags to apply to the Client VPN endpoint during creation.

  • :security_group_ids (Array<String>)

    The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.

  • :vpc_id (String)

    The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.

  • :self_service_portal (String)

    Specify whether to enable the self-service portal for the Client VPN endpoint.

    Default Value: enabled

  • :client_connect_options (Types::ClientConnectOptions)

    The options for managing connection authorization for new client connections.

Returns:

See Also:

#create_client_vpn_route(options = {}) ⇒ Types::CreateClientVpnRouteResult

Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks.

Examples:

Request syntax with placeholder values


resp = client.create_client_vpn_route({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  destination_cidr_block: "String", # required
  target_vpc_subnet_id: "SubnetId", # required
  description: "String",
  client_token: "String",
  dry_run: false,
})

Response structure


resp.status.code #=> String, one of "creating", "active", "failed", "deleting"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint to which to add the route.

  • :destination_cidr_block (required, String)

    The IPv4 address range, in CIDR notation, of the route destination. For example:

    • To add a route for Internet access, enter 0.0.0.0/0

    • To add a route for a peered VPC, enter the peered VPC\'s IPv4 CIDR range

    • To add a route for an on-premises network, enter the AWS Site-to-Site VPN connection\'s IPv4 CIDR range

    • To add a route for the local network, enter the client CIDR range

  • :target_vpc_subnet_id (required, String)

    The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.

    Alternatively, if you\'re adding a route for the local network, specify local.

  • :description (String)

    A brief description of the route.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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

See Also:

#create_customer_gateway(options = {}) ⇒ Types::CreateCustomerGatewayResult

Provides information to AWS about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the AWS side of the VPN connection is the virtual private gateway.) You must provide the internet-routable IP address of the customer gateway's external interface. The IP address must be static and can be behind a device performing network address translation (NAT).

For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534 range).

Amazon EC2 supports all 4-byte ASN numbers in the range of 1 - 2147483647, with the exception of the following:

  • 7224 - reserved in the us-east-1 Region

  • 9059 - reserved in the eu-west-1 Region

  • 17943 - reserved in the ap-southeast-1 Region

  • 10124 - reserved in the ap-northeast-1 Region

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. Identical requests return information about the existing customer gateway and do not create new customer gateways.

Examples:

Example: To create a customer gateway


# This example creates a customer gateway with the specified IP address for its outside interface.

resp = client.create_customer_gateway({
  bgp_asn: 65534, 
  public_ip: "12.1.2.3", 
  type: "ipsec.1", 
})

# resp.to_h outputs the following:
{
  customer_gateway: {
    bgp_asn: "65534", 
    customer_gateway_id: "cgw-0e11f167", 
    ip_address: "12.1.2.3", 
    state: "available", 
    type: "ipsec.1", 
  }, 
}

Request syntax with placeholder values


resp = client.create_customer_gateway({
  bgp_asn: 1, # required
  public_ip: "String",
  certificate_arn: "String",
  type: "ipsec.1", # required, accepts ipsec.1
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  device_name: "String",
  dry_run: false,
})

Response structure


resp.customer_gateway.bgp_asn #=> String
resp.customer_gateway.customer_gateway_id #=> String
resp.customer_gateway.ip_address #=> String
resp.customer_gateway.certificate_arn #=> String
resp.customer_gateway.state #=> String
resp.customer_gateway.type #=> String
resp.customer_gateway.device_name #=> String
resp.customer_gateway.tags #=> Array
resp.customer_gateway.tags[0].key #=> String
resp.customer_gateway.tags[0].value #=> String

Options Hash (options):

  • :bgp_asn (required, Integer)

    For devices that support BGP, the customer gateway\'s BGP ASN.

    Default: 65000

  • :public_ip (String)

    The Internet-routable IP address for the customer gateway\'s outside interface. The address must be static.

  • :certificate_arn (String)

    The Amazon Resource Name (ARN) for the customer gateway certificate.

  • :type (required, String)

    The type of VPN connection that this customer gateway supports (ipsec.1).

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

    The tags to apply to the customer gateway.

  • :device_name (String)

    A name for the customer gateway device.

    Length Constraints: Up to 255 characters.

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

See Also:

#create_default_subnet(options = {}) ⇒ Types::CreateDefaultSubnetResult

Creates a default subnet with a size /20 IPv4 CIDR block in the specified Availability Zone in your default VPC. You can have only one default subnet per Availability Zone. For more information, see Creating a Default Subnet in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_default_subnet({
  availability_zone: "String", # required
  dry_run: false,
})

Response structure


resp.subnet.availability_zone #=> String
resp.subnet.availability_zone_id #=> String
resp.subnet.available_ip_address_count #=> Integer
resp.subnet.cidr_block #=> String
resp.subnet.default_for_az #=> true/false
resp.subnet.map_public_ip_on_launch #=> true/false
resp.subnet.map_customer_owned_ip_on_launch #=> true/false
resp.subnet.customer_owned_ipv_4_pool #=> String
resp.subnet.state #=> String, one of "pending", "available"
resp.subnet.subnet_id #=> String
resp.subnet.vpc_id #=> String
resp.subnet.owner_id #=> String
resp.subnet.assign_ipv_6_address_on_creation #=> true/false
resp.subnet.ipv_6_cidr_block_association_set #=> Array
resp.subnet.ipv_6_cidr_block_association_set[0].association_id #=> String
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.subnet.tags #=> Array
resp.subnet.tags[0].key #=> String
resp.subnet.tags[0].value #=> String
resp.subnet.subnet_arn #=> String
resp.subnet.outpost_arn #=> String

Options Hash (options):

  • :availability_zone (required, String)

    The Availability Zone in which to create the default subnet.

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

See Also:

#create_default_vpc(options = {}) ⇒ Types::CreateDefaultVpcResult

Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and Default Subnets in the Amazon Virtual Private Cloud User Guide. You cannot specify the components of the default VPC yourself.

If you deleted your previous default VPC, you can create a default VPC. You cannot have more than one default VPC per Region.

If your account supports EC2-Classic, you cannot use this action to create a default VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ.

Examples:

Request syntax with placeholder values


resp = client.create_default_vpc({
  dry_run: false,
})

Response structure


resp.vpc.cidr_block #=> String
resp.vpc.dhcp_options_id #=> String
resp.vpc.state #=> String, one of "pending", "available"
resp.vpc.vpc_id #=> String
resp.vpc.owner_id #=> String
resp.vpc.instance_tenancy #=> String, one of "default", "dedicated", "host"
resp.vpc.ipv_6_cidr_block_association_set #=> Array
resp.vpc.ipv_6_cidr_block_association_set[0].association_id #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].network_border_group #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_pool #=> String
resp.vpc.cidr_block_association_set #=> Array
resp.vpc.cidr_block_association_set[0].association_id #=> String
resp.vpc.cidr_block_association_set[0].cidr_block #=> String
resp.vpc.cidr_block_association_set[0].cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpc.cidr_block_association_set[0].cidr_block_state.status_message #=> String
resp.vpc.is_default #=> true/false
resp.vpc.tags #=> Array
resp.vpc.tags[0].key #=> String
resp.vpc.tags[0].value #=> String

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.

Returns:

See Also:

#create_dhcp_options(options = {}) ⇒ Types::CreateDhcpOptionsResult

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132.

  • domain-name-servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. To have your instance receive a custom DNS hostname as specified in domain-name, you must set domain-name-servers to a custom DNS server.

  • domain-name - If you're using AmazonProvidedDNS in us-east-1, specify ec2.internal. If you're using AmazonProvidedDNS in another Region, specify region.compute.internal (for example, ap-northeast-1.compute.internal). Otherwise, specify a domain name (for example, ExampleCompany.com). This value is used to complete unqualified DNS hostnames. Important: Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.

  • ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.

  • netbios-name-servers - The IP addresses of up to four NetBIOS name servers.

  • netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132.

Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an internet gateway, make sure to set the domain-name-servers option either to AmazonProvidedDNS or to a domain name server of your choice. For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a DHCP options set


# This example creates a DHCP options set.

resp = client.create_dhcp_options({
  dhcp_configurations: [
    {
      key: "domain-name-servers", 
      values: [
        "10.2.5.1", 
        "10.2.5.2", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  dhcp_options: {
    dhcp_configurations: [
      {
        key: "domain-name-servers", 
        values: [
          {
            value: "10.2.5.2", 
          }, 
          {
            value: "10.2.5.1", 
          }, 
        ], 
      }, 
    ], 
    dhcp_options_id: "dopt-d9070ebb", 
  }, 
}

Request syntax with placeholder values


resp = client.create_dhcp_options({
  dhcp_configurations: [ # required
    {
      key: "String",
      values: ["String"],
    },
  ],
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.dhcp_options.dhcp_configurations #=> Array
resp.dhcp_options.dhcp_configurations[0].key #=> String
resp.dhcp_options.dhcp_configurations[0].values #=> Array
resp.dhcp_options.dhcp_configurations[0].values[0] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.dhcp_options.dhcp_options_id #=> String
resp.dhcp_options.owner_id #=> String
resp.dhcp_options.tags #=> Array
resp.dhcp_options.tags[0].key #=> String
resp.dhcp_options.tags[0].value #=> String

Options Hash (options):

  • :dhcp_configurations (required, Array<Types::NewDhcpConfiguration>)

    A DHCP configuration option.

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

    The tags to assign to the DHCP option.

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

See Also:

#create_egress_only_internet_gateway(options = {}) ⇒ Types::CreateEgressOnlyInternetGatewayResult

[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

Examples:

Request syntax with placeholder values


resp = client.create_egress_only_internet_gateway({
  client_token: "String",
  dry_run: false,
  vpc_id: "VpcId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.client_token #=> String
resp.egress_only_internet_gateway.attachments #=> Array
resp.egress_only_internet_gateway.attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.egress_only_internet_gateway.attachments[0].vpc_id #=> String
resp.egress_only_internet_gateway.egress_only_internet_gateway_id #=> String
resp.egress_only_internet_gateway.tags #=> Array
resp.egress_only_internet_gateway.tags[0].key #=> String
resp.egress_only_internet_gateway.tags[0].value #=> String

Options Hash (options):

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :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 for which to create the egress-only internet gateway.

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

    The tags to assign to the egress-only internet gateway.

Returns:

See Also:

#create_fleet(options = {}) ⇒ Types::CreateFleetResult

Launches an EC2 Fleet.

You can create a single EC2 Fleet that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

For more information, see Launching an EC2 Fleet in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_fleet({
  dry_run: false,
  client_token: "String",
  spot_options: {
    allocation_strategy: "lowest-price", # accepts lowest-price, diversified, capacity-optimized
    maintenance_strategies: {
      capacity_rebalance: {
        replacement_strategy: "launch", # accepts launch
      },
    },
    instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
    instance_pools_to_use_count: 1,
    single_instance_type: false,
    single_availability_zone: false,
    min_target_capacity: 1,
    max_total_price: "String",
  },
  on_demand_options: {
    allocation_strategy: "lowest-price", # accepts lowest-price, prioritized
    capacity_reservation_options: {
      usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
    },
    single_instance_type: false,
    single_availability_zone: false,
    min_target_capacity: 1,
    max_total_price: "String",
  },
  excess_capacity_termination_policy: "no-termination", # accepts no-termination, termination
  launch_template_configs: [ # required
    {
      launch_template_specification: {
        launch_template_id: "LaunchTemplateId",
        launch_template_name: "LaunchTemplateName",
        version: "String",
      },
      overrides: [
        {
          instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
          max_price: "String",
          subnet_id: "SubnetId",
          availability_zone: "String",
          weighted_capacity: 1.0,
          priority: 1.0,
          placement: {
            availability_zone: "String",
            affinity: "String",
            group_name: "String",
            partition_number: 1,
            host_id: "String",
            tenancy: "default", # accepts default, dedicated, host
            spread_domain: "String",
            host_resource_group_arn: "String",
          },
        },
      ],
    },
  ],
  target_capacity_specification: { # required
    total_target_capacity: 1, # required
    on_demand_target_capacity: 1,
    spot_target_capacity: 1,
    default_target_capacity_type: "spot", # accepts spot, on-demand
  },
  terminate_instances_with_expiration: false,
  type: "request", # accepts request, maintain, instant
  valid_from: Time.now,
  valid_until: Time.now,
  replace_unhealthy_instances: false,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.fleet_id #=> String
resp.errors #=> Array
resp.errors[0].launch_template_and_overrides.launch_template_specification.launch_template_id #=> String
resp.errors[0].launch_template_and_overrides.launch_template_specification.launch_template_name #=> String
resp.errors[0].launch_template_and_overrides.launch_template_specification.version #=> String
resp.errors[0].launch_template_and_overrides.overrides.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.errors[0].launch_template_and_overrides.overrides.max_price #=> String
resp.errors[0].launch_template_and_overrides.overrides.subnet_id #=> String
resp.errors[0].launch_template_and_overrides.overrides.availability_zone #=> String
resp.errors[0].launch_template_and_overrides.overrides.weighted_capacity #=> Float
resp.errors[0].launch_template_and_overrides.overrides.priority #=> Float
resp.errors[0].launch_template_and_overrides.overrides.placement.group_name #=> String
resp.errors[0].lifecycle #=> String, one of "spot", "on-demand"
resp.errors[0].error_code #=> String
resp.errors[0].error_message #=> String
resp.instances #=> Array
resp.instances[0].launch_template_and_overrides.launch_template_specification.launch_template_id #=> String
resp.instances[0].launch_template_and_overrides.launch_template_specification.launch_template_name #=> String
resp.instances[0].launch_template_and_overrides.launch_template_specification.version #=> String
resp.instances[0].launch_template_and_overrides.overrides.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.instances[0].launch_template_and_overrides.overrides.max_price #=> String
resp.instances[0].launch_template_and_overrides.overrides.subnet_id #=> String
resp.instances[0].launch_template_and_overrides.overrides.availability_zone #=> String
resp.instances[0].launch_template_and_overrides.overrides.weighted_capacity #=> Float
resp.instances[0].launch_template_and_overrides.overrides.priority #=> Float
resp.instances[0].launch_template_and_overrides.overrides.placement.group_name #=> String
resp.instances[0].lifecycle #=> String, one of "spot", "on-demand"
resp.instances[0].instance_ids #=> Array
resp.instances[0].instance_ids[0] #=> String
resp.instances[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.instances[0].platform #=> String, one of "Windows"

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.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

  • :spot_options (Types::SpotOptionsRequest)

    Describes the configuration of Spot Instances in an EC2 Fleet.

  • :on_demand_options (Types::OnDemandOptionsRequest)

    Describes the configuration of On-Demand Instances in an EC2 Fleet.

  • :excess_capacity_termination_policy (String)

    Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

  • :launch_template_configs (required, Array<Types::FleetLaunchTemplateConfigRequest>)

    The configuration for the EC2 Fleet.

  • :target_capacity_specification (required, Types::TargetCapacitySpecificationRequest)

    The number of units to request.

  • :terminate_instances_with_expiration (Boolean)

    Indicates whether running instances should be terminated when the EC2 Fleet expires.

  • :type (String)

    The type of request. The default value is maintain.

    • maintain - The EC2 Fleet plaees an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.

    • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.

    • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

    For more information, see EC2 Fleet request types in the Amazon Elastic Compute Cloud User Guide.

  • :valid_from (Time)

    The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

  • :valid_until (Time)

    The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.

  • :replace_unhealthy_instances (Boolean)

    Indicates whether EC2 Fleet should replace unhealthy instances.

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

    The key-value pair for tagging the EC2 Fleet request on creation. The value for ResourceType must be fleet, otherwise the fleet request fails. To tag instances at launch, specify the tags in the launch template. For information about tagging after launch, see Tagging your resources.

Returns:

See Also:

#create_flow_logs(options = {}) ⇒ Types::CreateFlowLogsResult

Creates one or more flow logs to capture information about IP traffic for a specific network interface, subnet, or VPC.

Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow Log Records in the Amazon Virtual Private Cloud User Guide.

When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.

For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_flow_logs({
  dry_run: false,
  client_token: "String",
  deliver_logs_permission_arn: "String",
  log_group_name: "String",
  resource_ids: ["FlowLogResourceId"], # required
  resource_type: "VPC", # required, accepts VPC, Subnet, NetworkInterface
  traffic_type: "ACCEPT", # required, accepts ACCEPT, REJECT, ALL
  log_destination_type: "cloud-watch-logs", # accepts cloud-watch-logs, s3
  log_destination: "String",
  log_format: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  max_aggregation_interval: 1,
})

Response structure


resp.client_token #=> String
resp.flow_log_ids #=> Array
resp.flow_log_ids[0] #=> String
resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :deliver_logs_permission_arn (String)

    The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.

    If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

  • :log_group_name (String)

    The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

    If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

  • :resource_ids (required, Array<String>)

    The ID of the subnet, network interface, or VPC for which you want to create a flow log.

    Constraints: Maximum of 1000 resources

  • :resource_type (required, String)

    The type of resource for which to create the flow log. For example, if you specified a VPC ID for the ResourceId property, specify VPC for this property.

  • :traffic_type (required, String)

    The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.

  • :log_destination_type (String)

    Specifies the type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

    If you specify LogDestinationType as s3, do not specify DeliverLogsPermissionArn or LogGroupName.

    Default: cloud-watch-logs

  • :log_destination (String)

    Specifies the destination to which the flow log data is to be published. Flow log data can be published to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified for LogDestinationType.

    If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For example, to publish to a log group called my-logs, specify arn:aws:logs:us-east-1:123456789012:log-group:my-logs. Alternatively, use LogGroupName instead.

    If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as a subfolder name. This is a reserved term.

  • :log_format (String)

    The fields to include in the flow log record, in the order in which they should appear. For a list of available fields, see Flow Log Records. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must specify at least one field.

    Specify the fields using the $`{field-id}` format, separated by spaces. For the AWS CLI, use single quotation marks (\' \') to surround the parameter value.

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

    The tags to apply to the flow logs.

  • :max_aggregation_interval (Integer)

    The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).

    When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.

    Default: 600

Returns:

See Also:

#create_fpga_image(options = {}) ⇒ Types::CreateFpgaImageResult

Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).

The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.

An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated instances. For more information, see the AWS FPGA Hardware Development Kit.

Examples:

Request syntax with placeholder values


resp = client.create_fpga_image({
  dry_run: false,
  input_storage_location: { # required
    bucket: "String",
    key: "String",
  },
  logs_storage_location: {
    bucket: "String",
    key: "String",
  },
  description: "String",
  name: "String",
  client_token: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.fpga_image_id #=> String
resp.fpga_image_global_id #=> String

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.

  • :input_storage_location (required, Types::StorageLocation)

    The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.

  • :logs_storage_location (Types::StorageLocation)

    The location in Amazon S3 for the output logs.

  • :description (String)

    A description for the AFI.

  • :name (String)

    A name for the AFI.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

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

    The tags to apply to the FPGA image during creation.

Returns:

See Also:

#create_image(options = {}) ⇒ Types::CreateImageResult

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create an AMI from an Amazon EBS-backed instance


# This example creates an AMI from the specified instance and adds an EBS volume with the device name /dev/sdh and an instance store volume with the device name /dev/sdc.

resp = client.create_image({
  block_device_mappings: [
    {
      device_name: "/dev/sdh", 
      ebs: {
        volume_size: 100, 
      }, 
    }, 
    {
      device_name: "/dev/sdc", 
      virtual_name: "ephemeral1", 
    }, 
  ], 
  description: "An AMI for my server", 
  instance_id: "i-1234567890abcdef0", 
  name: "My server", 
  no_reboot: true, 
})

# resp.to_h outputs the following:
{
  image_id: "ami-1a2b3c4d", 
}

Request syntax with placeholder values


resp = client.create_image({
  block_device_mappings: [
    {
      device_name: "String",
      virtual_name: "String",
      ebs: {
        delete_on_termination: false,
        iops: 1,
        snapshot_id: "String",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
        kms_key_id: "String",
        encrypted: false,
      },
      no_device: "String",
    },
  ],
  description: "String",
  dry_run: false,
  instance_id: "InstanceId", # required
  name: "String", # required
  no_reboot: false,
})

Response structure


resp.image_id #=> String

Options Hash (options):

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

    The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.

  • :description (String)

    A description for the new image.

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

  • :instance_id (required, String)

    The ID of the instance.

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

  • :no_reboot (Boolean)

    By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the \'No Reboot\' option is set, Amazon EC2 doesn\'t shut down the instance before creating the image. When this option is used, file system integrity on the created image can\'t be guaranteed.

Returns:

See Also:

#create_instance_export_task(options = {}) ⇒ Types::CreateInstanceExportTaskResult

Exports a running or stopped instance to an Amazon S3 bucket.

For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an Instance as a VM Using VM Import/Export in the VM Import/Export User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_instance_export_task({
  description: "String",
  export_to_s3_task: { # required
    container_format: "ova", # accepts ova
    disk_image_format: "VMDK", # accepts VMDK, RAW, VHD
    s3_bucket: "String",
    s3_prefix: "String",
  },
  instance_id: "InstanceId", # required
  target_environment: "citrix", # required, accepts citrix, vmware, microsoft
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.export_task.description #=> String
resp.export_task.export_task_id #=> String
resp.export_task.export_to_s3_task.container_format #=> String, one of "ova"
resp.export_task.export_to_s3_task.disk_image_format #=> String, one of "VMDK", "RAW", "VHD"
resp.export_task.export_to_s3_task.s3_bucket #=> String
resp.export_task.export_to_s3_task.s3_key #=> String
resp.export_task.instance_export_details.instance_id #=> String
resp.export_task.instance_export_details.target_environment #=> String, one of "citrix", "vmware", "microsoft"
resp.export_task.state #=> String, one of "active", "cancelling", "cancelled", "completed"
resp.export_task.status_message #=> String
resp.export_task.tags #=> Array
resp.export_task.tags[0].key #=> String
resp.export_task.tags[0].value #=> String

Options Hash (options):

  • :description (String)

    A description for the conversion task or the resource being exported. The maximum length is 255 characters.

  • :export_to_s3_task (required, Types::ExportToS3TaskSpecification)

    The format and location for an instance export task.

  • :instance_id (required, String)

    The ID of the instance.

  • :target_environment (required, String)

    The target virtualization environment.

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

    The tags to apply to the instance export task during creation.

Returns:

See Also:

#create_internet_gateway(options = {}) ⇒ Types::CreateInternetGatewayResult

Creates an internet gateway for use with a VPC. After creating the internet gateway, you attach it to a VPC using AttachInternetGateway.

For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create an Internet gateway


# This example creates an Internet gateway.

resp = client.create_internet_gateway({
})

# resp.to_h outputs the following:
{
  internet_gateway: {
    attachments: [
    ], 
    internet_gateway_id: "igw-c0a643a9", 
    tags: [
    ], 
  }, 
}

Request syntax with placeholder values


resp = client.create_internet_gateway({
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.internet_gateway.attachments #=> Array
resp.internet_gateway.attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.internet_gateway.attachments[0].vpc_id #=> String
resp.internet_gateway.internet_gateway_id #=> String
resp.internet_gateway.owner_id #=> String
resp.internet_gateway.tags #=> Array
resp.internet_gateway.tags[0].key #=> String
resp.internet_gateway.tags[0].value #=> String

Options Hash (options):

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

    The tags to assign to the internet gateway.

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

See Also:

#create_key_pair(options = {}) ⇒ Types::KeyPair

Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#1 private key. If a key with the specified name already exists, Amazon EC2 returns an error.

You can have up to five thousand key pairs per Region.

The key pair returned to you is available only in the Region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any Region using ImportKeyPair.

For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a key pair


# This example creates a key pair named my-key-pair.

resp = client.create_key_pair({
  key_name: "my-key-pair", 
})

Request syntax with placeholder values


resp = client.create_key_pair({
  key_name: "String", # required
  dry_run: false,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.key_fingerprint #=> String
resp.key_material #=> String
resp.key_name #=> String
resp.key_pair_id #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :key_name (required, String)

    A unique name for the key pair.

    Constraints: Up to 255 ASCII characters

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

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

    The tags to apply to the new key pair.

Returns:

See Also:

#create_launch_template(options = {}) ⇒ Types::CreateLaunchTemplateResult

Creates a launch template. A launch template contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify a launch template instead of providing the launch parameters in the request. For more information, see Launching an instance from a launch templatein the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a launch template


# This example creates a launch template that specifies the subnet in which to launch the instance, assigns a public IP address and an IPv6 address to the instance, and creates a tag for the instance.

resp = client.create_launch_template({
  launch_template_data: {
    image_id: "ami-8c1be5f6", 
    instance_type: "t2.small", 
    network_interfaces: [
      {
        associate_public_ip_address: true, 
        device_index: 0, 
        ipv_6_address_count: 1, 
        subnet_id: "subnet-7b16de0c", 
      }, 
    ], 
    tag_specifications: [
      {
        resource_type: "instance", 
        tags: [
          {
            key: "Name", 
            value: "webserver", 
          }, 
        ], 
      }, 
    ], 
  }, 
  launch_template_name: "my-template", 
  version_description: "WebVersion1", 
})

# resp.to_h outputs the following:
{
  launch_template: {
    create_time: Time.parse("2017-11-27T09:13:24.000Z"), 
    created_by: "arn:aws:iam::123456789012:root", 
    default_version_number: 1, 
    latest_version_number: 1, 
    launch_template_id: "lt-01238c059e3466abc", 
    launch_template_name: "my-template", 
  }, 
}

Request syntax with placeholder values


resp = client.create_launch_template({
  dry_run: false,
  client_token: "String",
  launch_template_name: "LaunchTemplateName", # required
  version_description: "VersionDescription",
  launch_template_data: { # required
    kernel_id: "KernelId",
    ebs_optimized: false,
    iam_instance_profile: {
      arn: "String",
      name: "String",
    },
    block_device_mappings: [
      {
        device_name: "String",
        virtual_name: "String",
        ebs: {
          encrypted: false,
          delete_on_termination: false,
          iops: 1,
          kms_key_id: "KmsKeyId",
          snapshot_id: "SnapshotId",
          volume_size: 1,
          volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
        },
        no_device: "String",
      },
    ],
    network_interfaces: [
      {
        associate_carrier_ip_address: false,
        associate_public_ip_address: false,
        delete_on_termination: false,
        description: "String",
        device_index: 1,
        groups: ["SecurityGroupId"],
        interface_type: "String",
        ipv_6_address_count: 1,
        ipv_6_addresses: [
          {
            ipv_6_address: "String",
          },
        ],
        network_interface_id: "NetworkInterfaceId",
        private_ip_address: "String",
        private_ip_addresses: [
          {
            primary: false,
            private_ip_address: "String",
          },
        ],
        secondary_private_ip_address_count: 1,
        subnet_id: "SubnetId",
        network_card_index: 1,
      },
    ],
    image_id: "ImageId",
    instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
    key_name: "KeyPairName",
    monitoring: {
      enabled: false,
    },
    placement: {
      availability_zone: "String",
      affinity: "String",
      group_name: "PlacementGroupName",
      host_id: "DedicatedHostId",
      tenancy: "default", # accepts default, dedicated, host
      spread_domain: "String",
      host_resource_group_arn: "String",
      partition_number: 1,
    },
    ram_disk_id: "RamdiskId",
    disable_api_termination: false,
    instance_initiated_shutdown_behavior: "stop", # accepts stop, terminate
    user_data: "String",
    tag_specifications: [
      {
        resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
        tags: [
          {
            key: "String",
            value: "String",
          },
        ],
      },
    ],
    elastic_gpu_specifications: [
      {
        type: "String", # required
      },
    ],
    elastic_inference_accelerators: [
      {
        type: "String", # required
        count: 1,
      },
    ],
    security_group_ids: ["SecurityGroupId"],
    security_groups: ["SecurityGroupName"],
    instance_market_options: {
      market_type: "spot", # accepts spot
      spot_options: {
        max_price: "String",
        spot_instance_type: "one-time", # accepts one-time, persistent
        block_duration_minutes: 1,
        valid_until: Time.now,
        instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
      },
    },
    credit_specification: {
      cpu_credits: "String", # required
    },
    cpu_options: {
      core_count: 1,
      threads_per_core: 1,
    },
    capacity_reservation_specification: {
      capacity_reservation_preference: "open", # accepts open, none
      capacity_reservation_target: {
        capacity_reservation_id: "CapacityReservationId",
        capacity_reservation_resource_group_arn: "String",
      },
    },
    license_specifications: [
      {
        license_configuration_arn: "String",
      },
    ],
    hibernation_options: {
      configured: false,
    },
    metadata_options: {
      http_tokens: "optional", # accepts optional, required
      http_put_response_hop_limit: 1,
      http_endpoint: "disabled", # accepts disabled, enabled
    },
    enclave_options: {
      enabled: false,
    },
  },
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.launch_template.launch_template_id #=> String
resp.launch_template.launch_template_name #=> String
resp.launch_template.create_time #=> Time
resp.launch_template.created_by #=> String
resp.launch_template.default_version_number #=> Integer
resp.launch_template.latest_version_number #=> Integer
resp.launch_template.tags #=> Array
resp.launch_template.tags[0].key #=> String
resp.launch_template.tags[0].value #=> String
resp.warning.errors #=> Array
resp.warning.errors[0].code #=> String
resp.warning.errors[0].message #=> String

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.

  • :client_token (String)

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

    Constraint: Maximum 128 ASCII characters.

  • :launch_template_name (required, String)

    A name for the launch template.

  • :version_description (String)

    A description for the first version of the launch template.

  • :launch_template_data (required, Types::RequestLaunchTemplateData)

    The information for the launch template.

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

    The tags to apply to the launch template during creation.

Returns:

See Also:

#create_launch_template_version(options = {}) ⇒ Types::CreateLaunchTemplateVersionResult

Creates a new version for a launch template. You can specify an existing version of launch template from which to base the new version.

Launch template versions are numbered in the order in which they are created. You cannot specify, change, or replace the numbering of launch template versions.

For more information, see Managing launch template versionsin the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a launch template version


# This example creates a new launch template version based on version 1 of the specified launch template and specifies a different AMI ID.

resp = client.create_launch_template_version({
  launch_template_data: {
    image_id: "ami-c998b6b2", 
  }, 
  launch_template_id: "lt-0abcd290751193123", 
  source_version: "1", 
  version_description: "WebVersion2", 
})

# resp.to_h outputs the following:
{
  launch_template_version: {
    create_time: Time.parse("2017-12-01T13:35:46.000Z"), 
    created_by: "arn:aws:iam::123456789012:root", 
    default_version: false, 
    launch_template_data: {
      image_id: "ami-c998b6b2", 
      instance_type: "t2.micro", 
      network_interfaces: [
        {
          associate_public_ip_address: true, 
          device_index: 0, 
          ipv_6_addresses: [
            {
              ipv_6_address: "2001:db8:1234:1a00::123", 
            }, 
          ], 
          subnet_id: "subnet-7b16de0c", 
        }, 
      ], 
    }, 
    launch_template_id: "lt-0abcd290751193123", 
    launch_template_name: "my-template", 
    version_description: "WebVersion2", 
    version_number: 2, 
  }, 
}

Request syntax with placeholder values


resp = client.create_launch_template_version({
  dry_run: false,
  client_token: "String",
  launch_template_id: "LaunchTemplateId",
  launch_template_name: "LaunchTemplateName",
  source_version: "String",
  version_description: "VersionDescription",
  launch_template_data: { # required
    kernel_id: "KernelId",
    ebs_optimized: false,
    iam_instance_profile: {
      arn: "String",
      name: "String",
    },
    block_device_mappings: [
      {
        device_name: "String",
        virtual_name: "String",
        ebs: {
          encrypted: false,
          delete_on_termination: false,
          iops: 1,
          kms_key_id: "KmsKeyId",
          snapshot_id: "SnapshotId",
          volume_size: 1,
          volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
        },
        no_device: "String",
      },
    ],
    network_interfaces: [
      {
        associate_carrier_ip_address: false,
        associate_public_ip_address: false,
        delete_on_termination: false,
        description: "String",
        device_index: 1,
        groups: ["SecurityGroupId"],
        interface_type: "String",
        ipv_6_address_count: 1,
        ipv_6_addresses: [
          {
            ipv_6_address: "String",
          },
        ],
        network_interface_id: "NetworkInterfaceId",
        private_ip_address: "String",
        private_ip_addresses: [
          {
            primary: false,
            private_ip_address: "String",
          },
        ],
        secondary_private_ip_address_count: 1,
        subnet_id: "SubnetId",
        network_card_index: 1,
      },
    ],
    image_id: "ImageId",
    instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
    key_name: "KeyPairName",
    monitoring: {
      enabled: false,
    },
    placement: {
      availability_zone: "String",
      affinity: "String",
      group_name: "PlacementGroupName",
      host_id: "DedicatedHostId",
      tenancy: "default", # accepts default, dedicated, host
      spread_domain: "String",
      host_resource_group_arn: "String",
      partition_number: 1,
    },
    ram_disk_id: "RamdiskId",
    disable_api_termination: false,
    instance_initiated_shutdown_behavior: "stop", # accepts stop, terminate
    user_data: "String",
    tag_specifications: [
      {
        resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
        tags: [
          {
            key: "String",
            value: "String",
          },
        ],
      },
    ],
    elastic_gpu_specifications: [
      {
        type: "String", # required
      },
    ],
    elastic_inference_accelerators: [
      {
        type: "String", # required
        count: 1,
      },
    ],
    security_group_ids: ["SecurityGroupId"],
    security_groups: ["SecurityGroupName"],
    instance_market_options: {
      market_type: "spot", # accepts spot
      spot_options: {
        max_price: "String",
        spot_instance_type: "one-time", # accepts one-time, persistent
        block_duration_minutes: 1,
        valid_until: Time.now,
        instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
      },
    },
    credit_specification: {
      cpu_credits: "String", # required
    },
    cpu_options: {
      core_count: 1,
      threads_per_core: 1,
    },
    capacity_reservation_specification: {
      capacity_reservation_preference: "open", # accepts open, none
      capacity_reservation_target: {
        capacity_reservation_id: "CapacityReservationId",
        capacity_reservation_resource_group_arn: "String",
      },
    },
    license_specifications: [
      {
        license_configuration_arn: "String",
      },
    ],
    hibernation_options: {
      configured: false,
    },
    metadata_options: {
      http_tokens: "optional", # accepts optional, required
      http_put_response_hop_limit: 1,
      http_endpoint: "disabled", # accepts disabled, enabled
    },
    enclave_options: {
      enabled: false,
    },
  },
})

Response structure


resp.launch_template_version.launch_template_id #=> String
resp.launch_template_version.launch_template_name #=> String
resp.launch_template_version.version_number #=> Integer
resp.launch_template_version.version_description #=> String
resp.launch_template_version.create_time #=> Time
resp.launch_template_version.created_by #=> String
resp.launch_template_version.default_version #=> true/false
resp.launch_template_version.launch_template_data.kernel_id #=> String
resp.launch_template_version.launch_template_data.ebs_optimized #=> true/false
resp.launch_template_version.launch_template_data.iam_instance_profile.arn #=> String
resp.launch_template_version.launch_template_data.iam_instance_profile.name #=> String
resp.launch_template_version.launch_template_data.block_device_mappings #=> Array
resp.launch_template_version.launch_template_data.block_device_mappings[0].device_name #=> String
resp.launch_template_version.launch_template_data.block_device_mappings[0].virtual_name #=> String
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.encrypted #=> true/false
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.iops #=> Integer
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.kms_key_id #=> String
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.snapshot_id #=> String
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.volume_size #=> Integer
resp.launch_template_version.launch_template_data.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.launch_template_version.launch_template_data.block_device_mappings[0].no_device #=> String
resp.launch_template_version.launch_template_data.network_interfaces #=> Array
resp.launch_template_version.launch_template_data.network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.launch_template_version.launch_template_data.network_interfaces[0].associate_public_ip_address #=> true/false
resp.launch_template_version.launch_template_data.network_interfaces[0].delete_on_termination #=> true/false
resp.launch_template_version.launch_template_data.network_interfaces[0].description #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].device_index #=> Integer
resp.launch_template_version.launch_template_data.network_interfaces[0].groups #=> Array
resp.launch_template_version.launch_template_data.network_interfaces[0].groups[0] #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].interface_type #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].ipv_6_address_count #=> Integer
resp.launch_template_version.launch_template_data.network_interfaces[0].ipv_6_addresses #=> Array
resp.launch_template_version.launch_template_data.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].network_interface_id #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].private_ip_address #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].private_ip_addresses #=> Array
resp.launch_template_version.launch_template_data.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.launch_template_version.launch_template_data.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.launch_template_version.launch_template_data.network_interfaces[0].subnet_id #=> String
resp.launch_template_version.launch_template_data.network_interfaces[0].network_card_index #=> Integer
resp.launch_template_version.launch_template_data.image_id #=> String
resp.launch_template_version.launch_template_data.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.launch_template_version.launch_template_data.key_name #=> String
resp.launch_template_version.launch_template_data.monitoring.enabled #=> true/false
resp.launch_template_version.launch_template_data.placement.availability_zone #=> String
resp.launch_template_version.launch_template_data.placement.affinity #=> String
resp.launch_template_version.launch_template_data.placement.group_name #=> String
resp.launch_template_version.launch_template_data.placement.host_id #=> String
resp.launch_template_version.launch_template_data.placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.launch_template_version.launch_template_data.placement.spread_domain #=> String
resp.launch_template_version.launch_template_data.placement.host_resource_group_arn #=> String
resp.launch_template_version.launch_template_data.placement.partition_number #=> Integer
resp.launch_template_version.launch_template_data.ram_disk_id #=> String
resp.launch_template_version.launch_template_data.disable_api_termination #=> true/false
resp.launch_template_version.launch_template_data.instance_initiated_shutdown_behavior #=> String, one of "stop", "terminate"
resp.launch_template_version.launch_template_data.user_data #=> String
resp.launch_template_version.launch_template_data.tag_specifications #=> Array
resp.launch_template_version.launch_template_data.tag_specifications[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.launch_template_version.launch_template_data.tag_specifications[0].tags #=> Array
resp.launch_template_version.launch_template_data.tag_specifications[0].tags[0].key #=> String
resp.launch_template_version.launch_template_data.tag_specifications[0].tags[0].value #=> String
resp.launch_template_version.launch_template_data.elastic_gpu_specifications #=> Array
resp.launch_template_version.launch_template_data.elastic_gpu_specifications[0].type #=> String
resp.launch_template_version.launch_template_data.elastic_inference_accelerators #=> Array
resp.launch_template_version.launch_template_data.elastic_inference_accelerators[0].type #=> String
resp.launch_template_version.launch_template_data.elastic_inference_accelerators[0].count #=> Integer
resp.launch_template_version.launch_template_data.security_group_ids #=> Array
resp.launch_template_version.launch_template_data.security_group_ids[0] #=> String
resp.launch_template_version.launch_template_data.security_groups #=> Array
resp.launch_template_version.launch_template_data.security_groups[0] #=> String
resp.launch_template_version.launch_template_data.instance_market_options.market_type #=> String, one of "spot"
resp.launch_template_version.launch_template_data.instance_market_options.spot_options.max_price #=> String
resp.launch_template_version.launch_template_data.instance_market_options.spot_options.spot_instance_type #=> String, one of "one-time", "persistent"
resp.launch_template_version.launch_template_data.instance_market_options.spot_options.block_duration_minutes #=> Integer
resp.launch_template_version.launch_template_data.instance_market_options.spot_options.valid_until #=> Time
resp.launch_template_version.launch_template_data.instance_market_options.spot_options.instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.launch_template_version.launch_template_data.credit_specification.cpu_credits #=> String
resp.launch_template_version.launch_template_data.cpu_options.core_count #=> Integer
resp.launch_template_version.launch_template_data.cpu_options.threads_per_core #=> Integer
resp.launch_template_version.launch_template_data.capacity_reservation_specification.capacity_reservation_preference #=> String, one of "open", "none"
resp.launch_template_version.launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_id #=> String
resp.launch_template_version.launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_resource_group_arn #=> String
resp.launch_template_version.launch_template_data.license_specifications #=> Array
resp.launch_template_version.launch_template_data.license_specifications[0].license_configuration_arn #=> String
resp.launch_template_version.launch_template_data.hibernation_options.configured #=> true/false
resp.launch_template_version.launch_template_data..state #=> String, one of "pending", "applied"
resp.launch_template_version.launch_template_data..http_tokens #=> String, one of "optional", "required"
resp.launch_template_version.launch_template_data..http_put_response_hop_limit #=> Integer
resp.launch_template_version.launch_template_data..http_endpoint #=> String, one of "disabled", "enabled"
resp.launch_template_version.launch_template_data.enclave_options.enabled #=> true/false
resp.warning.errors #=> Array
resp.warning.errors[0].code #=> String
resp.warning.errors[0].message #=> String

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.

  • :client_token (String)

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

    Constraint: Maximum 128 ASCII characters.

  • :launch_template_id (String)

    The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :launch_template_name (String)

    The name of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :source_version (String)

    The version number of the launch template version on which to base the new version. The new version inherits the same launch parameters as the source version, except for parameters that you specify in LaunchTemplateData. Snapshots applied to the block device mapping are ignored when creating a new version unless they are explicitly included.

  • :version_description (String)

    A description for the version of the launch template.

  • :launch_template_data (required, Types::RequestLaunchTemplateData)

    The information for the launch template.

Returns:

See Also:

#create_local_gateway_route(options = {}) ⇒ Types::CreateLocalGatewayRouteResult

Creates a static route for the specified local gateway route table.

Examples:

Request syntax with placeholder values


resp = client.create_local_gateway_route({
  destination_cidr_block: "String", # required
  local_gateway_route_table_id: "LocalGatewayRoutetableId", # required
  local_gateway_virtual_interface_group_id: "LocalGatewayVirtualInterfaceGroupId", # required
  dry_run: false,
})

Response structure


resp.route.destination_cidr_block #=> String
resp.route.local_gateway_virtual_interface_group_id #=> String
resp.route.type #=> String, one of "static", "propagated"
resp.route.state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"
resp.route.local_gateway_route_table_id #=> String
resp.route.local_gateway_route_table_arn #=> String
resp.route.owner_id #=> String

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • :local_gateway_route_table_id (required, String)

    The ID of the local gateway route table.

  • :local_gateway_virtual_interface_group_id (required, String)

    The ID of the virtual interface group.

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

See Also:

#create_local_gateway_route_table_vpc_association(options = {}) ⇒ Types::CreateLocalGatewayRouteTableVpcAssociationResult

Associates the specified VPC with the specified local gateway route table.

Examples:

Request syntax with placeholder values


resp = client.create_local_gateway_route_table_vpc_association({
  local_gateway_route_table_id: "LocalGatewayRoutetableId", # required
  vpc_id: "VpcId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.local_gateway_route_table_vpc_association.local_gateway_route_table_vpc_association_id #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_route_table_id #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_route_table_arn #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_id #=> String
resp.local_gateway_route_table_vpc_association.vpc_id #=> String
resp.local_gateway_route_table_vpc_association.owner_id #=> String
resp.local_gateway_route_table_vpc_association.state #=> String
resp.local_gateway_route_table_vpc_association.tags #=> Array
resp.local_gateway_route_table_vpc_association.tags[0].key #=> String
resp.local_gateway_route_table_vpc_association.tags[0].value #=> String

Options Hash (options):

  • :local_gateway_route_table_id (required, String)

    The ID of the local gateway route table.

  • :vpc_id (required, String)

    The ID of the VPC.

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

    The tags to assign to the local gateway route table VPC association.

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

See Also:

#create_managed_prefix_list(options = {}) ⇒ Types::CreateManagedPrefixListResult

Creates a managed prefix list. You can specify one or more entries for the prefix list. Each entry consists of a CIDR block and an optional description.

You must specify the maximum number of entries for the prefix list. The maximum number of entries cannot be changed later.

Examples:

Request syntax with placeholder values


resp = client.create_managed_prefix_list({
  dry_run: false,
  prefix_list_name: "String", # required
  entries: [
    {
      cidr: "String", # required
      description: "String",
    },
  ],
  max_entries: 1, # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  address_family: "String", # required
  client_token: "String",
})

Response structure


resp.prefix_list.prefix_list_id #=> String
resp.prefix_list.address_family #=> String
resp.prefix_list.state #=> String, one of "create-in-progress", "create-complete", "create-failed", "modify-in-progress", "modify-complete", "modify-failed", "restore-in-progress", "restore-complete", "restore-failed", "delete-in-progress", "delete-complete", "delete-failed"
resp.prefix_list.state_message #=> String
resp.prefix_list.prefix_list_arn #=> String
resp.prefix_list.prefix_list_name #=> String
resp.prefix_list.max_entries #=> Integer
resp.prefix_list.version #=> Integer
resp.prefix_list.tags #=> Array
resp.prefix_list.tags[0].key #=> String
resp.prefix_list.tags[0].value #=> String
resp.prefix_list.owner_id #=> String

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.

  • :prefix_list_name (required, String)

    A name for the prefix list.

    Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws.

  • :entries (Array<Types::AddPrefixListEntry>)

    One or more entries for the prefix list.

  • :max_entries (required, Integer)

    The maximum number of entries for the prefix list.

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

    The tags to apply to the prefix list during creation.

  • :address_family (required, String)

    The IP address type.

    Valid Values: IPv4 | IPv6

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

    Constraints: Up to 255 UTF-8 characters in length.

Returns:

See Also:

#create_nat_gateway(options = {}) ⇒ Types::CreateNatGatewayResult

Creates a NAT gateway in the specified public subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. Internet-bound traffic from a private subnet can be routed to the NAT gateway, therefore enabling instances in the private subnet to connect to the internet. For more information, see NAT Gateways in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a NAT gateway


# This example creates a NAT gateway in subnet subnet-1a2b3c4d and associates an Elastic IP address with the allocation ID eipalloc-37fc1a52 with the NAT gateway.

resp = client.create_nat_gateway({
  allocation_id: "eipalloc-37fc1a52", 
  subnet_id: "subnet-1a2b3c4d", 
})

# resp.to_h outputs the following:
{
  nat_gateway: {
    create_time: Time.parse("2015-12-17T12:45:26.732Z"), 
    nat_gateway_addresses: [
      {
        allocation_id: "eipalloc-37fc1a52", 
      }, 
    ], 
    nat_gateway_id: "nat-08d48af2a8e83edfd", 
    state: "pending", 
    subnet_id: "subnet-1a2b3c4d", 
    vpc_id: "vpc-1122aabb", 
  }, 
}

Request syntax with placeholder values


resp = client.create_nat_gateway({
  allocation_id: "AllocationId", # required
  client_token: "String",
  dry_run: false,
  subnet_id: "SubnetId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.client_token #=> String
resp.nat_gateway.create_time #=> Time
resp.nat_gateway.delete_time #=> Time
resp.nat_gateway.failure_code #=> String
resp.nat_gateway.failure_message #=> String
resp.nat_gateway.nat_gateway_addresses #=> Array
resp.nat_gateway.nat_gateway_addresses[0].allocation_id #=> String
resp.nat_gateway.nat_gateway_addresses[0].network_interface_id #=> String
resp.nat_gateway.nat_gateway_addresses[0].private_ip #=> String
resp.nat_gateway.nat_gateway_addresses[0].public_ip #=> String
resp.nat_gateway.nat_gateway_id #=> String
resp.nat_gateway.provisioned_bandwidth.provision_time #=> Time
resp.nat_gateway.provisioned_bandwidth.provisioned #=> String
resp.nat_gateway.provisioned_bandwidth.request_time #=> Time
resp.nat_gateway.provisioned_bandwidth.requested #=> String
resp.nat_gateway.provisioned_bandwidth.status #=> String
resp.nat_gateway.state #=> String, one of "pending", "failed", "available", "deleting", "deleted"
resp.nat_gateway.subnet_id #=> String
resp.nat_gateway.vpc_id #=> String
resp.nat_gateway.tags #=> Array
resp.nat_gateway.tags[0].key #=> String
resp.nat_gateway.tags[0].value #=> String

Options Hash (options):

  • :allocation_id (required, String)

    The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

    Constraint: Maximum 64 ASCII characters.

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

  • :subnet_id (required, String)

    The subnet in which to create the NAT gateway.

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

    The tags to assign to the NAT gateway.

Returns:

See Also:

#create_network_acl(options = {}) ⇒ Types::CreateNetworkAclResult

Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a network ACL


# This example creates a network ACL for the specified VPC.

resp = client.create_network_acl({
  vpc_id: "vpc-a01106c2", 
})

# resp.to_h outputs the following:
{
  network_acl: {
    associations: [
    ], 
    entries: [
      {
        cidr_block: "0.0.0.0/0", 
        egress: true, 
        protocol: "-1", 
        rule_action: "deny", 
        rule_number: 32767, 
      }, 
      {
        cidr_block: "0.0.0.0/0", 
        egress: false, 
        protocol: "-1", 
        rule_action: "deny", 
        rule_number: 32767, 
      }, 
    ], 
    is_default: false, 
    network_acl_id: "acl-5fb85d36", 
    tags: [
    ], 
    vpc_id: "vpc-a01106c2", 
  }, 
}

Request syntax with placeholder values


resp = client.create_network_acl({
  dry_run: false,
  vpc_id: "VpcId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.network_acl.associations #=> Array
resp.network_acl.associations[0].network_acl_association_id #=> String
resp.network_acl.associations[0].network_acl_id #=> String
resp.network_acl.associations[0].subnet_id #=> String
resp.network_acl.entries #=> Array
resp.network_acl.entries[0].cidr_block #=> String
resp.network_acl.entries[0].egress #=> true/false
resp.network_acl.entries[0].icmp_type_code.code #=> Integer
resp.network_acl.entries[0].icmp_type_code.type #=> Integer
resp.network_acl.entries[0].ipv_6_cidr_block #=> String
resp.network_acl.entries[0].port_range.from #=> Integer
resp.network_acl.entries[0].port_range.to #=> Integer
resp.network_acl.entries[0].protocol #=> String
resp.network_acl.entries[0].rule_action #=> String, one of "allow", "deny"
resp.network_acl.entries[0].rule_number #=> Integer
resp.network_acl.is_default #=> true/false
resp.network_acl.network_acl_id #=> String
resp.network_acl.tags #=> Array
resp.network_acl.tags[0].key #=> String
resp.network_acl.tags[0].value #=> String
resp.network_acl.vpc_id #=> String
resp.network_acl.owner_id #=> String

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.

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

    The tags to assign to the network ACL.

Returns:

See Also:

#create_network_acl_entry(options = {}) ⇒ Struct

Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a network ACL entry


# This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet.

resp = client.create_network_acl_entry({
  cidr_block: "0.0.0.0/0", 
  egress: false, 
  network_acl_id: "acl-5fb85d36", 
  port_range: {
    from: 53, 
    to: 53, 
  }, 
  protocol: "17", 
  rule_action: "allow", 
  rule_number: 100, 
})

Request syntax with placeholder values


resp = client.create_network_acl_entry({
  cidr_block: "String",
  dry_run: false,
  egress: false, # required
  icmp_type_code: {
    code: 1,
    type: 1,
  },
  ipv_6_cidr_block: "String",
  network_acl_id: "NetworkAclId", # required
  port_range: {
    from: 1,
    to: 1,
  },
  protocol: "String", # required
  rule_action: "allow", # required, accepts allow, deny
  rule_number: 1, # required
})

Options Hash (options):

  • :cidr_block (String)

    The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

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

  • :egress (required, Boolean)

    Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

  • :icmp_type_code (Types::IcmpTypeCode)

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

  • :ipv_6_cidr_block (String)

    The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64).

  • :network_acl_id (required, String)

    The ID of the network ACL.

  • :port_range (Types::PortRange)

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

  • :protocol (required, String)

    The protocol number. A value of \"-1\" means all protocols. If you specify \"-1\" or a protocol number other than \"6\" (TCP), \"17\" (UDP), or \"1\" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol \"58\" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol \"58\" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • :rule_action (required, String)

    Indicates whether to allow or deny the traffic that matches the rule.

  • :rule_number (required, Integer)

    The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

    Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_network_interface(options = {}) ⇒ Types::CreateNetworkInterfaceResult

Creates a network interface in the specified subnet.

For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a network interface


# This example creates a network interface for the specified subnet.

resp = client.create_network_interface({
  description: "my network interface", 
  groups: [
    "sg-903004f8", 
  ], 
  private_ip_address: "10.0.2.17", 
  subnet_id: "subnet-9d4a7b6c", 
})

# resp.to_h outputs the following:
{
  network_interface: {
    availability_zone: "us-east-1d", 
    description: "my network interface", 
    groups: [
      {
        group_id: "sg-903004f8", 
        group_name: "default", 
      }, 
    ], 
    mac_address: "02:1a:80:41:52:9c", 
    network_interface_id: "eni-e5aa89a3", 
    owner_id: "123456789012", 
    private_ip_address: "10.0.2.17", 
    private_ip_addresses: [
      {
        primary: true, 
        private_ip_address: "10.0.2.17", 
      }, 
    ], 
    requester_managed: false, 
    source_dest_check: true, 
    status: "pending", 
    subnet_id: "subnet-9d4a7b6c", 
    tag_set: [
    ], 
    vpc_id: "vpc-a01106c2", 
  }, 
}

Request syntax with placeholder values


resp = client.create_network_interface({
  description: "String",
  dry_run: false,
  groups: ["SecurityGroupId"],
  ipv_6_address_count: 1,
  ipv_6_addresses: [
    {
      ipv_6_address: "String",
    },
  ],
  private_ip_address: "String",
  private_ip_addresses: [
    {
      primary: false,
      private_ip_address: "String",
    },
  ],
  secondary_private_ip_address_count: 1,
  interface_type: "efa", # accepts efa
  subnet_id: "SubnetId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.network_interface.association.allocation_id #=> String
resp.network_interface.association.association_id #=> String
resp.network_interface.association.ip_owner_id #=> String
resp.network_interface.association.public_dns_name #=> String
resp.network_interface.association.public_ip #=> String
resp.network_interface.association.customer_owned_ip #=> String
resp.network_interface.association.carrier_ip #=> String
resp.network_interface.attachment.attach_time #=> Time
resp.network_interface.attachment.attachment_id #=> String
resp.network_interface.attachment.delete_on_termination #=> true/false
resp.network_interface.attachment.device_index #=> Integer
resp.network_interface.attachment.network_card_index #=> Integer
resp.network_interface.attachment.instance_id #=> String
resp.network_interface.attachment.instance_owner_id #=> String
resp.network_interface.attachment.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.network_interface.availability_zone #=> String
resp.network_interface.description #=> String
resp.network_interface.groups #=> Array
resp.network_interface.groups[0].group_name #=> String
resp.network_interface.groups[0].group_id #=> String
resp.network_interface.interface_type #=> String, one of "interface", "natGateway", "efa"
resp.network_interface.ipv_6_addresses #=> Array
resp.network_interface.ipv_6_addresses[0].ipv_6_address #=> String
resp.network_interface.mac_address #=> String
resp.network_interface.network_interface_id #=> String
resp.network_interface.outpost_arn #=> String
resp.network_interface.owner_id #=> String
resp.network_interface.private_dns_name #=> String
resp.network_interface.private_ip_address #=> String
resp.network_interface.private_ip_addresses #=> Array
resp.network_interface.private_ip_addresses[0].association.allocation_id #=> String
resp.network_interface.private_ip_addresses[0].association.association_id #=> String
resp.network_interface.private_ip_addresses[0].association.ip_owner_id #=> String
resp.network_interface.private_ip_addresses[0].association.public_dns_name #=> String
resp.network_interface.private_ip_addresses[0].association.public_ip #=> String
resp.network_interface.private_ip_addresses[0].association.customer_owned_ip #=> String
resp.network_interface.private_ip_addresses[0].association.carrier_ip #=> String
resp.network_interface.private_ip_addresses[0].primary #=> true/false
resp.network_interface.private_ip_addresses[0].private_dns_name #=> String
resp.network_interface.private_ip_addresses[0].private_ip_address #=> String
resp.network_interface.requester_id #=> String
resp.network_interface.requester_managed #=> true/false
resp.network_interface.source_dest_check #=> true/false
resp.network_interface.status #=> String, one of "available", "associated", "attaching", "in-use", "detaching"
resp.network_interface.subnet_id #=> String
resp.network_interface.tag_set #=> Array
resp.network_interface.tag_set[0].key #=> String
resp.network_interface.tag_set[0].value #=> String
resp.network_interface.vpc_id #=> String

Options Hash (options):

  • :description (String)

    A description for the network interface.

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

  • :groups (Array<String>)

    The IDs of one or more security groups.

  • :ipv_6_address_count (Integer)

    The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can\'t use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 to override this setting.

  • :ipv_6_addresses (Array<Types::InstanceIpv6Address>)

    One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can\'t use this option if you\'re specifying a number of IPv6 addresses.

  • :private_ip_address (String)

    The primary private IPv4 address of the network interface. If you don\'t specify an IPv4 address, Amazon EC2 selects one for you from the subnet\'s IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).

  • :private_ip_addresses (Array<Types::PrivateIpAddressSpecification>)

    One or more private IPv4 addresses.

  • :secondary_private_ip_address_count (Integer)

    The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet\'s IPv4 CIDR range. You can\'t specify this option and specify more than one private IP address using privateIpAddresses.

    The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide.

  • :interface_type (String)

    Indicates the type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa. For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide.

  • :subnet_id (required, String)

    The ID of the subnet to associate with the network interface.

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

    The tags to apply to the new network interface.

Returns:

See Also:

#create_network_interface_permission(options = {}) ⇒ Types::CreateNetworkInterfacePermissionResult

Grants an AWS-authorized account permission to attach the specified network interface to an instance in their account.

You can grant permission to a single AWS account only, and only one account at a time.

Examples:

Request syntax with placeholder values


resp = client.create_network_interface_permission({
  network_interface_id: "NetworkInterfaceId", # required
  aws_account_id: "String",
  aws_service: "String",
  permission: "INSTANCE-ATTACH", # required, accepts INSTANCE-ATTACH, EIP-ASSOCIATE
  dry_run: false,
})

Response structure


resp.interface_permission.network_interface_permission_id #=> String
resp.interface_permission.network_interface_id #=> String
resp.interface_permission. #=> String
resp.interface_permission.aws_service #=> String
resp.interface_permission.permission #=> String, one of "INSTANCE-ATTACH", "EIP-ASSOCIATE"
resp.interface_permission.permission_state.state #=> String, one of "pending", "granted", "revoking", "revoked"
resp.interface_permission.permission_state.status_message #=> String

Options Hash (options):

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :aws_account_id (String)

    The AWS account ID.

  • :aws_service (String)

    The AWS service. Currently not supported.

  • :permission (required, String)

    The type of permission to grant.

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

See Also:

#create_placement_group(options = {}) ⇒ Types::CreatePlacementGroupResult

Creates a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.

A cluster placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A spread placement group places instances on distinct hardware. A partition placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.

For more information, see Placement groups in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a placement group


# This example creates a placement group with the specified name.

resp = client.create_placement_group({
  group_name: "my-cluster", 
  strategy: "cluster", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.create_placement_group({
  dry_run: false,
  group_name: "String",
  strategy: "cluster", # accepts cluster, spread, partition
  partition_count: 1,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.placement_group.group_name #=> String
resp.placement_group.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.placement_group.strategy #=> String, one of "cluster", "spread", "partition"
resp.placement_group.partition_count #=> Integer
resp.placement_group.group_id #=> String
resp.placement_group.tags #=> Array
resp.placement_group.tags[0].key #=> String
resp.placement_group.tags[0].value #=> String

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.

  • :group_name (String)

    A name for the placement group. Must be unique within the scope of your account for the Region.

    Constraints: Up to 255 ASCII characters

  • :strategy (String)

    The placement strategy.

  • :partition_count (Integer)

    The number of partitions. Valid only when Strategy is set to partition.

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

    The tags to apply to the new placement group.

Returns:

See Also:

#create_reserved_instances_listing(options = {}) ⇒ Types::CreateReservedInstancesListingResult

Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation.

Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances cannot be sold.

The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_reserved_instances_listing({
  client_token: "String", # required
  instance_count: 1, # required
  price_schedules: [ # required
    {
      currency_code: "USD", # accepts USD
      price: 1.0,
      term: 1,
    },
  ],
  reserved_instances_id: "ReservationId", # required
})

Response structure


resp.reserved_instances_listings #=> Array
resp.reserved_instances_listings[0].client_token #=> String
resp.reserved_instances_listings[0].create_date #=> Time
resp.reserved_instances_listings[0].instance_counts #=> Array
resp.reserved_instances_listings[0].instance_counts[0].instance_count #=> Integer
resp.reserved_instances_listings[0].instance_counts[0].state #=> String, one of "available", "sold", "cancelled", "pending"
resp.reserved_instances_listings[0].price_schedules #=> Array
resp.reserved_instances_listings[0].price_schedules[0].active #=> true/false
resp.reserved_instances_listings[0].price_schedules[0].currency_code #=> String, one of "USD"
resp.reserved_instances_listings[0].price_schedules[0].price #=> Float
resp.reserved_instances_listings[0].price_schedules[0].term #=> Integer
resp.reserved_instances_listings[0].reserved_instances_id #=> String
resp.reserved_instances_listings[0].reserved_instances_listing_id #=> String
resp.reserved_instances_listings[0].status #=> String, one of "active", "pending", "cancelled", "closed"
resp.reserved_instances_listings[0].status_message #=> String
resp.reserved_instances_listings[0].tags #=> Array
resp.reserved_instances_listings[0].tags[0].key #=> String
resp.reserved_instances_listings[0].tags[0].value #=> String
resp.reserved_instances_listings[0].update_date #=> Time

Options Hash (options):

  • :client_token (required, String)

    Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.

  • :instance_count (required, Integer)

    The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.

  • :price_schedules (required, Array<Types::PriceScheduleSpecification>)

    A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.

  • :reserved_instances_id (required, String)

    The ID of the active Standard Reserved Instance.

Returns:

See Also:

#create_route(options = {}) ⇒ Types::CreateRouteResult

Creates a route in a route table within a VPC.

You must specify one of the following targets: internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.

When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3, and the route table includes the following two IPv4 routes:

  • 192.0.2.0/24 (goes to some target A)

  • 192.0.2.0/28 (goes to some target B)

Both routes apply to the traffic destined for 192.0.2.3. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a route


# This example creates a route for the specified route table. The route matches all traffic (0.0.0.0/0) and routes it to the specified Internet gateway.

resp = client.create_route({
  destination_cidr_block: "0.0.0.0/0", 
  gateway_id: "igw-c0a643a9", 
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.create_route({
  destination_cidr_block: "String",
  destination_ipv_6_cidr_block: "String",
  destination_prefix_list_id: "PrefixListResourceId",
  dry_run: false,
  vpc_endpoint_id: "VpcEndpointId",
  egress_only_internet_gateway_id: "EgressOnlyInternetGatewayId",
  gateway_id: "RouteGatewayId",
  instance_id: "InstanceId",
  nat_gateway_id: "NatGatewayId",
  transit_gateway_id: "TransitGatewayId",
  local_gateway_id: "LocalGatewayId",
  carrier_gateway_id: "CarrierGatewayId",
  network_interface_id: "NetworkInterfaceId",
  route_table_id: "RouteTableId", # required
  vpc_peering_connection_id: "VpcPeeringConnectionId",
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :destination_cidr_block (String)

    The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

  • :destination_ipv_6_cidr_block (String)

    The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.

  • :destination_prefix_list_id (String)

    The ID of a prefix list used for the destination match.

  • :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_endpoint_id (String)

    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

  • :egress_only_internet_gateway_id (String)

    [IPv6 traffic only] The ID of an egress-only internet gateway.

  • :gateway_id (String)

    The ID of an internet gateway or virtual private gateway attached to your VPC.

  • :instance_id (String)

    The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

  • :nat_gateway_id (String)

    [IPv4 traffic only] The ID of a NAT gateway.

  • :transit_gateway_id (String)

    The ID of a transit gateway.

  • :local_gateway_id (String)

    The ID of the local gateway.

  • :carrier_gateway_id (String)

    The ID of the carrier gateway.

    You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.

  • :network_interface_id (String)

    The ID of a network interface.

  • :route_table_id (required, String)

    The ID of the route table for the route.

  • :vpc_peering_connection_id (String)

    The ID of a VPC peering connection.

Returns:

See Also:

#create_route_table(options = {}) ⇒ Types::CreateRouteTableResult

Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a route table


# This example creates a route table for the specified VPC.

resp = client.create_route_table({
  vpc_id: "vpc-a01106c2", 
})

# resp.to_h outputs the following:
{
  route_table: {
    associations: [
    ], 
    propagating_vgws: [
    ], 
    route_table_id: "rtb-22574640", 
    routes: [
      {
        destination_cidr_block: "10.0.0.0/16", 
        gateway_id: "local", 
        state: "active", 
      }, 
    ], 
    tags: [
    ], 
    vpc_id: "vpc-a01106c2", 
  }, 
}

Request syntax with placeholder values


resp = client.create_route_table({
  dry_run: false,
  vpc_id: "VpcId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.route_table.associations #=> Array
resp.route_table.associations[0].main #=> true/false
resp.route_table.associations[0].route_table_association_id #=> String
resp.route_table.associations[0].route_table_id #=> String
resp.route_table.associations[0].subnet_id #=> String
resp.route_table.associations[0].gateway_id #=> String
resp.route_table.associations[0].association_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failed"
resp.route_table.associations[0].association_state.status_message #=> String
resp.route_table.propagating_vgws #=> Array
resp.route_table.propagating_vgws[0].gateway_id #=> String
resp.route_table.route_table_id #=> String
resp.route_table.routes #=> Array
resp.route_table.routes[0].destination_cidr_block #=> String
resp.route_table.routes[0].destination_ipv_6_cidr_block #=> String
resp.route_table.routes[0].destination_prefix_list_id #=> String
resp.route_table.routes[0].egress_only_internet_gateway_id #=> String
resp.route_table.routes[0].gateway_id #=> String
resp.route_table.routes[0].instance_id #=> String
resp.route_table.routes[0].instance_owner_id #=> String
resp.route_table.routes[0].nat_gateway_id #=> String
resp.route_table.routes[0].transit_gateway_id #=> String
resp.route_table.routes[0].local_gateway_id #=> String
resp.route_table.routes[0].carrier_gateway_id #=> String
resp.route_table.routes[0].network_interface_id #=> String
resp.route_table.routes[0].origin #=> String, one of "CreateRouteTable", "CreateRoute", "EnableVgwRoutePropagation"
resp.route_table.routes[0].state #=> String, one of "active", "blackhole"
resp.route_table.routes[0].vpc_peering_connection_id #=> String
resp.route_table.tags #=> Array
resp.route_table.tags[0].key #=> String
resp.route_table.tags[0].value #=> String
resp.route_table.vpc_id #=> String
resp.route_table.owner_id #=> String

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.

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

    The tags to assign to the route table.

Returns:

See Also:

#create_security_group(options = {}) ⇒ Types::CreateSecurityGroupResult

Creates a security group.

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.

For more information about VPC security group limits, see Amazon VPC Limits.

Examples:

Example: To create a security group for a VPC


# This example creates a security group for the specified VPC.

resp = client.create_security_group({
  description: "My security group", 
  group_name: "my-security-group", 
  vpc_id: "vpc-1a2b3c4d", 
})

# resp.to_h outputs the following:
{
  group_id: "sg-903004f8", 
}

Request syntax with placeholder values


resp = client.create_security_group({
  description: "String", # required
  group_name: "String", # required
  vpc_id: "VpcId",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.group_id #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :description (required, String)

    A description for the security group. This is informational only.

    Constraints: Up to 255 characters in length

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • :group_name (required, String)

    The name of the security group.

    Constraints: Up to 255 characters in length. Cannot start with sg-.

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • :vpc_id (String)

    [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

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

    The tags to assign to the security group.

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

See Also:

#create_snapshot(options = {}) ⇒ Types::Snapshot

Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

When a snapshot is created, any AWS Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your EBS volume at the time the snapshot command is issued; this may exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending.

To create a snapshot for EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

You can tag your snapshots during creation. For more information, see Tagging your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

For more information, see Amazon Elastic Block Store and Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a snapshot


# This example creates a snapshot of the volume with a volume ID of ``vol-1234567890abcdef0`` and a short description to identify the snapshot.

resp = client.create_snapshot({
  description: "This is my root volume snapshot.", 
  volume_id: "vol-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  description: "This is my root volume snapshot.", 
  owner_id: "012345678910", 
  snapshot_id: "snap-066877671789bd71b", 
  start_time: Time.parse("2014-02-28T21:06:01.000Z"), 
  state: "pending", 
  tags: [
  ], 
  volume_id: "vol-1234567890abcdef0", 
  volume_size: 8, 
}

Request syntax with placeholder values


resp = client.create_snapshot({
  description: "String",
  volume_id: "VolumeId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.data_encryption_key_id #=> String
resp.description #=> String
resp.encrypted #=> true/false
resp.kms_key_id #=> String
resp.owner_id #=> String
resp.progress #=> String
resp.snapshot_id #=> String
resp.start_time #=> Time
resp.state #=> String, one of "pending", "completed", "error"
resp.state_message #=> String
resp.volume_id #=> String
resp.volume_size #=> Integer
resp.owner_alias #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :description (String)

    A description for the snapshot.

  • :volume_id (required, String)

    The ID of the EBS volume.

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

    The tags to apply to the snapshot during creation.

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

See Also:

#create_snapshots(options = {}) ⇒ Types::CreateSnapshotsResult

Creates crash-consistent snapshots of multiple EBS volumes and stores the data in S3. Volumes are chosen by specifying an instance. Any attached volumes will produce one snapshot each that is crash-consistent across the instance. Boot volumes can be excluded by changing the parameters.

Examples:

Request syntax with placeholder values


resp = client.create_snapshots({
  description: "String",
  instance_specification: { # required
    instance_id: "InstanceId",
    exclude_boot_volume: false,
  },
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
  copy_tags_from_source: "volume", # accepts volume
})

Response structure


resp.snapshots #=> Array
resp.snapshots[0].description #=> String
resp.snapshots[0].tags #=> Array
resp.snapshots[0].tags[0].key #=> String
resp.snapshots[0].tags[0].value #=> String
resp.snapshots[0].encrypted #=> true/false
resp.snapshots[0].volume_id #=> String
resp.snapshots[0].state #=> String, one of "pending", "completed", "error"
resp.snapshots[0].volume_size #=> Integer
resp.snapshots[0].start_time #=> Time
resp.snapshots[0].progress #=> String
resp.snapshots[0].owner_id #=> String
resp.snapshots[0].snapshot_id #=> String

Options Hash (options):

  • :description (String)

    A description propagated to every snapshot specified by the instance.

  • :instance_specification (required, Types::InstanceSpecification)

    The instance to specify which volumes should be included in the snapshots.

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

    Tags to apply to every snapshot specified by the instance.

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

  • :copy_tags_from_source (String)

    Copies the tags from the specified volume to corresponding snapshot.

Returns:

See Also:

#create_spot_datafeed_subscription(options = {}) ⇒ Types::CreateSpotDatafeedSubscriptionResult

Creates a data feed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per AWS account. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances.

Examples:

Example: To create a Spot Instance datafeed


# This example creates a Spot Instance data feed for your AWS account.

resp = client.create_spot_datafeed_subscription({
  bucket: "my-s3-bucket", 
  prefix: "spotdata", 
})

# resp.to_h outputs the following:
{
  spot_datafeed_subscription: {
    bucket: "my-s3-bucket", 
    owner_id: "123456789012", 
    prefix: "spotdata", 
    state: "Active", 
  }, 
}

Request syntax with placeholder values


resp = client.create_spot_datafeed_subscription({
  bucket: "String", # required
  dry_run: false,
  prefix: "String",
})

Response structure


resp.spot_datafeed_subscription.bucket #=> String
resp.spot_datafeed_subscription.fault.code #=> String
resp.spot_datafeed_subscription.fault.message #=> String
resp.spot_datafeed_subscription.owner_id #=> String
resp.spot_datafeed_subscription.prefix #=> String
resp.spot_datafeed_subscription.state #=> String, one of "Active", "Inactive"

Options Hash (options):

  • :bucket (required, String)

    The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For more information about bucket names, see Rules for bucket naming in the Amazon S3 Developer Guide.

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

  • :prefix (String)

    The prefix for the data feed file names.

Returns:

See Also:

#create_subnet(options = {}) ⇒ Types::CreateSubnetResult

Creates a subnet in a specified VPC.

You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the CIDR block of an existing subnet in the VPC.

If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.

AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

When you stop an instance in a subnet, it retains its private IPv4 address. It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

For more information about subnets, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To create a subnet


# This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you.

resp = client.create_subnet({
  cidr_block: "10.0.1.0/24", 
  vpc_id: "vpc-a01106c2", 
})

# resp.to_h outputs the following:
{
  subnet: {
    availability_zone: "us-west-2c", 
    available_ip_address_count: 251, 
    cidr_block: "10.0.1.0/24", 
    state: "pending", 
    subnet_id: "subnet-9d4a7b6c", 
    vpc_id: "vpc-a01106c2", 
  }, 
}

Request syntax with placeholder values


resp = client.create_subnet({
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  availability_zone: "String",
  availability_zone_id: "String",
  cidr_block: "String", # required
  ipv_6_cidr_block: "String",
  outpost_arn: "String",
  vpc_id: "VpcId", # required
  dry_run: false,
})

Response structure


resp.subnet.availability_zone #=> String
resp.subnet.availability_zone_id #=> String
resp.subnet.available_ip_address_count #=> Integer
resp.subnet.cidr_block #=> String
resp.subnet.default_for_az #=> true/false
resp.subnet.map_public_ip_on_launch #=> true/false
resp.subnet.map_customer_owned_ip_on_launch #=> true/false
resp.subnet.customer_owned_ipv_4_pool #=> String
resp.subnet.state #=> String, one of "pending", "available"
resp.subnet.subnet_id #=> String
resp.subnet.vpc_id #=> String
resp.subnet.owner_id #=> String
resp.subnet.assign_ipv_6_address_on_creation #=> true/false
resp.subnet.ipv_6_cidr_block_association_set #=> Array
resp.subnet.ipv_6_cidr_block_association_set[0].association_id #=> String
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.subnet.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.subnet.tags #=> Array
resp.subnet.tags[0].key #=> String
resp.subnet.tags[0].value #=> String
resp.subnet.subnet_arn #=> String
resp.subnet.outpost_arn #=> String

Options Hash (options):

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

    The tags to assign to the subnet.

  • :availability_zone (String)

    The Availability Zone or Local Zone for the subnet.

    Default: AWS selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

    To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a. For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide.

    To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

  • :availability_zone_id (String)

    The AZ ID or the Local Zone ID of the subnet.

  • :cidr_block (required, String)

    The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

  • :ipv_6_cidr_block (String)

    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

  • :outpost_arn (String)

    The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.

  • :vpc_id (required, String)

    The ID of the VPC.

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

See Also:

#create_tags(options = {}) ⇒ Struct

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide. For more information about creating IAM policies that control users' access to resources based on tags, see Supported Resource-Level Permissions for Amazon EC2 API Actions in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To add a tag to a resource


# This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack.

resp = client.create_tags({
  resources: [
    "ami-78a54011", 
  ], 
  tags: [
    {
      key: "Stack", 
      value: "production", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.create_tags({
  dry_run: false,
  resources: ["TaggableResourceId"], # required
  tags: [ # required
    {
      key: "String",
      value: "String",
    },
  ],
})

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.

  • :resources (required, Array<String>)

    The IDs of the resources, separated by spaces.

    Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

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

  • (Struct)

    Returns an empty response.

See Also:

#create_traffic_mirror_filter(options = {}) ⇒ Types::CreateTrafficMirrorFilterResult

Creates a Traffic Mirror filter.

A Traffic Mirror filter is a set of rules that defines the traffic to mirror.

By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule to add Traffic Mirror rules to the filter. The rules you add define what traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices to mirror supported network services.

Examples:

Request syntax with placeholder values


resp = client.create_traffic_mirror_filter({
  description: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
  client_token: "String",
})

Response structure


resp.traffic_mirror_filter.traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules #=> Array
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter.ingress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter.ingress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].description #=> String
resp.traffic_mirror_filter.egress_filter_rules #=> Array
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter.egress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter.egress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].description #=> String
resp.traffic_mirror_filter.network_services #=> Array
resp.traffic_mirror_filter.network_services[0] #=> String, one of "amazon-dns"
resp.traffic_mirror_filter.description #=> String
resp.traffic_mirror_filter.tags #=> Array
resp.traffic_mirror_filter.tags[0].key #=> String
resp.traffic_mirror_filter.tags[0].value #=> String
resp.client_token #=> String

Options Hash (options):

  • :description (String)

    The description of the Traffic Mirror filter.

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

    The tags to assign to a Traffic Mirror filter.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_traffic_mirror_filter_rule(options = {}) ⇒ Types::CreateTrafficMirrorFilterRuleResult

Creates a Traffic Mirror filter rule.

A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.

You need the Traffic Mirror filter ID when you create the rule.

Examples:

Request syntax with placeholder values


resp = client.create_traffic_mirror_filter_rule({
  traffic_mirror_filter_id: "TrafficMirrorFilterId", # required
  traffic_direction: "ingress", # required, accepts ingress, egress
  rule_number: 1, # required
  rule_action: "accept", # required, accepts accept, reject
  destination_port_range: {
    from_port: 1,
    to_port: 1,
  },
  source_port_range: {
    from_port: 1,
    to_port: 1,
  },
  protocol: 1,
  destination_cidr_block: "String", # required
  source_cidr_block: "String", # required
  description: "String",
  dry_run: false,
  client_token: "String",
})

Response structure


resp.traffic_mirror_filter_rule.traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter_rule.traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter_rule.traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter_rule.rule_number #=> Integer
resp.traffic_mirror_filter_rule.rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter_rule.protocol #=> Integer
resp.traffic_mirror_filter_rule.destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter_rule.destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter_rule.source_port_range.from_port #=> Integer
resp.traffic_mirror_filter_rule.source_port_range.to_port #=> Integer
resp.traffic_mirror_filter_rule.destination_cidr_block #=> String
resp.traffic_mirror_filter_rule.source_cidr_block #=> String
resp.traffic_mirror_filter_rule.description #=> String
resp.client_token #=> String

Options Hash (options):

  • :traffic_mirror_filter_id (required, String)

    The ID of the filter that this rule is associated with.

  • :traffic_direction (required, String)

    The type of traffic (ingress | egress).

  • :rule_number (required, Integer)

    The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

  • :rule_action (required, String)

    The action to take (accept | reject) on the filtered traffic.

  • :destination_port_range (Types::TrafficMirrorPortRangeRequest)

    The destination port range.

  • :source_port_range (Types::TrafficMirrorPortRangeRequest)

    The source port range.

  • :protocol (Integer)

    The protocol, for example UDP, to assign to the Traffic Mirror rule.

    For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.

  • :destination_cidr_block (required, String)

    The destination CIDR block to assign to the Traffic Mirror rule.

  • :source_cidr_block (required, String)

    The source CIDR block to assign to the Traffic Mirror rule.

  • :description (String)

    The description of the Traffic Mirror rule.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_traffic_mirror_session(options = {}) ⇒ Types::CreateTrafficMirrorSessionResult

Creates a Traffic Mirror session.

A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it to the session to define a subset of the traffic to mirror, for example all TCP traffic.

The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.

By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to create filter rules that specify the traffic to mirror.

Examples:

Request syntax with placeholder values


resp = client.create_traffic_mirror_session({
  network_interface_id: "NetworkInterfaceId", # required
  traffic_mirror_target_id: "TrafficMirrorTargetId", # required
  traffic_mirror_filter_id: "TrafficMirrorFilterId", # required
  packet_length: 1,
  session_number: 1, # required
  virtual_network_id: 1,
  description: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
  client_token: "String",
})

Response structure


resp.traffic_mirror_session.traffic_mirror_session_id #=> String
resp.traffic_mirror_session.traffic_mirror_target_id #=> String
resp.traffic_mirror_session.traffic_mirror_filter_id #=> String
resp.traffic_mirror_session.network_interface_id #=> String
resp.traffic_mirror_session.owner_id #=> String
resp.traffic_mirror_session.packet_length #=> Integer
resp.traffic_mirror_session.session_number #=> Integer
resp.traffic_mirror_session.virtual_network_id #=> Integer
resp.traffic_mirror_session.description #=> String
resp.traffic_mirror_session.tags #=> Array
resp.traffic_mirror_session.tags[0].key #=> String
resp.traffic_mirror_session.tags[0].value #=> String
resp.client_token #=> String

Options Hash (options):

  • :network_interface_id (required, String)

    The ID of the source network interface.

  • :traffic_mirror_target_id (required, String)

    The ID of the Traffic Mirror target.

  • :traffic_mirror_filter_id (required, String)

    The ID of the Traffic Mirror filter.

  • :packet_length (Integer)

    The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target.

    If you do not want to mirror the entire packet, use the PacketLength parameter to specify the number of bytes in each packet to mirror.

  • :session_number (required, Integer)

    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

    Valid values are 1-32766.

  • :virtual_network_id (Integer)

    The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at random.

  • :description (String)

    The description of the Traffic Mirror session.

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

    The tags to assign to a Traffic Mirror session.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_traffic_mirror_target(options = {}) ⇒ Types::CreateTrafficMirrorTargetResult

Creates a target for your Traffic Mirror session.

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in different VPCs connected via VPC peering or a transit gateway.

A Traffic Mirror target can be a network interface, or a Network Load Balancer.

To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession.

Examples:

Request syntax with placeholder values


resp = client.create_traffic_mirror_target({
  network_interface_id: "NetworkInterfaceId",
  network_load_balancer_arn: "String",
  description: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
  client_token: "String",
})

Response structure


resp.traffic_mirror_target.traffic_mirror_target_id #=> String
resp.traffic_mirror_target.network_interface_id #=> String
resp.traffic_mirror_target.network_load_balancer_arn #=> String
resp.traffic_mirror_target.type #=> String, one of "network-interface", "network-load-balancer"
resp.traffic_mirror_target.description #=> String
resp.traffic_mirror_target.owner_id #=> String
resp.traffic_mirror_target.tags #=> Array
resp.traffic_mirror_target.tags[0].key #=> String
resp.traffic_mirror_target.tags[0].value #=> String
resp.client_token #=> String

Options Hash (options):

  • :network_interface_id (String)

    The network interface ID that is associated with the target.

  • :network_load_balancer_arn (String)

    The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.

  • :description (String)

    The description of the Traffic Mirror target.

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

    The tags to assign to the Traffic Mirror target.

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

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_transit_gateway(options = {}) ⇒ Types::CreateTransitGatewayResult

Creates a transit gateway.

You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.

To attach your VPCs, use CreateTransitGatewayVpcAttachment.

To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection.

When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway({
  description: "String",
  options: {
    amazon_side_asn: 1,
    auto_accept_shared_attachments: "enable", # accepts enable, disable
    default_route_table_association: "enable", # accepts enable, disable
    default_route_table_propagation: "enable", # accepts enable, disable
    vpn_ecmp_support: "enable", # accepts enable, disable
    dns_support: "enable", # accepts enable, disable
    multicast_support: "enable", # accepts enable, disable
  },
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.transit_gateway.transit_gateway_id #=> String
resp.transit_gateway.transit_gateway_arn #=> String
resp.transit_gateway.state #=> String, one of "pending", "available", "modifying", "deleting", "deleted"
resp.transit_gateway.owner_id #=> String
resp.transit_gateway.description #=> String
resp.transit_gateway.creation_time #=> Time
resp.transit_gateway.options.amazon_side_asn #=> Integer
resp.transit_gateway.options.auto_accept_shared_attachments #=> String, one of "enable", "disable"
resp.transit_gateway.options.default_route_table_association #=> String, one of "enable", "disable"
resp.transit_gateway.options.association_default_route_table_id #=> String
resp.transit_gateway.options.default_route_table_propagation #=> String, one of "enable", "disable"
resp.transit_gateway.options.propagation_default_route_table_id #=> String
resp.transit_gateway.options.vpn_ecmp_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.multicast_support #=> String, one of "enable", "disable"
resp.transit_gateway.tags #=> Array
resp.transit_gateway.tags[0].key #=> String
resp.transit_gateway.tags[0].value #=> String

Options Hash (options):

  • :description (String)

    A description of the transit gateway.

  • :options (Types::TransitGatewayRequestOptions)

    The transit gateway options.

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

    The tags to apply to the transit gateway.

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

See Also:

#create_transit_gateway_multicast_domain(options = {}) ⇒ Types::CreateTransitGatewayMulticastDomainResult

Creates a multicast domain using the specified transit gateway.

The transit gateway must be in the available state before you create a domain. Use DescribeTransitGateways to see the state of transit gateway.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_multicast_domain({
  transit_gateway_id: "TransitGatewayId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.transit_gateway_multicast_domain.transit_gateway_multicast_domain_id #=> String
resp.transit_gateway_multicast_domain.transit_gateway_id #=> String
resp.transit_gateway_multicast_domain.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_multicast_domain.creation_time #=> Time
resp.transit_gateway_multicast_domain.tags #=> Array
resp.transit_gateway_multicast_domain.tags[0].key #=> String
resp.transit_gateway_multicast_domain.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

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

    The tags for the transit gateway multicast domain.

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

See Also:

#create_transit_gateway_peering_attachment(options = {}) ⇒ Types::CreateTransitGatewayPeeringAttachmentResult

Requests a transit gateway peering attachment between the specified transit gateway (requester) and a peer transit gateway (accepter). The transit gateways must be in different Regions. The peer transit gateway can be in your account or a different AWS account.

After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_peering_attachment({
  transit_gateway_id: "TransitGatewayId", # required
  peer_transit_gateway_id: "TransitAssociationGatewayId", # required
  peer_account_id: "String", # required
  peer_region: "String", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.transit_gateway_peering_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.status.code #=> String
resp.transit_gateway_peering_attachment.status.message #=> String
resp.transit_gateway_peering_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_peering_attachment.creation_time #=> Time
resp.transit_gateway_peering_attachment.tags #=> Array
resp.transit_gateway_peering_attachment.tags[0].key #=> String
resp.transit_gateway_peering_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

  • :peer_transit_gateway_id (required, String)

    The ID of the peer transit gateway with which to create the peering attachment.

  • :peer_account_id (required, String)

    The AWS account ID of the owner of the peer transit gateway.

  • :peer_region (required, String)

    The Region where the peer transit gateway is located.

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

    The tags to apply to the transit gateway peering attachment.

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

See Also:

#create_transit_gateway_prefix_list_reference(options = {}) ⇒ Types::CreateTransitGatewayPrefixListReferenceResult

Creates a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_prefix_list_reference({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  prefix_list_id: "PrefixListResourceId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  blackhole: false,
  dry_run: false,
})

Response structure


resp.transit_gateway_prefix_list_reference.transit_gateway_route_table_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_owner_id #=> String
resp.transit_gateway_prefix_list_reference.state #=> String, one of "pending", "available", "modifying", "deleting"
resp.transit_gateway_prefix_list_reference.blackhole #=> true/false
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_id #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :prefix_list_id (required, String)

    The ID of the prefix list that is used for destination matches.

  • :transit_gateway_attachment_id (String)

    The ID of the attachment to which traffic is routed.

  • :blackhole (Boolean)

    Indicates whether to drop traffic that matches this route.

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

See Also:

#create_transit_gateway_route(options = {}) ⇒ Types::CreateTransitGatewayRouteResult

Creates a static route for the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_route({
  destination_cidr_block: "String", # required
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  blackhole: false,
  dry_run: false,
})

Response structure


resp.route.destination_cidr_block #=> String
resp.route.prefix_list_id #=> String
resp.route.transit_gateway_attachments #=> Array
resp.route.transit_gateway_attachments[0].resource_id #=> String
resp.route.transit_gateway_attachments[0].transit_gateway_attachment_id #=> String
resp.route.transit_gateway_attachments[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.route.type #=> String, one of "static", "propagated"
resp.route.state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :transit_gateway_attachment_id (String)

    The ID of the attachment.

  • :blackhole (Boolean)

    Indicates whether to drop traffic that matches this route.

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

See Also:

#create_transit_gateway_route_table(options = {}) ⇒ Types::CreateTransitGatewayRouteTableResult

Creates a route table for the specified transit gateway.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_route_table({
  transit_gateway_id: "TransitGatewayId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.transit_gateway_route_table.transit_gateway_route_table_id #=> String
resp.transit_gateway_route_table.transit_gateway_id #=> String
resp.transit_gateway_route_table.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_route_table.default_association_route_table #=> true/false
resp.transit_gateway_route_table.default_propagation_route_table #=> true/false
resp.transit_gateway_route_table.creation_time #=> Time
resp.transit_gateway_route_table.tags #=> Array
resp.transit_gateway_route_table.tags[0].key #=> String
resp.transit_gateway_route_table.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

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

    The tags to apply to the transit gateway route table.

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

See Also:

#create_transit_gateway_vpc_attachment(options = {}) ⇒ Types::CreateTransitGatewayVpcAttachmentResult

Attaches the specified VPC to the specified transit gateway.

If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.

To send VPC traffic to an attached transit gateway, add a route to the VPC route table using CreateRoute.

Examples:

Request syntax with placeholder values


resp = client.create_transit_gateway_vpc_attachment({
  transit_gateway_id: "TransitGatewayId", # required
  vpc_id: "VpcId", # required
  subnet_ids: ["SubnetId"], # required
  options: {
    dns_support: "enable", # accepts enable, disable
    ipv_6_support: "enable", # accepts enable, disable
    appliance_mode_support: "enable", # accepts enable, disable
  },
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachment.transit_gateway_id #=> String
resp.transit_gateway_vpc_attachment.vpc_id #=> String
resp.transit_gateway_vpc_attachment.vpc_owner_id #=> String
resp.transit_gateway_vpc_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachment.subnet_ids #=> Array
resp.transit_gateway_vpc_attachment.subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachment.creation_time #=> Time
resp.transit_gateway_vpc_attachment.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.tags #=> Array
resp.transit_gateway_vpc_attachment.tags[0].key #=> String
resp.transit_gateway_vpc_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

  • :vpc_id (required, String)

    The ID of the VPC.

  • :subnet_ids (required, Array<String>)

    The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.

  • :options (Types::CreateTransitGatewayVpcAttachmentRequestOptions)

    The VPC attachment options.

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

    The tags to apply to the VPC attachment.

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

See Also:

#create_volume(options = {}) ⇒ Types::Volume

Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints.

You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes. Encrypted volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

You can tag your volumes during creation. For more information, see Tagging your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.

For more information, see Creating an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a new volume


# This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone ``us-east-1a``.

resp = client.create_volume({
  availability_zone: "us-east-1a", 
  size: 80, 
  volume_type: "gp2", 
})

# resp.to_h outputs the following:
{
  availability_zone: "us-east-1a", 
  create_time: Time.parse("2016-08-29T18:52:32.724Z"), 
  encrypted: false, 
  iops: 240, 
  size: 80, 
  snapshot_id: "", 
  state: "creating", 
  volume_id: "vol-6b60b7c7", 
  volume_type: "gp2", 
}

Example: To create a new Provisioned IOPS (SSD) volume from a snapshot


# This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone ``us-east-1a``.

resp = client.create_volume({
  availability_zone: "us-east-1a", 
  iops: 1000, 
  snapshot_id: "snap-066877671789bd71b", 
  volume_type: "io1", 
})

# resp.to_h outputs the following:
{
  attachments: [
  ], 
  availability_zone: "us-east-1a", 
  create_time: Time.parse("2016-08-29T18:52:32.724Z"), 
  iops: 1000, 
  size: 500, 
  snapshot_id: "snap-066877671789bd71b", 
  state: "creating", 
  tags: [
  ], 
  volume_id: "vol-1234567890abcdef0", 
  volume_type: "io1", 
}

Request syntax with placeholder values


resp = client.create_volume({
  availability_zone: "String", # required
  encrypted: false,
  iops: 1,
  kms_key_id: "KmsKeyId",
  outpost_arn: "String",
  size: 1,
  snapshot_id: "SnapshotId",
  volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
  dry_run: false,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  multi_attach_enabled: false,
})

Response structure


resp.attachments #=> Array
resp.attachments[0].attach_time #=> Time
resp.attachments[0].device #=> String
resp.attachments[0].instance_id #=> String
resp.attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached", "busy"
resp.attachments[0].volume_id #=> String
resp.attachments[0].delete_on_termination #=> true/false
resp.availability_zone #=> String
resp.create_time #=> Time
resp.encrypted #=> true/false
resp.kms_key_id #=> String
resp.outpost_arn #=> String
resp.size #=> Integer
resp.snapshot_id #=> String
resp.state #=> String, one of "creating", "available", "in-use", "deleting", "deleted", "error"
resp.volume_id #=> String
resp.iops #=> Integer
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.fast_restored #=> true/false
resp.multi_attach_enabled #=> true/false

Options Hash (options):

  • :availability_zone (required, String)

    The Availability Zone in which to create the volume.

  • :encrypted (Boolean)

    Specifies whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide.

    Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

  • :iops (Integer)

    The number of I/O operations per second (IOPS) to provision for an io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB for io2. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on Nitro-based instances. Other instance families guarantee performance up to 32,000 IOPS. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide.

    This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes.

  • :kms_key_id (String)

    The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

    You can specify the CMK using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

    • Key alias. For example, alias/ExampleAlias.

    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • :outpost_arn (String)

    The Amazon Resource Name (ARN) of the Outpost.

  • :size (Integer)

    The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size.

    Constraints: 1-16,384 for gp2, 4-16,384 for io1 and io2, 500-16,384 for st1, 500-16,384 for sc1, and 1-1,024 for standard. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

    Default: If you\'re creating the volume from a snapshot and don\'t specify a volume size, the default is the snapshot size.

  • :snapshot_id (String)

    The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.

  • :volume_type (String)

    The volume type. This can be gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

    Default: gp2

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

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

    The tags to apply to the volume during creation.

  • :multi_attach_enabled (Boolean)

    Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Nitro-based instances in the same Availability Zone. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide.

Returns:

See Also:

#create_vpc(options = {}) ⇒ Types::CreateVpcResult

Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). For more information about how large to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP).

By default, each instance you launch in the VPC has the default DHCP options, which include only a default DNS server that we provide (AmazonProvidedDNS). For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To create a VPC


# This example creates a VPC with the specified CIDR block.

resp = client.create_vpc({
  cidr_block: "10.0.0.0/16", 
})

# resp.to_h outputs the following:
{
  vpc: {
    cidr_block: "10.0.0.0/16", 
    dhcp_options_id: "dopt-7a8b9c2d", 
    instance_tenancy: "default", 
    state: "pending", 
    vpc_id: "vpc-a01106c2", 
  }, 
}

Request syntax with placeholder values


resp = client.create_vpc({
  cidr_block: "String", # required
  amazon_provided_ipv_6_cidr_block: false,
  ipv_6_pool: "Ipv6PoolEc2Id",
  ipv_6_cidr_block: "String",
  dry_run: false,
  instance_tenancy: "default", # accepts default, dedicated, host
  ipv_6_cidr_block_network_border_group: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.vpc.cidr_block #=> String
resp.vpc.dhcp_options_id #=> String
resp.vpc.state #=> String, one of "pending", "available"
resp.vpc.vpc_id #=> String
resp.vpc.owner_id #=> String
resp.vpc.instance_tenancy #=> String, one of "default", "dedicated", "host"
resp.vpc.ipv_6_cidr_block_association_set #=> Array
resp.vpc.ipv_6_cidr_block_association_set[0].association_id #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].network_border_group #=> String
resp.vpc.ipv_6_cidr_block_association_set[0].ipv_6_pool #=> String
resp.vpc.cidr_block_association_set #=> Array
resp.vpc.cidr_block_association_set[0].association_id #=> String
resp.vpc.cidr_block_association_set[0].cidr_block #=> String
resp.vpc.cidr_block_association_set[0].cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpc.cidr_block_association_set[0].cidr_block_state.status_message #=> String
resp.vpc.is_default #=> true/false
resp.vpc.tags #=> Array
resp.vpc.tags[0].key #=> String
resp.vpc.tags[0].value #=> String

Options Hash (options):

  • :cidr_block (required, String)

    The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

  • :amazon_provided_ipv_6_cidr_block (Boolean)

    Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.

  • :ipv_6_pool (String)

    The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

  • :ipv_6_cidr_block (String)

    The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

    To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

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

  • :instance_tenancy (String)

    The tenancy options for instances launched into the VPC. For default, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • :ipv_6_cidr_block_network_border_group (String)

    The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.

    You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

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

    The tags to assign to the VPC.

Returns:

See Also:

#create_vpc_endpoint(options = {}) ⇒ Types::CreateVpcEndpointResult

Creates a VPC endpoint for a specified service. An endpoint enables you to create a private connection between your VPC and the service. The service may be provided by AWS, an AWS Marketplace Partner, or another AWS account. For more information, see VPC Endpoints in the Amazon Virtual Private Cloud User Guide.

A gateway endpoint serves as a target for a route in your route table for traffic destined for the AWS service. You can specify an endpoint policy to attach to the endpoint, which will control access to the service from your VPC. You can also specify the VPC route tables that use the endpoint.

An interface endpoint is a network interface in your subnet that serves as an endpoint for communicating with the specified service. You can specify the subnets in which to create an endpoint, and the security groups to associate with the endpoint network interface.

A GatewayLoadBalancer endpoint is a network interface in your subnet that serves an endpoint for communicating with a Gateway Load Balancer that you've configured as a VPC endpoint service.

Use DescribeVpcEndpointServices to get a list of supported services.

Examples:

Request syntax with placeholder values


resp = client.create_vpc_endpoint({
  dry_run: false,
  vpc_endpoint_type: "Interface", # accepts Interface, Gateway, GatewayLoadBalancer
  vpc_id: "VpcId", # required
  service_name: "String", # required
  policy_document: "String",
  route_table_ids: ["RouteTableId"],
  subnet_ids: ["SubnetId"],
  security_group_ids: ["SecurityGroupId"],
  client_token: "String",
  private_dns_enabled: false,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.vpc_endpoint.vpc_endpoint_id #=> String
resp.vpc_endpoint.vpc_endpoint_type #=> String, one of "Interface", "Gateway", "GatewayLoadBalancer"
resp.vpc_endpoint.vpc_id #=> String
resp.vpc_endpoint.service_name #=> String
resp.vpc_endpoint.state #=> String, one of "PendingAcceptance", "Pending", "Available", "Deleting", "Deleted", "Rejected", "Failed", "Expired"
resp.vpc_endpoint.policy_document #=> String
resp.vpc_endpoint.route_table_ids #=> Array
resp.vpc_endpoint.route_table_ids[0] #=> String
resp.vpc_endpoint.subnet_ids #=> Array
resp.vpc_endpoint.subnet_ids[0] #=> String
resp.vpc_endpoint.groups #=> Array
resp.vpc_endpoint.groups[0].group_id #=> String
resp.vpc_endpoint.groups[0].group_name #=> String
resp.vpc_endpoint.private_dns_enabled #=> true/false
resp.vpc_endpoint.requester_managed #=> true/false
resp.vpc_endpoint.network_interface_ids #=> Array
resp.vpc_endpoint.network_interface_ids[0] #=> String
resp.vpc_endpoint.dns_entries #=> Array
resp.vpc_endpoint.dns_entries[0].dns_name #=> String
resp.vpc_endpoint.dns_entries[0].hosted_zone_id #=> String
resp.vpc_endpoint.creation_timestamp #=> Time
resp.vpc_endpoint.tags #=> Array
resp.vpc_endpoint.tags[0].key #=> String
resp.vpc_endpoint.tags[0].value #=> String
resp.vpc_endpoint.owner_id #=> String
resp.vpc_endpoint.last_error.message #=> String
resp.vpc_endpoint.last_error.code #=> String
resp.client_token #=> String

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_endpoint_type (String)

    The type of endpoint.

    Default: Gateway

  • :vpc_id (required, String)

    The ID of the VPC in which the endpoint will be used.

  • :service_name (required, String)

    The service name. To get a list of available services, use the DescribeVpcEndpointServices request, or get the name from the service provider.

  • :policy_document (String) — default: Interface and gateway endpoints

    A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.

  • :route_table_ids (Array<String>) — default: Gateway endpoint

    One or more route table IDs.

  • :subnet_ids (Array<String>) — default: Interface and Gateway Load Balancer endpoints

    The ID of one or more subnets in which to create an endpoint network interface. For a Gateway Load Balancer endpoint, you can specify one subnet only.

  • :security_group_ids (Array<String>) — default: Interface endpoint

    The ID of one or more security groups to associate with the endpoint network interface.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :private_dns_enabled (Boolean) — default: Interface endpoint

    Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, kinesis.us-east-1.amazonaws.com), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.

    To use a private hosted zone, you must set the following VPC attributes to true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to set the VPC attributes.

    Default: true

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

    The tags to associate with the endpoint.

Returns:

See Also:

#create_vpc_endpoint_connection_notification(options = {}) ⇒ Types::CreateVpcEndpointConnectionNotificationResult

Creates a connection notification for a specified VPC endpoint or VPC endpoint service. A connection notification notifies you of specific endpoint events. You must create an SNS topic to receive notifications. For more information, see Create a Topic in the Amazon Simple Notification Service Developer Guide.

You can create a connection notification for interface endpoints only.

Examples:

Request syntax with placeholder values


resp = client.create_vpc_endpoint_connection_notification({
  dry_run: false,
  service_id: "VpcEndpointServiceId",
  vpc_endpoint_id: "VpcEndpointId",
  connection_notification_arn: "String", # required
  connection_events: ["String"], # required
  client_token: "String",
})

Response structure


resp.connection_notification.connection_notification_id #=> String
resp.connection_notification.service_id #=> String
resp.connection_notification.vpc_endpoint_id #=> String
resp.connection_notification.connection_notification_type #=> String, one of "Topic"
resp.connection_notification.connection_notification_arn #=> String
resp.connection_notification.connection_events #=> Array
resp.connection_notification.connection_events[0] #=> String
resp.connection_notification.connection_notification_state #=> String, one of "Enabled", "Disabled"
resp.client_token #=> String

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.

  • :service_id (String)

    The ID of the endpoint service.

  • :vpc_endpoint_id (String)

    The ID of the endpoint.

  • :connection_notification_arn (required, String)

    The ARN of the SNS topic for the notifications.

  • :connection_events (required, Array<String>)

    One or more endpoint events for which to receive notifications. Valid values are Accept, Connect, Delete, and Reject.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

Returns:

See Also:

#create_vpc_endpoint_service_configuration(options = {}) ⇒ Types::CreateVpcEndpointServiceConfigurationResult

Creates a VPC endpoint service configuration to which service consumers (AWS accounts, IAM users, and IAM roles) can connect.

To create an endpoint service configuration, you must first create one of the following for your service:

For more information, see VPC Endpoint Services in the Amazon Virtual Private Cloud User Guide.

If you set the private DNS name, you must prove that you own the private DNS domain name. For more information, see VPC Endpoint Service Private DNS Name Verification in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_vpc_endpoint_service_configuration({
  dry_run: false,
  acceptance_required: false,
  private_dns_name: "String",
  network_load_balancer_arns: ["String"],
  gateway_load_balancer_arns: ["String"],
  client_token: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.service_configuration.service_type #=> Array
resp.service_configuration.service_type[0].service_type #=> String, one of "Interface", "Gateway", "GatewayLoadBalancer"
resp.service_configuration.service_id #=> String
resp.service_configuration.service_name #=> String
resp.service_configuration.service_state #=> String, one of "Pending", "Available", "Deleting", "Deleted", "Failed"
resp.service_configuration.availability_zones #=> Array
resp.service_configuration.availability_zones[0] #=> String
resp.service_configuration.acceptance_required #=> true/false
resp.service_configuration.manages_vpc_endpoints #=> true/false
resp.service_configuration.network_load_balancer_arns #=> Array
resp.service_configuration.network_load_balancer_arns[0] #=> String
resp.service_configuration.gateway_load_balancer_arns #=> Array
resp.service_configuration.gateway_load_balancer_arns[0] #=> String
resp.service_configuration.base_endpoint_dns_names #=> Array
resp.service_configuration.base_endpoint_dns_names[0] #=> String
resp.service_configuration.private_dns_name #=> String
resp.service_configuration.private_dns_name_configuration.state #=> String, one of "pendingVerification", "verified", "failed"
resp.service_configuration.private_dns_name_configuration.type #=> String
resp.service_configuration.private_dns_name_configuration.value #=> String
resp.service_configuration.private_dns_name_configuration.name #=> String
resp.service_configuration.tags #=> Array
resp.service_configuration.tags[0].key #=> String
resp.service_configuration.tags[0].value #=> String
resp.client_token #=> String

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.

  • :acceptance_required (Boolean)

    Indicates whether requests from service consumers to create an endpoint to your service must be accepted. To accept a request, use AcceptVpcEndpointConnections.

  • :private_dns_name (String) — default: Interface endpoint configuration

    The private DNS name to assign to the VPC endpoint service.

  • :network_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.

  • :gateway_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

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

    The tags to associate with the service.

Returns:

See Also:

#create_vpc_peering_connection(options = {}) ⇒ Types::CreateVpcPeeringConnectionResult

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another AWS account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide.

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed.

Examples:

Request syntax with placeholder values


resp = client.create_vpc_peering_connection({
  dry_run: false,
  peer_owner_id: "String",
  peer_vpc_id: "String",
  vpc_id: "VpcId",
  peer_region: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.vpc_peering_connection.accepter_vpc_info.cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connection.accepter_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connection.accepter_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connection.accepter_vpc_info.owner_id #=> String
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connection.accepter_vpc_info.vpc_id #=> String
resp.vpc_peering_connection.accepter_vpc_info.region #=> String
resp.vpc_peering_connection.expiration_time #=> Time
resp.vpc_peering_connection.requester_vpc_info.cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connection.requester_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connection.requester_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connection.requester_vpc_info.owner_id #=> String
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connection.requester_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connection.requester_vpc_info.vpc_id #=> String
resp.vpc_peering_connection.requester_vpc_info.region #=> String
resp.vpc_peering_connection.status.code #=> String, one of "initiating-request", "pending-acceptance", "active", "deleted", "rejected", "failed", "expired", "provisioning", "deleting"
resp.vpc_peering_connection.status.message #=> String
resp.vpc_peering_connection.tags #=> Array
resp.vpc_peering_connection.tags[0].key #=> String
resp.vpc_peering_connection.tags[0].value #=> String
resp.vpc_peering_connection.vpc_peering_connection_id #=> String

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.

  • :peer_owner_id (String)

    The AWS account ID of the owner of the accepter VPC.

    Default: Your AWS account ID

  • :peer_vpc_id (String)

    The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.

  • :vpc_id (String)

    The ID of the requester VPC. You must specify this parameter in the request.

  • :peer_region (String)

    The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

    Default: The Region in which you make the request.

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

    The tags to assign to the peering connection.

Returns:

See Also:

#create_vpn_connection(options = {}) ⇒ Types::CreateVpnConnectionResult

Creates a VPN connection between an existing virtual private gateway or transit gateway and a customer gateway. The supported connection type is ipsec.1.

The response includes information that you need to give to your network administrator to configure your customer gateway.

We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway device.

If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_vpn_connection({
  customer_gateway_id: "CustomerGatewayId", # required
  type: "String", # required
  vpn_gateway_id: "VpnGatewayId",
  transit_gateway_id: "TransitGatewayId",
  dry_run: false,
  options: {
    enable_acceleration: false,
    static_routes_only: false,
    tunnel_inside_ip_version: "ipv4", # accepts ipv4, ipv6
    tunnel_options: [
      {
        tunnel_inside_cidr: "String",
        tunnel_inside_ipv_6_cidr: "String",
        pre_shared_key: "String",
        phase_1_lifetime_seconds: 1,
        phase_2_lifetime_seconds: 1,
        rekey_margin_time_seconds: 1,
        rekey_fuzz_percentage: 1,
        replay_window_size: 1,
        dpd_timeout_seconds: 1,
        dpd_timeout_action: "String",
        phase_1_encryption_algorithms: [
          {
            value: "String",
          },
        ],
        phase_2_encryption_algorithms: [
          {
            value: "String",
          },
        ],
        phase_1_integrity_algorithms: [
          {
            value: "String",
          },
        ],
        phase_2_integrity_algorithms: [
          {
            value: "String",
          },
        ],
        phase_1_dh_group_numbers: [
          {
            value: 1,
          },
        ],
        phase_2_dh_group_numbers: [
          {
            value: 1,
          },
        ],
        ike_versions: [
          {
            value: "String",
          },
        ],
        startup_action: "String",
      },
    ],
    local_ipv_4_network_cidr: "String",
    remote_ipv_4_network_cidr: "String",
    local_ipv_6_network_cidr: "String",
    remote_ipv_6_network_cidr: "String",
  },
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.vpn_connection.customer_gateway_configuration #=> String
resp.vpn_connection.customer_gateway_id #=> String
resp.vpn_connection.category #=> String
resp.vpn_connection.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.type #=> String, one of "ipsec.1"
resp.vpn_connection.vpn_connection_id #=> String
resp.vpn_connection.vpn_gateway_id #=> String
resp.vpn_connection.transit_gateway_id #=> String
resp.vpn_connection.options.enable_acceleration #=> true/false
resp.vpn_connection.options.static_routes_only #=> true/false
resp.vpn_connection.options.local_ipv_4_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_4_network_cidr #=> String
resp.vpn_connection.options.local_ipv_6_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_6_network_cidr #=> String
resp.vpn_connection.options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connection.options.tunnel_options #=> Array
resp.vpn_connection.options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connection.options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connection.options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].startup_action #=> String
resp.vpn_connection.routes #=> Array
resp.vpn_connection.routes[0].destination_cidr_block #=> String
resp.vpn_connection.routes[0].source #=> String, one of "Static"
resp.vpn_connection.routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.tags #=> Array
resp.vpn_connection.tags[0].key #=> String
resp.vpn_connection.tags[0].value #=> String
resp.vpn_connection.vgw_telemetry #=> Array
resp.vpn_connection.vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connection.vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connection.vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connection.vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connection.vgw_telemetry[0].status_message #=> String
resp.vpn_connection.vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

  • :customer_gateway_id (required, String)

    The ID of the customer gateway.

  • :type (required, String)

    The type of VPN connection (ipsec.1).

  • :vpn_gateway_id (String)

    The ID of the virtual private gateway. If you specify a virtual private gateway, you cannot specify a transit gateway.

  • :transit_gateway_id (String)

    The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private gateway.

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

  • :options (Types::VpnConnectionOptionsSpecification)

    The options for the VPN connection.

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

    The tags to apply to the VPN connection.

Returns:

See Also:

#create_vpn_connection_route(options = {}) ⇒ Struct

Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_vpn_connection_route({
  destination_cidr_block: "String", # required
  vpn_connection_id: "VpnConnectionId", # required
})

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR block associated with the local subnet of the customer network.

  • :vpn_connection_id (required, String)

    The ID of the VPN connection.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_vpn_gateway(options = {}) ⇒ Types::CreateVpnGatewayResult

Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_vpn_gateway({
  availability_zone: "String",
  type: "ipsec.1", # required, accepts ipsec.1
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  amazon_side_asn: 1,
  dry_run: false,
})

Response structure


resp.vpn_gateway.availability_zone #=> String
resp.vpn_gateway.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_gateway.type #=> String, one of "ipsec.1"
resp.vpn_gateway.vpc_attachments #=> Array
resp.vpn_gateway.vpc_attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.vpn_gateway.vpc_attachments[0].vpc_id #=> String
resp.vpn_gateway.vpn_gateway_id #=> String
resp.vpn_gateway.amazon_side_asn #=> Integer
resp.vpn_gateway.tags #=> Array
resp.vpn_gateway.tags[0].key #=> String
resp.vpn_gateway.tags[0].value #=> String

Options Hash (options):

  • :availability_zone (String)

    The Availability Zone for the virtual private gateway.

  • :type (required, String)

    The type of VPN connection this virtual private gateway supports.

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

    The tags to apply to the virtual private gateway.

  • :amazon_side_asn (Integer)

    A private Autonomous System Number (ASN) for the Amazon side of a BGP session. If you\'re using a 16-bit ASN, it must be in the 64512 to 65534 range. If you\'re using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range.

    Default: 64512

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

See Also:

#delete_carrier_gateway(options = {}) ⇒ Types::DeleteCarrierGatewayResult

Deletes a carrier gateway.

If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see DeleteRoute.

Examples:

Request syntax with placeholder values


resp = client.delete_carrier_gateway({
  carrier_gateway_id: "CarrierGatewayId", # required
  dry_run: false,
})

Response structure


resp.carrier_gateway.carrier_gateway_id #=> String
resp.carrier_gateway.vpc_id #=> String
resp.carrier_gateway.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.carrier_gateway.owner_id #=> String
resp.carrier_gateway.tags #=> Array
resp.carrier_gateway.tags[0].key #=> String
resp.carrier_gateway.tags[0].value #=> String

Options Hash (options):

  • :carrier_gateway_id (required, String)

    The ID of the carrier gateway.

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

See Also:

#delete_client_vpn_endpoint(options = {}) ⇒ Types::DeleteClientVpnEndpointResult

Deletes the specified Client VPN endpoint. You must disassociate all target networks before you can delete a Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.delete_client_vpn_endpoint({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  dry_run: false,
})

Response structure


resp.status.code #=> String, one of "pending-associate", "available", "deleting", "deleted"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN to be deleted.

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

See Also:

#delete_client_vpn_route(options = {}) ⇒ Types::DeleteClientVpnRouteResult

Deletes a route from a Client VPN endpoint. You can only delete routes that you manually added using the CreateClientVpnRoute action. You cannot delete routes that were automatically added when associating a subnet. To remove routes that have been automatically added, disassociate the target subnet from the Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.delete_client_vpn_route({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  target_vpc_subnet_id: "SubnetId",
  destination_cidr_block: "String", # required
  dry_run: false,
})

Response structure


resp.status.code #=> String, one of "creating", "active", "failed", "deleting"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint from which the route is to be deleted.

  • :target_vpc_subnet_id (String)

    The ID of the target subnet used by the route.

  • :destination_cidr_block (required, String)

    The IPv4 address range, in CIDR notation, of the route to be deleted.

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

See Also:

#delete_customer_gateway(options = {}) ⇒ Struct

Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

Examples:

Example: To delete a customer gateway


# This example deletes the specified customer gateway.

resp = client.delete_customer_gateway({
  customer_gateway_id: "cgw-0e11f167", 
})

Request syntax with placeholder values


resp = client.delete_customer_gateway({
  customer_gateway_id: "CustomerGatewayId", # required
  dry_run: false,
})

Options Hash (options):

  • :customer_gateway_id (required, String)

    The ID of the customer gateway.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_dhcp_options(options = {}) ⇒ Struct

Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

Examples:

Example: To delete a DHCP options set


# This example deletes the specified DHCP options set.

resp = client.delete_dhcp_options({
  dhcp_options_id: "dopt-d9070ebb", 
})

Request syntax with placeholder values


resp = client.delete_dhcp_options({
  dhcp_options_id: "DhcpOptionsId", # required
  dry_run: false,
})

Options Hash (options):

  • :dhcp_options_id (required, String)

    The ID of the DHCP options set.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_egress_only_internet_gateway(options = {}) ⇒ Types::DeleteEgressOnlyInternetGatewayResult

Deletes an egress-only internet gateway.

Examples:

Request syntax with placeholder values


resp = client.delete_egress_only_internet_gateway({
  dry_run: false,
  egress_only_internet_gateway_id: "EgressOnlyInternetGatewayId", # required
})

Response structure


resp.return_code #=> true/false

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.

  • :egress_only_internet_gateway_id (required, String)

    The ID of the egress-only internet gateway.

Returns:

See Also:

#delete_fleets(options = {}) ⇒ Types::DeleteFleetsResult

Deletes the specified EC2 Fleet.

After you delete an EC2 Fleet, it launches no new instances.

You must specify whether a deleted EC2 Fleet should also terminate its instances. If you choose to terminate the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the deleted_running state, and the instances continue to run until they are interrupted or you terminate them manually.

For instant fleets, EC2 Fleet must terminate the instances when the fleet is deleted. A deleted instant fleet with running instances is not supported.

Restrictions

  • You can delete up to 25 instant fleets in a single request. If you exceed this number, no instant fleets are deleted and an error is returned. There is no restriction on the number of fleets of type maintain or request that can be deleted in a single request.

  • Up to 1000 instances can be terminated in a single request to delete instant fleets.

For more information, see Deleting an EC2 Fleet in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_fleets({
  dry_run: false,
  fleet_ids: ["FleetId"], # required
  terminate_instances: false, # required
})

Response structure


resp.successful_fleet_deletions #=> Array
resp.successful_fleet_deletions[0].current_fleet_state #=> String, one of "submitted", "active", "deleted", "failed", "deleted_running", "deleted_terminating", "modifying"
resp.successful_fleet_deletions[0].previous_fleet_state #=> String, one of "submitted", "active", "deleted", "failed", "deleted_running", "deleted_terminating", "modifying"
resp.successful_fleet_deletions[0].fleet_id #=> String
resp.unsuccessful_fleet_deletions #=> Array
resp.unsuccessful_fleet_deletions[0].error.code #=> String, one of "fleetIdDoesNotExist", "fleetIdMalformed", "fleetNotInDeletableState", "unexpectedError"
resp.unsuccessful_fleet_deletions[0].error.message #=> String
resp.unsuccessful_fleet_deletions[0].fleet_id #=> String

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.

  • :fleet_ids (required, Array<String>)

    The IDs of the EC2 Fleets.

  • :terminate_instances (required, Boolean)

    Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

    To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for fleets of type maintain and request.

    For instant fleets, you cannot specify NoTerminateInstances. A deleted instant fleet with running instances is not supported.

Returns:

See Also:

#delete_flow_logs(options = {}) ⇒ Types::DeleteFlowLogsResult

Deletes one or more flow logs.

Examples:

Request syntax with placeholder values


resp = client.delete_flow_logs({
  dry_run: false,
  flow_log_ids: ["VpcFlowLogId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :flow_log_ids (required, Array<String>)

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

Returns:

See Also:

#delete_fpga_image(options = {}) ⇒ Types::DeleteFpgaImageResult

Deletes the specified Amazon FPGA Image (AFI).

Examples:

Request syntax with placeholder values


resp = client.delete_fpga_image({
  dry_run: false,
  fpga_image_id: "FpgaImageId", # required
})

Response structure


resp.return #=> true/false

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.

  • :fpga_image_id (required, String)

    The ID of the AFI.

Returns:

See Also:

#delete_internet_gateway(options = {}) ⇒ Struct

Deletes the specified internet gateway. You must detach the internet gateway from the VPC before you can delete it.

Examples:

Example: To delete an Internet gateway


# This example deletes the specified Internet gateway.

resp = client.delete_internet_gateway({
  internet_gateway_id: "igw-c0a643a9", 
})

Request syntax with placeholder values


resp = client.delete_internet_gateway({
  dry_run: false,
  internet_gateway_id: "InternetGatewayId", # required
})

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.

  • :internet_gateway_id (required, String)

    The ID of the internet gateway.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_key_pair(options = {}) ⇒ Struct

Deletes the specified key pair, by removing the public key from Amazon EC2.

Examples:

Example: To delete a key pair


# This example deletes the specified key pair.

resp = client.delete_key_pair({
  key_name: "my-key-pair", 
})

Request syntax with placeholder values


resp = client.delete_key_pair({
  key_name: "KeyPairName",
  key_pair_id: "KeyPairId",
  dry_run: false,
})

Options Hash (options):

  • :key_name (String)

    The name of the key pair.

  • :key_pair_id (String)

    The ID of the key pair.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_launch_template(options = {}) ⇒ Types::DeleteLaunchTemplateResult

Deletes a launch template. Deleting a launch template deletes all of its versions.

Examples:

Example: To delete a launch template


# This example deletes the specified launch template.

resp = client.delete_launch_template({
  launch_template_id: "lt-0abcd290751193123", 
})

# resp.to_h outputs the following:
{
  launch_template: {
    create_time: Time.parse("2017-11-23T16:46:25.000Z"), 
    created_by: "arn:aws:iam::123456789012:root", 
    default_version_number: 2, 
    latest_version_number: 2, 
    launch_template_id: "lt-0abcd290751193123", 
    launch_template_name: "my-template", 
  }, 
}

Request syntax with placeholder values


resp = client.delete_launch_template({
  dry_run: false,
  launch_template_id: "LaunchTemplateId",
  launch_template_name: "LaunchTemplateName",
})

Response structure


resp.launch_template.launch_template_id #=> String
resp.launch_template.launch_template_name #=> String
resp.launch_template.create_time #=> Time
resp.launch_template.created_by #=> String
resp.launch_template.default_version_number #=> Integer
resp.launch_template.latest_version_number #=> Integer
resp.launch_template.tags #=> Array
resp.launch_template.tags[0].key #=> String
resp.launch_template.tags[0].value #=> String

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.

  • :launch_template_id (String)

    The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :launch_template_name (String)

    The name of the launch template. You must specify either the launch template ID or launch template name in the request.

Returns:

See Also:

#delete_launch_template_versions(options = {}) ⇒ Types::DeleteLaunchTemplateVersionsResult

Deletes one or more versions of a launch template. You cannot delete the default version of a launch template; you must first assign a different version as the default. If the default version is the only version for the launch template, you must delete the entire launch template using DeleteLaunchTemplate.

Examples:

Example: To delete a launch template version


# This example deletes the specified launch template version.

resp = client.delete_launch_template_versions({
  launch_template_id: "lt-0abcd290751193123", 
  versions: [
    "1", 
  ], 
})

# resp.to_h outputs the following:
{
  successfully_deleted_launch_template_versions: [
    {
      launch_template_id: "lt-0abcd290751193123", 
      launch_template_name: "my-template", 
      version_number: 1, 
    }, 
  ], 
  unsuccessfully_deleted_launch_template_versions: [
  ], 
}

Request syntax with placeholder values


resp = client.delete_launch_template_versions({
  dry_run: false,
  launch_template_id: "LaunchTemplateId",
  launch_template_name: "LaunchTemplateName",
  versions: ["String"], # required
})

Response structure


resp.successfully_deleted_launch_template_versions #=> Array
resp.successfully_deleted_launch_template_versions[0].launch_template_id #=> String
resp.successfully_deleted_launch_template_versions[0].launch_template_name #=> String
resp.successfully_deleted_launch_template_versions[0].version_number #=> Integer
resp.unsuccessfully_deleted_launch_template_versions #=> Array
resp.unsuccessfully_deleted_launch_template_versions[0].launch_template_id #=> String
resp.unsuccessfully_deleted_launch_template_versions[0].launch_template_name #=> String
resp.unsuccessfully_deleted_launch_template_versions[0].version_number #=> Integer
resp.unsuccessfully_deleted_launch_template_versions[0].response_error.code #=> String, one of "launchTemplateIdDoesNotExist", "launchTemplateIdMalformed", "launchTemplateNameDoesNotExist", "launchTemplateNameMalformed", "launchTemplateVersionDoesNotExist", "unexpectedError"
resp.unsuccessfully_deleted_launch_template_versions[0].response_error.message #=> String

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.

  • :launch_template_id (String)

    The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :launch_template_name (String)

    The name of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :versions (required, Array<String>)

    The version numbers of one or more launch template versions to delete.

Returns:

See Also:

#delete_local_gateway_route(options = {}) ⇒ Types::DeleteLocalGatewayRouteResult

Deletes the specified route from the specified local gateway route table.

Examples:

Request syntax with placeholder values


resp = client.delete_local_gateway_route({
  destination_cidr_block: "String", # required
  local_gateway_route_table_id: "LocalGatewayRoutetableId", # required
  dry_run: false,
})

Response structure


resp.route.destination_cidr_block #=> String
resp.route.local_gateway_virtual_interface_group_id #=> String
resp.route.type #=> String, one of "static", "propagated"
resp.route.state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"
resp.route.local_gateway_route_table_id #=> String
resp.route.local_gateway_route_table_arn #=> String
resp.route.owner_id #=> String

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR range for the route. This must match the CIDR for the route exactly.

  • :local_gateway_route_table_id (required, String)

    The ID of the local gateway route table.

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

See Also:

#delete_local_gateway_route_table_vpc_association(options = {}) ⇒ Types::DeleteLocalGatewayRouteTableVpcAssociationResult

Deletes the specified association between a VPC and local gateway route table.

Examples:

Request syntax with placeholder values


resp = client.delete_local_gateway_route_table_vpc_association({
  local_gateway_route_table_vpc_association_id: "LocalGatewayRouteTableVpcAssociationId", # required
  dry_run: false,
})

Response structure


resp.local_gateway_route_table_vpc_association.local_gateway_route_table_vpc_association_id #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_route_table_id #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_route_table_arn #=> String
resp.local_gateway_route_table_vpc_association.local_gateway_id #=> String
resp.local_gateway_route_table_vpc_association.vpc_id #=> String
resp.local_gateway_route_table_vpc_association.owner_id #=> String
resp.local_gateway_route_table_vpc_association.state #=> String
resp.local_gateway_route_table_vpc_association.tags #=> Array
resp.local_gateway_route_table_vpc_association.tags[0].key #=> String
resp.local_gateway_route_table_vpc_association.tags[0].value #=> String

Options Hash (options):

  • :local_gateway_route_table_vpc_association_id (required, String)

    The ID of the association.

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

See Also:

#delete_managed_prefix_list(options = {}) ⇒ Types::DeleteManagedPrefixListResult

Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.

Examples:

Request syntax with placeholder values


resp = client.delete_managed_prefix_list({
  dry_run: false,
  prefix_list_id: "PrefixListResourceId", # required
})

Response structure


resp.prefix_list.prefix_list_id #=> String
resp.prefix_list.address_family #=> String
resp.prefix_list.state #=> String, one of "create-in-progress", "create-complete", "create-failed", "modify-in-progress", "modify-complete", "modify-failed", "restore-in-progress", "restore-complete", "restore-failed", "delete-in-progress", "delete-complete", "delete-failed"
resp.prefix_list.state_message #=> String
resp.prefix_list.prefix_list_arn #=> String
resp.prefix_list.prefix_list_name #=> String
resp.prefix_list.max_entries #=> Integer
resp.prefix_list.version #=> Integer
resp.prefix_list.tags #=> Array
resp.prefix_list.tags[0].key #=> String
resp.prefix_list.tags[0].value #=> String
resp.prefix_list.owner_id #=> String

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.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

Returns:

See Also:

#delete_nat_gateway(options = {}) ⇒ Types::DeleteNatGatewayResult

Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.

Examples:

Example: To delete a NAT gateway


# This example deletes the specified NAT gateway.

resp = client.delete_nat_gateway({
  nat_gateway_id: "nat-04ae55e711cec5680", 
})

# resp.to_h outputs the following:
{
  nat_gateway_id: "nat-04ae55e711cec5680", 
}

Request syntax with placeholder values


resp = client.delete_nat_gateway({
  dry_run: false,
  nat_gateway_id: "NatGatewayId", # required
})

Response structure


resp.nat_gateway_id #=> String

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.

  • :nat_gateway_id (required, String)

    The ID of the NAT gateway.

Returns:

See Also:

#delete_network_acl(options = {}) ⇒ Struct

Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

Examples:

Example: To delete a network ACL


# This example deletes the specified network ACL.

resp = client.delete_network_acl({
  network_acl_id: "acl-5fb85d36", 
})

Request syntax with placeholder values


resp = client.delete_network_acl({
  dry_run: false,
  network_acl_id: "NetworkAclId", # required
})

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.

  • :network_acl_id (required, String)

    The ID of the network ACL.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_network_acl_entry(options = {}) ⇒ Struct

Deletes the specified ingress or egress entry (rule) from the specified network ACL.

Examples:

Example: To delete a network ACL entry


# This example deletes ingress rule number 100 from the specified network ACL.

resp = client.delete_network_acl_entry({
  egress: true, 
  network_acl_id: "acl-5fb85d36", 
  rule_number: 100, 
})

Request syntax with placeholder values


resp = client.delete_network_acl_entry({
  dry_run: false,
  egress: false, # required
  network_acl_id: "NetworkAclId", # required
  rule_number: 1, # required
})

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.

  • :egress (required, Boolean)

    Indicates whether the rule is an egress rule.

  • :network_acl_id (required, String)

    The ID of the network ACL.

  • :rule_number (required, Integer)

    The rule number of the entry to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_network_interface(options = {}) ⇒ Struct

Deletes the specified network interface. You must detach the network interface before you can delete it.

Examples:

Example: To delete a network interface


# This example deletes the specified network interface.

resp = client.delete_network_interface({
  network_interface_id: "eni-e5aa89a3", 
})

Request syntax with placeholder values


resp = client.delete_network_interface({
  dry_run: false,
  network_interface_id: "NetworkInterfaceId", # required
})

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.

  • :network_interface_id (required, String)

    The ID of the network interface.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_network_interface_permission(options = {}) ⇒ Types::DeleteNetworkInterfacePermissionResult

Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

Examples:

Request syntax with placeholder values


resp = client.delete_network_interface_permission({
  network_interface_permission_id: "NetworkInterfacePermissionId", # required
  force: false,
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :network_interface_permission_id (required, String)

    The ID of the network interface permission.

  • :force (Boolean)

    Specify true to remove the permission even if the network interface is attached to an instance.

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

See Also:

#delete_placement_group(options = {}) ⇒ Struct

Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information, see Placement groups in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To delete a placement group


# This example deletes the specified placement group.

resp = client.delete_placement_group({
  group_name: "my-cluster", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_placement_group({
  dry_run: false,
  group_name: "PlacementGroupName", # required
})

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.

  • :group_name (required, String)

    The name of the placement group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_queued_reserved_instances(options = {}) ⇒ Types::DeleteQueuedReservedInstancesResult

Deletes the queued purchases for the specified Reserved Instances.

Examples:

Request syntax with placeholder values


resp = client.delete_queued_reserved_instances({
  dry_run: false,
  reserved_instances_ids: ["ReservationId"], # required
})

Response structure


resp.successful_queued_purchase_deletions #=> Array
resp.successful_queued_purchase_deletions[0].reserved_instances_id #=> String
resp.failed_queued_purchase_deletions #=> Array
resp.failed_queued_purchase_deletions[0].error.code #=> String, one of "reserved-instances-id-invalid", "reserved-instances-not-in-queued-state", "unexpected-error"
resp.failed_queued_purchase_deletions[0].error.message #=> String
resp.failed_queued_purchase_deletions[0].reserved_instances_id #=> String

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.

  • :reserved_instances_ids (required, Array<String>)

    The IDs of the Reserved Instances.

Returns:

See Also:

#delete_route(options = {}) ⇒ Struct

Deletes the specified route from the specified route table.

Examples:

Example: To delete a route


# This example deletes the specified route from the specified route table.

resp = client.delete_route({
  destination_cidr_block: "0.0.0.0/0", 
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.delete_route({
  destination_cidr_block: "String",
  destination_ipv_6_cidr_block: "String",
  destination_prefix_list_id: "PrefixListResourceId",
  dry_run: false,
  route_table_id: "RouteTableId", # required
})

Options Hash (options):

  • :destination_cidr_block (String)

    The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

  • :destination_ipv_6_cidr_block (String)

    The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

  • :destination_prefix_list_id (String)

    The ID of the prefix list for the route.

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

  • :route_table_id (required, String)

    The ID of the route table.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_route_table(options = {}) ⇒ Struct

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

Examples:

Example: To delete a route table


# This example deletes the specified route table.

resp = client.delete_route_table({
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.delete_route_table({
  dry_run: false,
  route_table_id: "RouteTableId", # required
})

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.

  • :route_table_id (required, String)

    The ID of the route table.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_security_group(options = {}) ⇒ Struct

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

Examples:

Example: To delete a security group


# This example deletes the specified security group.

resp = client.delete_security_group({
  group_id: "sg-903004f8", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_security_group({
  group_id: "SecurityGroupId",
  group_name: "SecurityGroupName",
  dry_run: false,
})

Options Hash (options):

  • :group_id (String)

    The ID of the security group. Required for a nondefault VPC.

  • :group_name (String)

    [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_snapshot(options = {}) ⇒ Struct

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Deleting an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To delete a snapshot


# This example deletes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.

resp = client.delete_snapshot({
  snapshot_id: "snap-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_snapshot({
  snapshot_id: "SnapshotId", # required
  dry_run: false,
})

Options Hash (options):

  • :snapshot_id (required, String)

    The ID of the EBS snapshot.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_spot_datafeed_subscription(options = {}) ⇒ Struct

Deletes the data feed for Spot Instances.

Examples:

Example: To cancel a Spot Instance data feed subscription


# This example deletes a Spot data feed subscription for the account.

resp = client.delete_spot_datafeed_subscription({
})

Request syntax with placeholder values


resp = client.delete_spot_datafeed_subscription({
  dry_run: false,
})

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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_subnet(options = {}) ⇒ Struct

Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

Examples:

Example: To delete a subnet


# This example deletes the specified subnet.

resp = client.delete_subnet({
  subnet_id: "subnet-9d4a7b6c", 
})

Request syntax with placeholder values


resp = client.delete_subnet({
  subnet_id: "SubnetId", # required
  dry_run: false,
})

Options Hash (options):

  • :subnet_id (required, String)

    The ID of the subnet.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_tags(options = {}) ⇒ Struct

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags. For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To delete a tag from a resource


# This example deletes the tag Stack=test from the specified image.

resp = client.delete_tags({
  resources: [
    "ami-78a54011", 
  ], 
  tags: [
    {
      key: "Stack", 
      value: "test", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.delete_tags({
  dry_run: false,
  resources: ["TaggableResourceId"], # required
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

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.

  • :resources (required, Array<String>)

    The IDs of the resources, separated by spaces.

    Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

  • :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 AWS-generated tags (tags that have the aws: prefix).

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_traffic_mirror_filter(options = {}) ⇒ Types::DeleteTrafficMirrorFilterResult

Deletes the specified Traffic Mirror filter.

You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.

Examples:

Request syntax with placeholder values


resp = client.delete_traffic_mirror_filter({
  traffic_mirror_filter_id: "TrafficMirrorFilterId", # required
  dry_run: false,
})

Response structure


resp.traffic_mirror_filter_id #=> String

Options Hash (options):

  • :traffic_mirror_filter_id (required, String)

    The ID of the Traffic Mirror filter.

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

See Also:

#delete_traffic_mirror_filter_rule(options = {}) ⇒ Types::DeleteTrafficMirrorFilterRuleResult

Deletes the specified Traffic Mirror rule.

Examples:

Request syntax with placeholder values


resp = client.delete_traffic_mirror_filter_rule({
  traffic_mirror_filter_rule_id: "TrafficMirrorFilterRuleId", # required
  dry_run: false,
})

Response structure


resp.traffic_mirror_filter_rule_id #=> String

Options Hash (options):

  • :traffic_mirror_filter_rule_id (required, String)

    The ID of the Traffic Mirror rule.

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

See Also:

#delete_traffic_mirror_session(options = {}) ⇒ Types::DeleteTrafficMirrorSessionResult

Deletes the specified Traffic Mirror session.

Examples:

Request syntax with placeholder values


resp = client.delete_traffic_mirror_session({
  traffic_mirror_session_id: "TrafficMirrorSessionId", # required
  dry_run: false,
})

Response structure


resp.traffic_mirror_session_id #=> String

Options Hash (options):

  • :traffic_mirror_session_id (required, String)

    The ID of the Traffic Mirror session.

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

See Also:

#delete_traffic_mirror_target(options = {}) ⇒ Types::DeleteTrafficMirrorTargetResult

Deletes the specified Traffic Mirror target.

You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.

Examples:

Request syntax with placeholder values


resp = client.delete_traffic_mirror_target({
  traffic_mirror_target_id: "TrafficMirrorTargetId", # required
  dry_run: false,
})

Response structure


resp.traffic_mirror_target_id #=> String

Options Hash (options):

  • :traffic_mirror_target_id (required, String)

    The ID of the Traffic Mirror target.

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

See Also:

#delete_transit_gateway(options = {}) ⇒ Types::DeleteTransitGatewayResult

Deletes the specified transit gateway.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway({
  transit_gateway_id: "TransitGatewayId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway.transit_gateway_id #=> String
resp.transit_gateway.transit_gateway_arn #=> String
resp.transit_gateway.state #=> String, one of "pending", "available", "modifying", "deleting", "deleted"
resp.transit_gateway.owner_id #=> String
resp.transit_gateway.description #=> String
resp.transit_gateway.creation_time #=> Time
resp.transit_gateway.options.amazon_side_asn #=> Integer
resp.transit_gateway.options.auto_accept_shared_attachments #=> String, one of "enable", "disable"
resp.transit_gateway.options.default_route_table_association #=> String, one of "enable", "disable"
resp.transit_gateway.options.association_default_route_table_id #=> String
resp.transit_gateway.options.default_route_table_propagation #=> String, one of "enable", "disable"
resp.transit_gateway.options.propagation_default_route_table_id #=> String
resp.transit_gateway.options.vpn_ecmp_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.multicast_support #=> String, one of "enable", "disable"
resp.transit_gateway.tags #=> Array
resp.transit_gateway.tags[0].key #=> String
resp.transit_gateway.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

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

See Also:

#delete_transit_gateway_multicast_domain(options = {}) ⇒ Types::DeleteTransitGatewayMulticastDomainResult

Deletes the specified transit gateway multicast domain.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_multicast_domain({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_multicast_domain.transit_gateway_multicast_domain_id #=> String
resp.transit_gateway_multicast_domain.transit_gateway_id #=> String
resp.transit_gateway_multicast_domain.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_multicast_domain.creation_time #=> Time
resp.transit_gateway_multicast_domain.tags #=> Array
resp.transit_gateway_multicast_domain.tags[0].key #=> String
resp.transit_gateway_multicast_domain.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (required, String)

    The ID of the transit gateway multicast domain.

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

See Also:

#delete_transit_gateway_peering_attachment(options = {}) ⇒ Types::DeleteTransitGatewayPeeringAttachmentResult

Deletes a transit gateway peering attachment.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_peering_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_peering_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.status.code #=> String
resp.transit_gateway_peering_attachment.status.message #=> String
resp.transit_gateway_peering_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_peering_attachment.creation_time #=> Time
resp.transit_gateway_peering_attachment.tags #=> Array
resp.transit_gateway_peering_attachment.tags[0].key #=> String
resp.transit_gateway_peering_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the transit gateway peering attachment.

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

See Also:

#delete_transit_gateway_prefix_list_reference(options = {}) ⇒ Types::DeleteTransitGatewayPrefixListReferenceResult

Deletes a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_prefix_list_reference({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  prefix_list_id: "PrefixListResourceId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_prefix_list_reference.transit_gateway_route_table_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_owner_id #=> String
resp.transit_gateway_prefix_list_reference.state #=> String, one of "pending", "available", "modifying", "deleting"
resp.transit_gateway_prefix_list_reference.blackhole #=> true/false
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_id #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the route table.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

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

See Also:

#delete_transit_gateway_route(options = {}) ⇒ Types::DeleteTransitGatewayRouteResult

Deletes the specified route from the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_route({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  destination_cidr_block: "String", # required
  dry_run: false,
})

Response structure


resp.route.destination_cidr_block #=> String
resp.route.prefix_list_id #=> String
resp.route.transit_gateway_attachments #=> Array
resp.route.transit_gateway_attachments[0].resource_id #=> String
resp.route.transit_gateway_attachments[0].transit_gateway_attachment_id #=> String
resp.route.transit_gateway_attachments[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.route.type #=> String, one of "static", "propagated"
resp.route.state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :destination_cidr_block (required, String)

    The CIDR range for the route. This must match the CIDR for the route exactly.

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

See Also:

#delete_transit_gateway_route_table(options = {}) ⇒ Types::DeleteTransitGatewayRouteTableResult

Deletes the specified transit gateway route table. You must disassociate the route table from any transit gateway route tables before you can delete it.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_route_table({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_route_table.transit_gateway_route_table_id #=> String
resp.transit_gateway_route_table.transit_gateway_id #=> String
resp.transit_gateway_route_table.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_route_table.default_association_route_table #=> true/false
resp.transit_gateway_route_table.default_propagation_route_table #=> true/false
resp.transit_gateway_route_table.creation_time #=> Time
resp.transit_gateway_route_table.tags #=> Array
resp.transit_gateway_route_table.tags[0].key #=> String
resp.transit_gateway_route_table.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

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

See Also:

#delete_transit_gateway_vpc_attachment(options = {}) ⇒ Types::DeleteTransitGatewayVpcAttachmentResult

Deletes the specified VPC attachment.

Examples:

Request syntax with placeholder values


resp = client.delete_transit_gateway_vpc_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachment.transit_gateway_id #=> String
resp.transit_gateway_vpc_attachment.vpc_id #=> String
resp.transit_gateway_vpc_attachment.vpc_owner_id #=> String
resp.transit_gateway_vpc_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachment.subnet_ids #=> Array
resp.transit_gateway_vpc_attachment.subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachment.creation_time #=> Time
resp.transit_gateway_vpc_attachment.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.tags #=> Array
resp.transit_gateway_vpc_attachment.tags[0].key #=> String
resp.transit_gateway_vpc_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#delete_volume(options = {}) ⇒ Struct

Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).

The volume can remain in the deleting state for several minutes.

For more information, see Deleting an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To delete a volume


# This example deletes an available volume with the volume ID of ``vol-049df61146c4d7901``. If the command succeeds, no output is returned.

resp = client.delete_volume({
  volume_id: "vol-049df61146c4d7901", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_volume({
  volume_id: "VolumeId", # required
  dry_run: false,
})

Options Hash (options):

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_vpc(options = {}) ⇒ Struct

Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

Examples:

Example: To delete a VPC


# This example deletes the specified VPC.

resp = client.delete_vpc({
  vpc_id: "vpc-a01106c2", 
})

Request syntax with placeholder values


resp = client.delete_vpc({
  vpc_id: "VpcId", # required
  dry_run: false,
})

Options Hash (options):

  • :vpc_id (required, String)

    The ID of the VPC.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_vpc_endpoint_connection_notifications(options = {}) ⇒ Types::DeleteVpcEndpointConnectionNotificationsResult

Deletes one or more VPC endpoint connection notifications.

Examples:

Request syntax with placeholder values


resp = client.delete_vpc_endpoint_connection_notifications({
  dry_run: false,
  connection_notification_ids: ["ConnectionNotificationId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :connection_notification_ids (required, Array<String>)

    One or more notification IDs.

Returns:

See Also:

#delete_vpc_endpoint_service_configurations(options = {}) ⇒ Types::DeleteVpcEndpointServiceConfigurationsResult

Deletes one or more VPC endpoint service configurations in your account. Before you delete the endpoint service configuration, you must reject any Available or PendingAcceptance interface endpoint connections that are attached to the service.

Examples:

Request syntax with placeholder values


resp = client.delete_vpc_endpoint_service_configurations({
  dry_run: false,
  service_ids: ["VpcEndpointServiceId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :service_ids (required, Array<String>)

    The IDs of one or more services.

Returns:

See Also:

#delete_vpc_endpoints(options = {}) ⇒ Types::DeleteVpcEndpointsResult

Deletes one or more specified VPC endpoints. Deleting a gateway endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint. Deleting an interface endpoint or a Gateway Load Balancer endpoint deletes the endpoint network interfaces. Gateway Load Balancer endpoints can only be deleted if the routes that are associated with the endpoint are deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_vpc_endpoints({
  dry_run: false,
  vpc_endpoint_ids: ["VpcEndpointId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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_endpoint_ids (required, Array<String>)

    One or more VPC endpoint IDs.

Returns:

See Also:

#delete_vpc_peering_connection(options = {}) ⇒ Types::DeleteVpcPeeringConnectionResult

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state. You cannot delete a VPC peering connection that's in the failed state.

Examples:

Request syntax with placeholder values


resp = client.delete_vpc_peering_connection({
  dry_run: false,
  vpc_peering_connection_id: "VpcPeeringConnectionId", # required
})

Response structure


resp.return #=> true/false

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_peering_connection_id (required, String)

    The ID of the VPC peering connection.

Returns:

See Also:

#delete_vpn_connection(options = {}) ⇒ Struct

Deletes the specified VPN connection.

If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway device using the new configuration information returned with the new VPN connection ID.

For certificate-based authentication, delete all AWS Certificate Manager (ACM) private certificates used for the AWS-side tunnel endpoints for the VPN connection before deleting the VPN connection.

Examples:

Request syntax with placeholder values


resp = client.delete_vpn_connection({
  vpn_connection_id: "VpnConnectionId", # required
  dry_run: false,
})

Options Hash (options):

  • :vpn_connection_id (required, String)

    The ID of the VPN connection.

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

  • (Struct)

    Returns an empty response.

See Also:

#delete_vpn_connection_route(options = {}) ⇒ Struct

Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

Examples:

Request syntax with placeholder values


resp = client.delete_vpn_connection_route({
  destination_cidr_block: "String", # required
  vpn_connection_id: "VpnConnectionId", # required
})

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR block associated with the local subnet of the customer network.

  • :vpn_connection_id (required, String)

    The ID of the VPN connection.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_vpn_gateway(options = {}) ⇒ Struct

Deletes the specified virtual private gateway. You must first detach the virtual private gateway from the VPC. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.

Examples:

Request syntax with placeholder values


resp = client.delete_vpn_gateway({
  vpn_gateway_id: "VpnGatewayId", # required
  dry_run: false,
})

Options Hash (options):

  • :vpn_gateway_id (required, String)

    The ID of the virtual private gateway.

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

  • (Struct)

    Returns an empty response.

See Also:

#deprovision_byoip_cidr(options = {}) ⇒ Types::DeprovisionByoipCidrResult

Releases the specified address range that you provisioned for use with your AWS resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.

Before you can release an address range, you must stop advertising it using WithdrawByoipCidr and you must not have any IP addresses allocated from its address range.

Examples:

Request syntax with placeholder values


resp = client.deprovision_byoip_cidr({
  cidr: "String", # required
  dry_run: false,
})

Response structure


resp.byoip_cidr.cidr #=> String
resp.byoip_cidr.description #=> String
resp.byoip_cidr.status_message #=> String
resp.byoip_cidr.state #=> String, one of "advertised", "deprovisioned", "failed-deprovision", "failed-provision", "pending-deprovision", "pending-provision", "provisioned", "provisioned-not-publicly-advertisable"

Options Hash (options):

  • :cidr (required, String)

    The address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.

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

See Also:

#deregister_image(options = {}) ⇒ Struct

Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

Examples:

Request syntax with placeholder values


resp = client.deregister_image({
  image_id: "ImageId", # required
  dry_run: false,
})

Options Hash (options):

  • :image_id (required, String)

    The ID of the AMI.

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

  • (Struct)

    Returns an empty response.

See Also:

#deregister_instance_event_notification_attributes(options = {}) ⇒ Types::DeregisterInstanceEventNotificationAttributesResult

Deregisters tag keys to prevent tags that have the specified tag keys from being included in scheduled event notifications for resources in the Region.

Examples:

Request syntax with placeholder values


resp = client.deregister_instance_event_notification_attributes({
  dry_run: false,
  instance_tag_attribute: {
    include_all_tags_of_instance: false,
    instance_tag_keys: ["String"],
  },
})

Response structure


resp.instance_tag_attribute.instance_tag_keys #=> Array
resp.instance_tag_attribute.instance_tag_keys[0] #=> String
resp.instance_tag_attribute.include_all_tags_of_instance #=> true/false

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.

  • :instance_tag_attribute (Types::DeregisterInstanceTagAttributeRequest)

    Information about the tag keys to deregister.

Returns:

See Also:

#deregister_transit_gateway_multicast_group_members(options = {}) ⇒ Types::DeregisterTransitGatewayMulticastGroupMembersResult

Deregisters the specified members (network interfaces) from the transit gateway multicast group.

Examples:

Request syntax with placeholder values


resp = client.deregister_transit_gateway_multicast_group_members({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  group_ip_address: "String",
  network_interface_ids: ["NetworkInterfaceId"],
  dry_run: false,
})

Response structure


resp.deregistered_multicast_group_members.transit_gateway_multicast_domain_id #=> String
resp.deregistered_multicast_group_members.deregistered_network_interface_ids #=> Array
resp.deregistered_multicast_group_members.deregistered_network_interface_ids[0] #=> String
resp.deregistered_multicast_group_members.group_ip_address #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :group_ip_address (String)

    The IP address assigned to the transit gateway multicast group.

  • :network_interface_ids (Array<String>)

    The IDs of the group members\' network interfaces.

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

See Also:

#deregister_transit_gateway_multicast_group_sources(options = {}) ⇒ Types::DeregisterTransitGatewayMulticastGroupSourcesResult

Deregisters the specified sources (network interfaces) from the transit gateway multicast group.

Examples:

Request syntax with placeholder values


resp = client.deregister_transit_gateway_multicast_group_sources({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  group_ip_address: "String",
  network_interface_ids: ["NetworkInterfaceId"],
  dry_run: false,
})

Response structure


resp.deregistered_multicast_group_sources.transit_gateway_multicast_domain_id #=> String
resp.deregistered_multicast_group_sources.deregistered_network_interface_ids #=> Array
resp.deregistered_multicast_group_sources.deregistered_network_interface_ids[0] #=> String
resp.deregistered_multicast_group_sources.group_ip_address #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :group_ip_address (String)

    The IP address assigned to the transit gateway multicast group.

  • :network_interface_ids (Array<String>)

    The IDs of the group sources\' network interfaces.

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

See Also:

#describe_account_attributes(options = {}) ⇒ Types::DescribeAccountAttributesResult

Describes attributes of your AWS account. The following are the supported account attributes:

  • supported-platforms: Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.

  • default-vpc: The ID of the default VPC for your account, or none.

  • max-instances: This attribute is no longer supported. The returned value does not reflect your actual vCPU limit for running On-Demand Instances. For more information, see On-Demand Instance Limits in the Amazon Elastic Compute Cloud User Guide.

  • vpc-max-security-groups-per-interface: The maximum number of security groups that you can assign to a network interface.

  • max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.

  • vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.

Examples:

Example: To describe a single attribute for your AWS account


# This example describes the supported-platforms attribute for your AWS account.

resp = client.({
  attribute_names: [
    "supported-platforms", 
  ], 
})

# resp.to_h outputs the following:
{
  account_attributes: [
    {
      attribute_name: "supported-platforms", 
      attribute_values: [
        {
          attribute_value: "EC2", 
        }, 
        {
          attribute_value: "VPC", 
        }, 
      ], 
    }, 
  ], 
}

Example: To describe all attributes for your AWS account


# This example describes the attributes for your AWS account.

resp = client.({
})

# resp.to_h outputs the following:
{
  account_attributes: [
    {
      attribute_name: "supported-platforms", 
      attribute_values: [
        {
          attribute_value: "EC2", 
        }, 
        {
          attribute_value: "VPC", 
        }, 
      ], 
    }, 
    {
      attribute_name: "vpc-max-security-groups-per-interface", 
      attribute_values: [
        {
          attribute_value: "5", 
        }, 
      ], 
    }, 
    {
      attribute_name: "max-elastic-ips", 
      attribute_values: [
        {
          attribute_value: "5", 
        }, 
      ], 
    }, 
    {
      attribute_name: "max-instances", 
      attribute_values: [
        {
          attribute_value: "20", 
        }, 
      ], 
    }, 
    {
      attribute_name: "vpc-max-elastic-ips", 
      attribute_values: [
        {
          attribute_value: "5", 
        }, 
      ], 
    }, 
    {
      attribute_name: "default-vpc", 
      attribute_values: [
        {
          attribute_value: "none", 
        }, 
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.({
  attribute_names: ["supported-platforms"], # accepts supported-platforms, default-vpc
  dry_run: false,
})

Response structure


resp. #=> Array
resp.[0].attribute_name #=> String
resp.[0].attribute_values #=> Array
resp.[0].attribute_values[0].attribute_value #=> String

Options Hash (options):

  • :attribute_names (Array<String>)

    The account attribute names.

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

See Also:

#describe_addresses(options = {}) ⇒ Types::DescribeAddressesResult

Describes the specified Elastic IP addresses or all of your Elastic IP addresses.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe your Elastic IP addresses


# This example describes your Elastic IP addresses.

resp = client.describe_addresses({
})

# resp.to_h outputs the following:
{
  addresses: [
    {
      domain: "standard", 
      instance_id: "i-1234567890abcdef0", 
      public_ip: "198.51.100.0", 
    }, 
    {
      allocation_id: "eipalloc-12345678", 
      association_id: "eipassoc-12345678", 
      domain: "vpc", 
      instance_id: "i-1234567890abcdef0", 
      network_interface_id: "eni-12345678", 
      network_interface_owner_id: "123456789012", 
      private_ip_address: "10.0.1.241", 
      public_ip: "203.0.113.0", 
    }, 
  ], 
}

Example: To describe your Elastic IP addresses for EC2-VPC


# This example describes your Elastic IP addresses for use with instances in a VPC.

resp = client.describe_addresses({
  filters: [
    {
      name: "domain", 
      values: [
        "vpc", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  addresses: [
    {
      allocation_id: "eipalloc-12345678", 
      association_id: "eipassoc-12345678", 
      domain: "vpc", 
      instance_id: "i-1234567890abcdef0", 
      network_interface_id: "eni-12345678", 
      network_interface_owner_id: "123456789012", 
      private_ip_address: "10.0.1.241", 
      public_ip: "203.0.113.0", 
    }, 
  ], 
}

Example: To describe your Elastic IP addresses for EC2-Classic


# This example describes your Elastic IP addresses for use with instances in EC2-Classic.

resp = client.describe_addresses({
  filters: [
    {
      name: "domain", 
      values: [
        "standard", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  addresses: [
    {
      domain: "standard", 
      instance_id: "i-1234567890abcdef0", 
      public_ip: "198.51.100.0", 
    }, 
  ], 
}

Request syntax with placeholder values


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

Response structure


resp.addresses #=> Array
resp.addresses[0].instance_id #=> String
resp.addresses[0].public_ip #=> String
resp.addresses[0].allocation_id #=> String
resp.addresses[0].association_id #=> String
resp.addresses[0].domain #=> String, one of "vpc", "standard"
resp.addresses[0].network_interface_id #=> String
resp.addresses[0].network_interface_owner_id #=> String
resp.addresses[0].private_ip_address #=> String
resp.addresses[0].tags #=> Array
resp.addresses[0].tags[0].key #=> String
resp.addresses[0].tags[0].value #=> String
resp.addresses[0].public_ipv_4_pool #=> String
resp.addresses[0].network_border_group #=> String
resp.addresses[0].customer_owned_ip #=> String
resp.addresses[0].customer_owned_ipv_4_pool #=> String
resp.addresses[0].carrier_ip #=> String

Options Hash (options):

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

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

    • allocation-id - [EC2-VPC] The allocation ID for the address.

    • association-id - [EC2-VPC] The association ID for the address.

    • domain - Indicates whether the address is for use in EC2-Classic (standard) or in a VPC (vpc).

    • 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 AWS advertises IP addresses.

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

    • network-interface-owner-id - The AWS account ID of the owner.

    • private-ip-address - [EC2-VPC] 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.

  • :public_ips (Array<String>)

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

  • :allocation_ids (Array<String>)

    [EC2-VPC] Information about the allocation IDs.

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

See Also:

#describe_aggregate_id_format(options = {}) ⇒ Types::DescribeAggregateIdFormatResult

Describes the longer ID format settings for all resource types in a specific Region. This request is useful for performing a quick audit to determine whether a specific Region is fully opted in for longer IDs (17-character IDs).

This request only returns information about resource types that support longer IDs.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

Examples:

Request syntax with placeholder values


resp = client.describe_aggregate_id_format({
  dry_run: false,
})

Response structure


resp.use_long_ids_aggregated #=> true/false
resp.statuses #=> Array
resp.statuses[0].deadline #=> Time
resp.statuses[0].resource #=> String
resp.statuses[0].use_long_ids #=> true/false

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.

Returns:

See Also:

#describe_availability_zones(options = {}) ⇒ Types::DescribeAvailabilityZonesResult

Describes the Availability Zones, Local Zones, and Wavelength Zones that are available to you. If there is an event impacting a zone, you can use this request to view the state and any provided messages for that zone.

For more information about Availability Zones, Local Zones, and Wavelength Zones, see Regions, Zones and Outposts in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe your Availability Zones


# This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.

resp = client.describe_availability_zones({
})

# resp.to_h outputs the following:
{
  availability_zones: [
    {
      messages: [
      ], 
      region_name: "us-east-1", 
      state: "available", 
      zone_name: "us-east-1b", 
    }, 
    {
      messages: [
      ], 
      region_name: "us-east-1", 
      state: "available", 
      zone_name: "us-east-1c", 
    }, 
    {
      messages: [
      ], 
      region_name: "us-east-1", 
      state: "available", 
      zone_name: "us-east-1d", 
    }, 
    {
      messages: [
      ], 
      region_name: "us-east-1", 
      state: "available", 
      zone_name: "us-east-1e", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_availability_zones({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  zone_names: ["String"],
  zone_ids: ["String"],
  all_availability_zones: false,
  dry_run: false,
})

Response structure


resp.availability_zones #=> Array
resp.availability_zones[0].state #=> String, one of "available", "information", "impaired", "unavailable"
resp.availability_zones[0].opt_in_status #=> String, one of "opt-in-not-required", "opted-in", "not-opted-in"
resp.availability_zones[0].messages #=> Array
resp.availability_zones[0].messages[0].message #=> String
resp.availability_zones[0].region_name #=> String
resp.availability_zones[0].zone_name #=> String
resp.availability_zones[0].zone_id #=> String
resp.availability_zones[0].group_name #=> String
resp.availability_zones[0].network_border_group #=> String
resp.availability_zones[0].zone_type #=> String
resp.availability_zones[0].parent_zone_name #=> String
resp.availability_zones[0].parent_zone_id #=> String

Options Hash (options):

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

    The filters.

    • group-name - For Availability Zones, use the Region name. For Local Zones, use the name of the group associated with the Local Zone (for example, us-west-2-lax-1) For Wavelength Zones, use the name of the group associated with the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

    • message - The Zone message.

    • opt-in-status - The opt-in status (opted-in, and not-opted-in | opt-in-not-required).

    • parent-zoneID - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.

    • parent-zoneName - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.

    • region-name - The name of the Region for the Zone (for example, us-east-1).

    • state - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (available | information | impaired | unavailable).

    • zone-id - The ID of the Availability Zone (for example, use1-az1), the Local Zone (for example, usw2-lax1-az1), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

    • zone-type - The type of zone, for example, local-zone.

    • zone-name - The name of the Availability Zone (for example, us-east-1a), the Local Zone (for example, us-west-2-lax-1a), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1).

    • zone-type - The type of zone, for example, local-zone.

  • :zone_names (Array<String>)

    The names of the Availability Zones, Local Zones, and Wavelength Zones.

  • :zone_ids (Array<String>)

    The IDs of the Availability Zones, Local Zones, and Wavelength Zones.

  • :all_availability_zones (Boolean)

    Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.

    If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.

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

See Also:

#describe_bundle_tasks(options = {}) ⇒ Types::DescribeBundleTasksResult

Describes the specified bundle tasks or all of your bundle tasks.

Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and image manifest name you provided to the bundle task.

Examples:

Request syntax with placeholder values


resp = client.describe_bundle_tasks({
  bundle_ids: ["BundleId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
})

Response structure


resp.bundle_tasks #=> Array
resp.bundle_tasks[0].bundle_id #=> String
resp.bundle_tasks[0].bundle_task_error.code #=> String
resp.bundle_tasks[0].bundle_task_error.message #=> String
resp.bundle_tasks[0].instance_id #=> String
resp.bundle_tasks[0].progress #=> String
resp.bundle_tasks[0].start_time #=> Time
resp.bundle_tasks[0].state #=> String, one of "pending", "waiting-for-shutdown", "bundling", "storing", "cancelling", "complete", "failed"
resp.bundle_tasks[0].storage.s3.aws_access_key_id #=> String
resp.bundle_tasks[0].storage.s3.bucket #=> String
resp.bundle_tasks[0].storage.s3.prefix #=> String
resp.bundle_tasks[0].storage.s3.upload_policy #=> IO
resp.bundle_tasks[0].storage.s3.upload_policy_signature #=> String
resp.bundle_tasks[0].update_time #=> Time

Options Hash (options):

  • :bundle_ids (Array<String>)

    The bundle task IDs.

    Default: Describes all your bundle tasks.

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

    The filters.

    • bundle-id - The ID of the bundle task.

    • error-code - If the task failed, the error code returned.

    • error-message - If the task failed, the error message returned.

    • instance-id - The ID of the instance.

    • progress - The level of task completion, as a percentage (for example, 20%).

    • s3-bucket - The Amazon S3 bucket to store the AMI.

    • s3-prefix - The beginning of the AMI name.

    • start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).

    • state - The state of the task (pending | waiting-for-shutdown | bundling | storing | cancelling | complete | failed).

    • update-time - The time of the most recent update for the task.

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

See Also:

#describe_byoip_cidrs(options = {}) ⇒ Types::DescribeByoipCidrsResult

Describes the IP address ranges that were specified in calls to ProvisionByoipCidr.

To describe the address pools that were created when you provisioned the address ranges, use DescribePublicIpv4Pools or DescribeIpv6Pools.

Examples:

Request syntax with placeholder values


resp = client.describe_byoip_cidrs({
  dry_run: false,
  max_results: 1, # required
  next_token: "NextToken",
})

Response structure


resp.byoip_cidrs #=> Array
resp.byoip_cidrs[0].cidr #=> String
resp.byoip_cidrs[0].description #=> String
resp.byoip_cidrs[0].status_message #=> String
resp.byoip_cidrs[0].state #=> String, one of "advertised", "deprovisioned", "failed-deprovision", "failed-provision", "pending-deprovision", "pending-provision", "provisioned", "provisioned-not-publicly-advertisable"
resp.next_token #=> String

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.

  • :max_results (required, Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_capacity_reservations(options = {}) ⇒ Types::DescribeCapacityReservationsResult

Describes one or more of your Capacity Reservations. The results describe only the Capacity Reservations in the AWS Region that you're currently using.

Examples:

Request syntax with placeholder values


resp = client.describe_capacity_reservations({
  capacity_reservation_ids: ["CapacityReservationId"],
  next_token: "String",
  max_results: 1,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
})

Response structure


resp.next_token #=> String
resp.capacity_reservations #=> Array
resp.capacity_reservations[0].capacity_reservation_id #=> String
resp.capacity_reservations[0].owner_id #=> String
resp.capacity_reservations[0].capacity_reservation_arn #=> String
resp.capacity_reservations[0].availability_zone_id #=> String
resp.capacity_reservations[0].instance_type #=> String
resp.capacity_reservations[0].instance_platform #=> String, one of "Linux/UNIX", "Red Hat Enterprise Linux", "SUSE Linux", "Windows", "Windows with SQL Server", "Windows with SQL Server Enterprise", "Windows with SQL Server Standard", "Windows with SQL Server Web", "Linux with SQL Server Standard", "Linux with SQL Server Web", "Linux with SQL Server Enterprise"
resp.capacity_reservations[0].availability_zone #=> String
resp.capacity_reservations[0].tenancy #=> String, one of "default", "dedicated"
resp.capacity_reservations[0].total_instance_count #=> Integer
resp.capacity_reservations[0].available_instance_count #=> Integer
resp.capacity_reservations[0].ebs_optimized #=> true/false
resp.capacity_reservations[0].ephemeral_storage #=> true/false
resp.capacity_reservations[0].state #=> String, one of "active", "expired", "cancelled", "pending", "failed"
resp.capacity_reservations[0].end_date #=> Time
resp.capacity_reservations[0].end_date_type #=> String, one of "unlimited", "limited"
resp.capacity_reservations[0].instance_match_criteria #=> String, one of "open", "targeted"
resp.capacity_reservations[0].create_date #=> Time
resp.capacity_reservations[0].tags #=> Array
resp.capacity_reservations[0].tags[0].key #=> String
resp.capacity_reservations[0].tags[0].value #=> String

Options Hash (options):

  • :capacity_reservation_ids (Array<String>)

    The ID of the Capacity Reservation.

  • :next_token (String)

    The token to use to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

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

    One or more filters.

    • instance-type - The type of instance for which the Capacity Reservation reserves capacity.

    • owner-id - The ID of the AWS account that owns the Capacity Reservation.

    • availability-zone-id - The Availability Zone ID of the Capacity Reservation.

    • instance-platform - The type of operating system for which the Capacity Reservation reserves capacity.

    • availability-zone - The Availability Zone ID of the Capacity Reservation.

    • tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

      • default - The Capacity Reservation is created on hardware that is shared with other AWS accounts.

      • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account.

    • state - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

      • active- The Capacity Reservation is active and the capacity is available for your use.

      • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

      • cancelled - The Capacity Reservation was manually cancelled. The reserved capacity is no longer available for your use.

      • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

      • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

    • end-date - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation\'s state changes to expired when it reaches its end date and time.

    • end-date-type - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

      • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

      • limited - The Capacity Reservation expires automatically at a specified date and time.

    • instance-match-criteria - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

      • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

      • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

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

See Also:

#describe_carrier_gateways(options = {}) ⇒ Types::DescribeCarrierGatewaysResult

Describes one or more of your carrier gateways.

Examples:

Request syntax with placeholder values


resp = client.describe_carrier_gateways({
  carrier_gateway_ids: ["CarrierGatewayId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.carrier_gateways #=> Array
resp.carrier_gateways[0].carrier_gateway_id #=> String
resp.carrier_gateways[0].vpc_id #=> String
resp.carrier_gateways[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.carrier_gateways[0].owner_id #=> String
resp.carrier_gateways[0].tags #=> Array
resp.carrier_gateways[0].tags[0].key #=> String
resp.carrier_gateways[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :carrier_gateway_ids (Array<String>)

    One or more carrier gateway IDs.

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

    One or more filters.

    • carrier-gateway-id - The ID of the carrier gateway.

    • state - The state of the carrier gateway (pending | failed | available | deleting | deleted).

    • owner-id - The AWS account ID of the owner of the carrier gateway.

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

    • vpc-id - The ID of the VPC associated with the carrier gateway.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot use this request to return information about other instances.

Examples:

Request syntax with placeholder values


resp = client.describe_classic_link_instances({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  instance_ids: ["InstanceId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.instances #=> Array
resp.instances[0].groups #=> Array
resp.instances[0].groups[0].group_name #=> String
resp.instances[0].groups[0].group_id #=> String
resp.instances[0].instance_id #=> String
resp.instances[0].tags #=> Array
resp.instances[0].tags[0].key #=> String
resp.instances[0].tags[0].value #=> String
resp.instances[0].vpc_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • group-id - The ID of a VPC security group that\'s associated with the instance.

    • instance-id - The ID of the instance.

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

    • vpc-id - The ID of the VPC to which the instance is linked.

      vpc-id - The ID of the VPC that the instance is linked to.

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

  • :instance_ids (Array<String>)

    One or more instance IDs. Must be instances linked to a VPC through ClassicLink.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    Constraint: If the value is greater than 1000, we return only 1000 items.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_client_vpn_authorization_rules(options = {}) ⇒ Types::DescribeClientVpnAuthorizationRulesResult

Describes the authorization rules for a specified Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.describe_client_vpn_authorization_rules({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  dry_run: false,
  next_token: "NextToken",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
})

Response structure


resp.authorization_rules #=> Array
resp.authorization_rules[0].client_vpn_endpoint_id #=> String
resp.authorization_rules[0].description #=> String
resp.authorization_rules[0].group_id #=> String
resp.authorization_rules[0].access_all #=> true/false
resp.authorization_rules[0].destination_cidr #=> String
resp.authorization_rules[0].status.code #=> String, one of "authorizing", "active", "failed", "revoking"
resp.authorization_rules[0].status.message #=> String
resp.next_token #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

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

  • :next_token (String)

    The token to retrieve the next page of results.

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

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

    • description - The description of the authorization rule.

    • destination-cidr - The CIDR of the network to which the authorization rule applies.

    • group-id - The ID of the Active Directory group to which the authorization rule grants access.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

Returns:

See Also:

#describe_client_vpn_connections(options = {}) ⇒ Types::DescribeClientVpnConnectionsResult

Describes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.describe_client_vpn_connections({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  next_token: "NextToken",
  max_results: 1,
  dry_run: false,
})

Response structure


resp.connections #=> Array
resp.connections[0].client_vpn_endpoint_id #=> String
resp.connections[0].timestamp #=> String
resp.connections[0].connection_id #=> String
resp.connections[0].username #=> String
resp.connections[0].connection_established_time #=> String
resp.connections[0].ingress_bytes #=> String
resp.connections[0].egress_bytes #=> String
resp.connections[0].ingress_packets #=> String
resp.connections[0].egress_packets #=> String
resp.connections[0].client_ip #=> String
resp.connections[0].common_name #=> String
resp.connections[0].status.code #=> String, one of "active", "failed-to-terminate", "terminating", "terminated"
resp.connections[0].status.message #=> String
resp.connections[0].connection_end_time #=> String
resp.connections[0].posture_compliance_statuses #=> Array
resp.connections[0].posture_compliance_statuses[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

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

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

    • connection-id - The ID of the connection.

    • username - For Active Directory client authentication, the user name of the client who established the client connection.

  • :next_token (String)

    The token to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

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

See Also:

#describe_client_vpn_endpoints(options = {}) ⇒ Types::DescribeClientVpnEndpointsResult

Describes one or more Client VPN endpoints in the account.

Examples:

Request syntax with placeholder values


resp = client.describe_client_vpn_endpoints({
  client_vpn_endpoint_ids: ["ClientVpnEndpointId"],
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
})

Response structure


resp.client_vpn_endpoints #=> Array
resp.client_vpn_endpoints[0].client_vpn_endpoint_id #=> String
resp.client_vpn_endpoints[0].description #=> String
resp.client_vpn_endpoints[0].status.code #=> String, one of "pending-associate", "available", "deleting", "deleted"
resp.client_vpn_endpoints[0].status.message #=> String
resp.client_vpn_endpoints[0].creation_time #=> String
resp.client_vpn_endpoints[0].deletion_time #=> String
resp.client_vpn_endpoints[0].dns_name #=> String
resp.client_vpn_endpoints[0].client_cidr_block #=> String
resp.client_vpn_endpoints[0].dns_servers #=> Array
resp.client_vpn_endpoints[0].dns_servers[0] #=> String
resp.client_vpn_endpoints[0].split_tunnel #=> true/false
resp.client_vpn_endpoints[0].vpn_protocol #=> String, one of "openvpn"
resp.client_vpn_endpoints[0].transport_protocol #=> String, one of "tcp", "udp"
resp.client_vpn_endpoints[0].vpn_port #=> Integer
resp.client_vpn_endpoints[0].associated_target_networks #=> Array
resp.client_vpn_endpoints[0].associated_target_networks[0].network_id #=> String
resp.client_vpn_endpoints[0].associated_target_networks[0].network_type #=> String, one of "vpc"
resp.client_vpn_endpoints[0].server_certificate_arn #=> String
resp.client_vpn_endpoints[0].authentication_options #=> Array
resp.client_vpn_endpoints[0].authentication_options[0].type #=> String, one of "certificate-authentication", "directory-service-authentication", "federated-authentication"
resp.client_vpn_endpoints[0].authentication_options[0].active_directory.directory_id #=> String
resp.client_vpn_endpoints[0].authentication_options[0].mutual_authentication.client_root_certificate_chain #=> String
resp.client_vpn_endpoints[0].authentication_options[0].federated_authentication.saml_provider_arn #=> String
resp.client_vpn_endpoints[0].authentication_options[0].federated_authentication.self_service_saml_provider_arn #=> String
resp.client_vpn_endpoints[0].connection_log_options.enabled #=> true/false
resp.client_vpn_endpoints[0].connection_log_options.cloudwatch_log_group #=> String
resp.client_vpn_endpoints[0].connection_log_options.cloudwatch_log_stream #=> String
resp.client_vpn_endpoints[0].tags #=> Array
resp.client_vpn_endpoints[0].tags[0].key #=> String
resp.client_vpn_endpoints[0].tags[0].value #=> String
resp.client_vpn_endpoints[0].security_group_ids #=> Array
resp.client_vpn_endpoints[0].security_group_ids[0] #=> String
resp.client_vpn_endpoints[0].vpc_id #=> String
resp.client_vpn_endpoints[0].self_service_portal_url #=> String
resp.client_vpn_endpoints[0].client_connect_options.enabled #=> true/false
resp.client_vpn_endpoints[0].client_connect_options.lambda_function_arn #=> String
resp.client_vpn_endpoints[0].client_connect_options.status.code #=> String, one of "applying", "applied"
resp.client_vpn_endpoints[0].client_connect_options.status.message #=> String
resp.next_token #=> String

Options Hash (options):

  • :client_vpn_endpoint_ids (Array<String>)

    The ID of the Client VPN endpoint.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

  • :next_token (String)

    The token to retrieve the next page of results.

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

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

    • endpoint-id - The ID of the Client VPN endpoint.

    • transport-protocol - The transport protocol (tcp | udp).

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

See Also:

#describe_client_vpn_routes(options = {}) ⇒ Types::DescribeClientVpnRoutesResult

Describes the routes for the specified Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.describe_client_vpn_routes({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
  dry_run: false,
})

Response structure


resp.routes #=> Array
resp.routes[0].client_vpn_endpoint_id #=> String
resp.routes[0].destination_cidr #=> String
resp.routes[0].target_subnet #=> String
resp.routes[0].type #=> String
resp.routes[0].origin #=> String
resp.routes[0].status.code #=> String, one of "creating", "active", "failed", "deleting"
resp.routes[0].status.message #=> String
resp.routes[0].description #=> String
resp.next_token #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

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

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

    • destination-cidr - The CIDR of the route destination.

    • origin - How the route was associated with the Client VPN endpoint (associate | add-route).

    • target-subnet - The ID of the subnet through which traffic is routed.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

  • :next_token (String)

    The token to retrieve the next page of results.

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

See Also:

#describe_client_vpn_target_networks(options = {}) ⇒ Types::DescribeClientVpnTargetNetworksResult

Describes the target networks associated with the specified Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.describe_client_vpn_target_networks({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  association_ids: ["String"],
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
})

Response structure


resp.client_vpn_target_networks #=> Array
resp.client_vpn_target_networks[0].association_id #=> String
resp.client_vpn_target_networks[0].vpc_id #=> String
resp.client_vpn_target_networks[0].target_network_id #=> String
resp.client_vpn_target_networks[0].client_vpn_endpoint_id #=> String
resp.client_vpn_target_networks[0].status.code #=> String, one of "associating", "associated", "association-failed", "disassociating", "disassociated"
resp.client_vpn_target_networks[0].status.message #=> String
resp.client_vpn_target_networks[0].security_groups #=> Array
resp.client_vpn_target_networks[0].security_groups[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

  • :association_ids (Array<String>)

    The IDs of the target network associations.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.

  • :next_token (String)

    The token to retrieve the next page of results.

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

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

    • association-id - The ID of the association.

    • target-network-id - The ID of the subnet specified as the target network.

    • vpc-id - The ID of the VPC in which the target network is located.

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

See Also:

#describe_coip_pools(options = {}) ⇒ Types::DescribeCoipPoolsResult

Describes the specified customer-owned address pools or all of your customer-owned address pools.

Examples:

Request syntax with placeholder values


resp = client.describe_coip_pools({
  pool_ids: ["CoipPoolId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.coip_pools #=> Array
resp.coip_pools[0].pool_id #=> String
resp.coip_pools[0].pool_cidrs #=> Array
resp.coip_pools[0].pool_cidrs[0] #=> String
resp.coip_pools[0].local_gateway_route_table_id #=> String
resp.coip_pools[0].tags #=> Array
resp.coip_pools[0].tags[0].key #=> String
resp.coip_pools[0].tags[0].value #=> String
resp.coip_pools[0].pool_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :pool_ids (Array<String>)

    The IDs of the address pools.

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

    The filters. The following are the possible values:

    • coip-pool.pool-id

    ^ ^

    • coip-pool.local-gateway-route-table-id

    ^

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_conversion_tasks(options = {}) ⇒ Types::DescribeConversionTasksResult

Describes the specified conversion tasks or all your conversion tasks. For more information, see the VM Import/Export User Guide.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Examples:

Request syntax with placeholder values


resp = client.describe_conversion_tasks({
  conversion_task_ids: ["ConversionTaskId"],
  dry_run: false,
})

Response structure


resp.conversion_tasks #=> Array
resp.conversion_tasks[0].conversion_task_id #=> String
resp.conversion_tasks[0].expiration_time #=> String
resp.conversion_tasks[0].import_instance.description #=> String
resp.conversion_tasks[0].import_instance.instance_id #=> String
resp.conversion_tasks[0].import_instance.platform #=> String, one of "Windows"
resp.conversion_tasks[0].import_instance.volumes #=> Array
resp.conversion_tasks[0].import_instance.volumes[0].availability_zone #=> String
resp.conversion_tasks[0].import_instance.volumes[0].bytes_converted #=> Integer
resp.conversion_tasks[0].import_instance.volumes[0].description #=> String
resp.conversion_tasks[0].import_instance.volumes[0].image.checksum #=> String
resp.conversion_tasks[0].import_instance.volumes[0].image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_tasks[0].import_instance.volumes[0].image.import_manifest_url #=> String
resp.conversion_tasks[0].import_instance.volumes[0].image.size #=> Integer
resp.conversion_tasks[0].import_instance.volumes[0].status #=> String
resp.conversion_tasks[0].import_instance.volumes[0].status_message #=> String
resp.conversion_tasks[0].import_instance.volumes[0].volume.id #=> String
resp.conversion_tasks[0].import_instance.volumes[0].volume.size #=> Integer
resp.conversion_tasks[0].import_volume.availability_zone #=> String
resp.conversion_tasks[0].import_volume.bytes_converted #=> Integer
resp.conversion_tasks[0].import_volume.description #=> String
resp.conversion_tasks[0].import_volume.image.checksum #=> String
resp.conversion_tasks[0].import_volume.image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_tasks[0].import_volume.image.import_manifest_url #=> String
resp.conversion_tasks[0].import_volume.image.size #=> Integer
resp.conversion_tasks[0].import_volume.volume.id #=> String
resp.conversion_tasks[0].import_volume.volume.size #=> Integer
resp.conversion_tasks[0].state #=> String, one of "active", "cancelling", "cancelled", "completed"
resp.conversion_tasks[0].status_message #=> String
resp.conversion_tasks[0].tags #=> Array
resp.conversion_tasks[0].tags[0].key #=> String
resp.conversion_tasks[0].tags[0].value #=> String

Options Hash (options):

  • :conversion_task_ids (Array<String>)

    The conversion task IDs.

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

See Also:

#describe_customer_gateways(options = {}) ⇒ Types::DescribeCustomerGatewaysResult

Describes one or more of your VPN customer gateways.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Example: To describe a customer gateway


# This example describes the specified customer gateway.

resp = client.describe_customer_gateways({
  customer_gateway_ids: [
    "cgw-0e11f167", 
  ], 
})

# resp.to_h outputs the following:
{
  customer_gateways: [
    {
      bgp_asn: "65534", 
      customer_gateway_id: "cgw-0e11f167", 
      ip_address: "12.1.2.3", 
      state: "available", 
      type: "ipsec.1", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_customer_gateways({
  customer_gateway_ids: ["CustomerGatewayId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
})

Response structure


resp.customer_gateways #=> Array
resp.customer_gateways[0].bgp_asn #=> String
resp.customer_gateways[0].customer_gateway_id #=> String
resp.customer_gateways[0].ip_address #=> String
resp.customer_gateways[0].certificate_arn #=> String
resp.customer_gateways[0].state #=> String
resp.customer_gateways[0].type #=> String
resp.customer_gateways[0].device_name #=> String
resp.customer_gateways[0].tags #=> Array
resp.customer_gateways[0].tags[0].key #=> String
resp.customer_gateways[0].tags[0].value #=> String

Options Hash (options):

  • :customer_gateway_ids (Array<String>)

    One or more customer gateway IDs.

    Default: Describes all your customer gateways.

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

    One or more filters.

    • bgp-asn - The customer gateway\'s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

    • customer-gateway-id - The ID of the customer gateway.

    • ip-address - The IP address of the customer gateway\'s Internet-routable external interface.

    • state - The state of the customer gateway (pending | available | deleting | deleted).

    • type - The type of customer gateway. Currently, the only supported type is ipsec.1.

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

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

See Also:

#describe_dhcp_options(options = {}) ⇒ Types::DescribeDhcpOptionsResult

Describes one or more of your DHCP options sets.

For more information, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To describe a DHCP options set


# This example describes the specified DHCP options set.

resp = client.describe_dhcp_options({
  dhcp_options_ids: [
    "dopt-d9070ebb", 
  ], 
})

# resp.to_h outputs the following:
{
  dhcp_options: [
    {
      dhcp_configurations: [
        {
          key: "domain-name-servers", 
          values: [
            {
              value: "10.2.5.2", 
            }, 
            {
              value: "10.2.5.1", 
            }, 
          ], 
        }, 
      ], 
      dhcp_options_id: "dopt-d9070ebb", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_dhcp_options({
  dhcp_options_ids: ["DhcpOptionsId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  next_token: "String",
  max_results: 1,
})

Response structure


resp.dhcp_options #=> Array
resp.dhcp_options[0].dhcp_configurations #=> Array
resp.dhcp_options[0].dhcp_configurations[0].key #=> String
resp.dhcp_options[0].dhcp_configurations[0].values #=> Array
resp.dhcp_options[0].dhcp_configurations[0].values[0] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.dhcp_options[0].dhcp_options_id #=> String
resp.dhcp_options[0].owner_id #=> String
resp.dhcp_options[0].tags #=> Array
resp.dhcp_options[0].tags[0].key #=> String
resp.dhcp_options[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :dhcp_options_ids (Array<String>)

    The IDs of one or more DHCP options sets.

    Default: Describes all your DHCP options sets.

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

    One or more filters.

    • dhcp-options-id - The ID of a DHCP options set.

    • key - The key for one of the options (for example, domain-name).

    • value - The value for one of the options.

    • owner-id - The ID of the AWS account that owns the DHCP options set.

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

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

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_egress_only_internet_gateways(options = {}) ⇒ Types::DescribeEgressOnlyInternetGatewaysResult

Describes one or more of your egress-only internet gateways.

Examples:

Request syntax with placeholder values


resp = client.describe_egress_only_internet_gateways({
  dry_run: false,
  egress_only_internet_gateway_ids: ["EgressOnlyInternetGatewayId"],
  max_results: 1,
  next_token: "String",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.egress_only_internet_gateways #=> Array
resp.egress_only_internet_gateways[0].attachments #=> Array
resp.egress_only_internet_gateways[0].attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.egress_only_internet_gateways[0].attachments[0].vpc_id #=> String
resp.egress_only_internet_gateways[0].egress_only_internet_gateway_id #=> String
resp.egress_only_internet_gateways[0].tags #=> Array
resp.egress_only_internet_gateways[0].tags[0].key #=> String
resp.egress_only_internet_gateways[0].tags[0].value #=> String
resp.next_token #=> String

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.

  • :egress_only_internet_gateway_ids (Array<String>)

    One or more egress-only internet gateway IDs.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

    One or more filters.

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

Returns:

See Also:

#describe_elastic_gpus(options = {}) ⇒ Types::DescribeElasticGpusResult

Describes the Elastic Graphics accelerator associated with your instances. For more information about Elastic Graphics, see Amazon Elastic Graphics.

Examples:

Request syntax with placeholder values


resp = client.describe_elastic_gpus({
  elastic_gpu_ids: ["ElasticGpuId"],
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.elastic_gpu_set #=> Array
resp.elastic_gpu_set[0].elastic_gpu_id #=> String
resp.elastic_gpu_set[0].availability_zone #=> String
resp.elastic_gpu_set[0].elastic_gpu_type #=> String
resp.elastic_gpu_set[0].elastic_gpu_health.status #=> String, one of "OK", "IMPAIRED"
resp.elastic_gpu_set[0].elastic_gpu_state #=> String, one of "ATTACHED"
resp.elastic_gpu_set[0].instance_id #=> String
resp.elastic_gpu_set[0].tags #=> Array
resp.elastic_gpu_set[0].tags[0].key #=> String
resp.elastic_gpu_set[0].tags[0].value #=> String
resp.max_results #=> Integer
resp.next_token #=> String

Options Hash (options):

  • :elastic_gpu_ids (Array<String>)

    The Elastic Graphics accelerator IDs.

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

    • availability-zone - The Availability Zone in which the Elastic Graphics accelerator resides.

    • elastic-gpu-health - The status of the Elastic Graphics accelerator (OK | IMPAIRED).

    • elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED).

    • elastic-gpu-type - The type of Elastic Graphics accelerator; for example, eg1.medium.

    • instance-id - The ID of the instance to which the Elastic Graphics accelerator is associated.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:

#describe_export_image_tasks(options = {}) ⇒ Types::DescribeExportImageTasksResult

Describes the specified export image tasks or all of your export image tasks.

Examples:

Request syntax with placeholder values


resp = client.describe_export_image_tasks({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  export_image_task_ids: ["ExportImageTaskId"],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.export_image_tasks #=> Array
resp.export_image_tasks[0].description #=> String
resp.export_image_tasks[0].export_image_task_id #=> String
resp.export_image_tasks[0].image_id #=> String
resp.export_image_tasks[0].progress #=> String
resp.export_image_tasks[0].s3_export_location.s3_bucket #=> String
resp.export_image_tasks[0].s3_export_location.s3_prefix #=> String
resp.export_image_tasks[0].status #=> String
resp.export_image_tasks[0].status_message #=> String
resp.export_image_tasks[0].tags #=> Array
resp.export_image_tasks[0].tags[0].key #=> String
resp.export_image_tasks[0].tags[0].value #=> String
resp.next_token #=> String

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.

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

    Filter tasks using the task-state filter and one of the following values: active, completed, deleting, or deleted.

  • :export_image_task_ids (Array<String>)

    The IDs of the export image tasks.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :next_token (String)

    A token that indicates the next page of results.

Returns:

See Also:

#describe_export_tasks(options = {}) ⇒ Types::DescribeExportTasksResult

Describes the specified export instance tasks or all of your export instance tasks.

Examples:

Request syntax with placeholder values


resp = client.describe_export_tasks({
  export_task_ids: ["ExportTaskId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.export_tasks #=> Array
resp.export_tasks[0].description #=> String
resp.export_tasks[0].export_task_id #=> String
resp.export_tasks[0].export_to_s3_task.container_format #=> String, one of "ova"
resp.export_tasks[0].export_to_s3_task.disk_image_format #=> String, one of "VMDK", "RAW", "VHD"
resp.export_tasks[0].export_to_s3_task.s3_bucket #=> String
resp.export_tasks[0].export_to_s3_task.s3_key #=> String
resp.export_tasks[0].instance_export_details.instance_id #=> String
resp.export_tasks[0].instance_export_details.target_environment #=> String, one of "citrix", "vmware", "microsoft"
resp.export_tasks[0].state #=> String, one of "active", "cancelling", "cancelled", "completed"
resp.export_tasks[0].status_message #=> String
resp.export_tasks[0].tags #=> Array
resp.export_tasks[0].tags[0].key #=> String
resp.export_tasks[0].tags[0].value #=> String

Options Hash (options):

  • :export_task_ids (Array<String>)

    The export task IDs.

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

    the filters for the export tasks.

Returns:

See Also:

#describe_fast_snapshot_restores(options = {}) ⇒ Types::DescribeFastSnapshotRestoresResult

Describes the state of fast snapshot restores for your snapshots.

Examples:

Request syntax with placeholder values


resp = client.describe_fast_snapshot_restores({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
  dry_run: false,
})

Response structure


resp.fast_snapshot_restores #=> Array
resp.fast_snapshot_restores[0].snapshot_id #=> String
resp.fast_snapshot_restores[0].availability_zone #=> String
resp.fast_snapshot_restores[0].state #=> String, one of "enabling", "optimizing", "enabled", "disabling", "disabled"
resp.fast_snapshot_restores[0].state_transition_reason #=> String
resp.fast_snapshot_restores[0].owner_id #=> String
resp.fast_snapshot_restores[0].owner_alias #=> String
resp.fast_snapshot_restores[0].enabling_time #=> Time
resp.fast_snapshot_restores[0].optimizing_time #=> Time
resp.fast_snapshot_restores[0].enabled_time #=> Time
resp.fast_snapshot_restores[0].disabling_time #=> Time
resp.fast_snapshot_restores[0].disabled_time #=> Time
resp.next_token #=> String

Options Hash (options):

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

    The filters. The possible values are:

    • availability-zone: The Availability Zone of the snapshot.

    • owner-id: The ID of the AWS account that enabled fast snapshot restore on the snapshot.

    • snapshot-id: The ID of the snapshot.

    • state: The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled).

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_fleet_history(options = {}) ⇒ Types::DescribeFleetHistoryResult

Describes the events for the specified EC2 Fleet during the specified time.

EC2 Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. EC2 Fleet events are available for 48 hours.

Examples:

Request syntax with placeholder values


resp = client.describe_fleet_history({
  dry_run: false,
  event_type: "instance-change", # accepts instance-change, fleet-change, service-error
  max_results: 1,
  next_token: "String",
  fleet_id: "FleetId", # required
  start_time: Time.now, # required
})

Response structure


resp.history_records #=> Array
resp.history_records[0].event_information.event_description #=> String
resp.history_records[0].event_information.event_sub_type #=> String
resp.history_records[0].event_information.instance_id #=> String
resp.history_records[0].event_type #=> String, one of "instance-change", "fleet-change", "service-error"
resp.history_records[0].timestamp #=> Time
resp.last_evaluated_time #=> Time
resp.next_token #=> String
resp.fleet_id #=> String
resp.start_time #=> Time

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.

  • :event_type (String)

    The type of events to describe. By default, all events are described.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :fleet_id (required, String)

    The ID of the EC2 Fleet.

  • :start_time (required, Time)

    The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

See Also:

#describe_fleet_instances(options = {}) ⇒ Types::DescribeFleetInstancesResult

Describes the running instances for the specified EC2 Fleet.

Examples:

Request syntax with placeholder values


resp = client.describe_fleet_instances({
  dry_run: false,
  max_results: 1,
  next_token: "String",
  fleet_id: "FleetId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.active_instances #=> Array
resp.active_instances[0].instance_id #=> String
resp.active_instances[0].instance_type #=> String
resp.active_instances[0].spot_instance_request_id #=> String
resp.active_instances[0].instance_health #=> String, one of "healthy", "unhealthy"
resp.next_token #=> String
resp.fleet_id #=> String

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.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :fleet_id (required, String)

    The ID of the EC2 Fleet.

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

    The filters.

    • instance-type - The instance type.

    ^

Returns:

See Also:

#describe_fleets(options = {}) ⇒ Types::DescribeFleetsResult

Describes the specified EC2 Fleets or all of your EC2 Fleets.

Examples:

Request syntax with placeholder values


resp = client.describe_fleets({
  dry_run: false,
  max_results: 1,
  next_token: "String",
  fleet_ids: ["FleetId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.next_token #=> String
resp.fleets #=> Array
resp.fleets[0].activity_status #=> String, one of "error", "pending_fulfillment", "pending_termination", "fulfilled"
resp.fleets[0].create_time #=> Time
resp.fleets[0].fleet_id #=> String
resp.fleets[0].fleet_state #=> String, one of "submitted", "active", "deleted", "failed", "deleted_running", "deleted_terminating", "modifying"
resp.fleets[0].client_token #=> String
resp.fleets[0].excess_capacity_termination_policy #=> String, one of "no-termination", "termination"
resp.fleets[0].fulfilled_capacity #=> Float
resp.fleets[0].fulfilled_on_demand_capacity #=> Float
resp.fleets[0].launch_template_configs #=> Array
resp.fleets[0].launch_template_configs[0].launch_template_specification.launch_template_id #=> String
resp.fleets[0].launch_template_configs[0].launch_template_specification.launch_template_name #=> String
resp.fleets[0].launch_template_configs[0].launch_template_specification.version #=> String
resp.fleets[0].launch_template_configs[0].overrides #=> Array
resp.fleets[0].launch_template_configs[0].overrides[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.fleets[0].launch_template_configs[0].overrides[0].max_price #=> String
resp.fleets[0].launch_template_configs[0].overrides[0].subnet_id #=> String
resp.fleets[0].launch_template_configs[0].overrides[0].availability_zone #=> String
resp.fleets[0].launch_template_configs[0].overrides[0].weighted_capacity #=> Float
resp.fleets[0].launch_template_configs[0].overrides[0].priority #=> Float
resp.fleets[0].launch_template_configs[0].overrides[0].placement.group_name #=> String
resp.fleets[0].target_capacity_specification.total_target_capacity #=> Integer
resp.fleets[0].target_capacity_specification.on_demand_target_capacity #=> Integer
resp.fleets[0].target_capacity_specification.spot_target_capacity #=> Integer
resp.fleets[0].target_capacity_specification.default_target_capacity_type #=> String, one of "spot", "on-demand"
resp.fleets[0].terminate_instances_with_expiration #=> true/false
resp.fleets[0].type #=> String, one of "request", "maintain", "instant"
resp.fleets[0].valid_from #=> Time
resp.fleets[0].valid_until #=> Time
resp.fleets[0].replace_unhealthy_instances #=> true/false
resp.fleets[0].spot_options.allocation_strategy #=> String, one of "lowest-price", "diversified", "capacity-optimized"
resp.fleets[0].spot_options.maintenance_strategies.capacity_rebalance.replacement_strategy #=> String, one of "launch"
resp.fleets[0].spot_options.instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.fleets[0].spot_options.instance_pools_to_use_count #=> Integer
resp.fleets[0].spot_options.single_instance_type #=> true/false
resp.fleets[0].spot_options.single_availability_zone #=> true/false
resp.fleets[0].spot_options.min_target_capacity #=> Integer
resp.fleets[0].spot_options.max_total_price #=> String
resp.fleets[0].on_demand_options.allocation_strategy #=> String, one of "lowest-price", "prioritized"
resp.fleets[0].on_demand_options.capacity_reservation_options.usage_strategy #=> String, one of "use-capacity-reservations-first"
resp.fleets[0].on_demand_options.single_instance_type #=> true/false
resp.fleets[0].on_demand_options.single_availability_zone #=> true/false
resp.fleets[0].on_demand_options.min_target_capacity #=> Integer
resp.fleets[0].on_demand_options.max_total_price #=> String
resp.fleets[0].tags #=> Array
resp.fleets[0].tags[0].key #=> String
resp.fleets[0].tags[0].value #=> String
resp.fleets[0].errors #=> Array
resp.fleets[0].errors[0].launch_template_and_overrides.launch_template_specification.launch_template_id #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.launch_template_specification.launch_template_name #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.launch_template_specification.version #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.max_price #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.subnet_id #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.availability_zone #=> String
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.weighted_capacity #=> Float
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.priority #=> Float
resp.fleets[0].errors[0].launch_template_and_overrides.overrides.placement.group_name #=> String
resp.fleets[0].errors[0].lifecycle #=> String, one of "spot", "on-demand"
resp.fleets[0].errors[0].error_code #=> String
resp.fleets[0].errors[0].error_message #=> String
resp.fleets[0].instances #=> Array
resp.fleets[0].instances[0].launch_template_and_overrides.launch_template_specification.launch_template_id #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.launch_template_specification.launch_template_name #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.launch_template_specification.version #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.max_price #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.subnet_id #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.availability_zone #=> String
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.weighted_capacity #=> Float
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.priority #=> Float
resp.fleets[0].instances[0].launch_template_and_overrides.overrides.placement.group_name #=> String
resp.fleets[0].instances[0].lifecycle #=> String, one of "spot", "on-demand"
resp.fleets[0].instances[0].instance_ids #=> Array
resp.fleets[0].instances[0].instance_ids[0] #=> String
resp.fleets[0].instances[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.fleets[0].instances[0].platform #=> String, one of "Windows"

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.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :fleet_ids (Array<String>)

    The ID of the EC2 Fleets.

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

    The filters.

    • activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment | pending-termination | fulfilled).

    • excess-capacity-termination-policy - Indicates whether to terminate running instances if the target capacity is decreased below the current EC2 Fleet size (true | false).

    • fleet-state - The state of the EC2 Fleet (submitted | active | deleted | failed | deleted-running | deleted-terminating | modifying).

    • replace-unhealthy-instances - Indicates whether EC2 Fleet should replace unhealthy instances (true | false).

    • type - The type of request (instant | request | maintain).

Returns:

See Also:

#describe_flow_logs(options = {}) ⇒ Types::DescribeFlowLogsResult

Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.

Examples:

Request syntax with placeholder values


resp = client.describe_flow_logs({
  dry_run: false,
  filter: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  flow_log_ids: ["VpcFlowLogId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.flow_logs #=> Array
resp.flow_logs[0].creation_time #=> Time
resp.flow_logs[0].deliver_logs_error_message #=> String
resp.flow_logs[0].deliver_logs_permission_arn #=> String
resp.flow_logs[0].deliver_logs_status #=> String
resp.flow_logs[0].flow_log_id #=> String
resp.flow_logs[0].flow_log_status #=> String
resp.flow_logs[0].log_group_name #=> String
resp.flow_logs[0].resource_id #=> String
resp.flow_logs[0].traffic_type #=> String, one of "ACCEPT", "REJECT", "ALL"
resp.flow_logs[0].log_destination_type #=> String, one of "cloud-watch-logs", "s3"
resp.flow_logs[0].log_destination #=> String
resp.flow_logs[0].log_format #=> String
resp.flow_logs[0].tags #=> Array
resp.flow_logs[0].tags[0].key #=> String
resp.flow_logs[0].tags[0].value #=> String
resp.flow_logs[0].max_aggregation_interval #=> Integer
resp.next_token #=> String

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.

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

    One or more filters.

    • deliver-log-status - The status of the logs delivery (SUCCESS | FAILED).

    • log-destination-type - The type of destination to which the flow log publishes data. Possible destination types include cloud-watch-logs and s3.

    • flow-log-id - The ID of the flow log.

    • log-group-name - The name of the log group.

    • resource-id - The ID of the VPC, subnet, or network interface.

    • traffic-type - The type of traffic (ACCEPT | REJECT | ALL).

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

  • :flow_log_ids (Array<String>)

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_fpga_image_attribute(options = {}) ⇒ Types::DescribeFpgaImageAttributeResult

Describes the specified attribute of the specified Amazon FPGA Image (AFI).

Examples:

Request syntax with placeholder values


resp = client.describe_fpga_image_attribute({
  dry_run: false,
  fpga_image_id: "FpgaImageId", # required
  attribute: "description", # required, accepts description, name, loadPermission, productCodes
})

Response structure


resp.fpga_image_attribute.fpga_image_id #=> String
resp.fpga_image_attribute.name #=> String
resp.fpga_image_attribute.description #=> String
resp.fpga_image_attribute.load_permissions #=> Array
resp.fpga_image_attribute.load_permissions[0].user_id #=> String
resp.fpga_image_attribute.load_permissions[0].group #=> String, one of "all"
resp.fpga_image_attribute.product_codes #=> Array
resp.fpga_image_attribute.product_codes[0].product_code_id #=> String
resp.fpga_image_attribute.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"

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.

  • :fpga_image_id (required, String)

    The ID of the AFI.

  • :attribute (required, String)

    The AFI attribute.

Returns:

See Also:

#describe_fpga_images(options = {}) ⇒ Types::DescribeFpgaImagesResult

Describes the Amazon FPGA Images (AFIs) available to you. These include public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.

Examples:

Request syntax with placeholder values


resp = client.describe_fpga_images({
  dry_run: false,
  fpga_image_ids: ["FpgaImageId"],
  owners: ["String"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.fpga_images #=> Array
resp.fpga_images[0].fpga_image_id #=> String
resp.fpga_images[0].fpga_image_global_id #=> String
resp.fpga_images[0].name #=> String
resp.fpga_images[0].description #=> String
resp.fpga_images[0].shell_version #=> String
resp.fpga_images[0].pci_id.device_id #=> String
resp.fpga_images[0].pci_id.vendor_id #=> String
resp.fpga_images[0].pci_id.subsystem_id #=> String
resp.fpga_images[0].pci_id.subsystem_vendor_id #=> String
resp.fpga_images[0].state.code #=> String, one of "pending", "failed", "available", "unavailable"
resp.fpga_images[0].state.message #=> String
resp.fpga_images[0].create_time #=> Time
resp.fpga_images[0].update_time #=> Time
resp.fpga_images[0].owner_id #=> String
resp.fpga_images[0].owner_alias #=> String
resp.fpga_images[0].product_codes #=> Array
resp.fpga_images[0].product_codes[0].product_code_id #=> String
resp.fpga_images[0].product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.fpga_images[0].tags #=> Array
resp.fpga_images[0].tags[0].key #=> String
resp.fpga_images[0].tags[0].value #=> String
resp.fpga_images[0].public #=> true/false
resp.fpga_images[0].data_retention_support #=> true/false
resp.next_token #=> String

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.

  • :fpga_image_ids (Array<String>)

    The AFI IDs.

  • :owners (Array<String>)

    Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender of the request), or an AWS owner alias (valid values are amazon | aws-marketplace).

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

    The filters.

    • create-time - The creation time of the AFI.

    • fpga-image-id - The FPGA image identifier (AFI ID).

    • fpga-image-global-id - The global FPGA image identifier (AGFI ID).

    • name - The name of the AFI.

    • owner-id - The AWS account ID of the AFI owner.

    • product-code - The product code.

    • shell-version - The version of the AWS Shell that was used to create the bitstream.

    • state - The state of the AFI (pending | failed | available | unavailable).

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

    • update-time - The time of the most recent update.

  • :next_token (String)

    The token to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:

#describe_host_reservation_offerings(options = {}) ⇒ Types::DescribeHostReservationOfferingsResult

Describes the Dedicated Host reservations that are available to purchase.

The results describe all of the Dedicated Host reservation offerings, including offerings that might not match the instance family and Region of your Dedicated Hosts. When purchasing an offering, ensure that the instance family and Region of the offering matches that of the Dedicated Hosts with which it is to be associated. For more information about supported instance types, see Dedicated Hosts Overview in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_host_reservation_offerings({
  filter: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_duration: 1,
  max_results: 1,
  min_duration: 1,
  next_token: "String",
  offering_id: "OfferingId",
})

Response structure


resp.next_token #=> String
resp.offering_set #=> Array
resp.offering_set[0].currency_code #=> String, one of "USD"
resp.offering_set[0].duration #=> Integer
resp.offering_set[0].hourly_price #=> String
resp.offering_set[0].instance_family #=> String
resp.offering_set[0].offering_id #=> String
resp.offering_set[0].payment_option #=> String, one of "AllUpfront", "PartialUpfront", "NoUpfront"
resp.offering_set[0].upfront_price #=> String

Options Hash (options):

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

    The filters.

    • instance-family - The instance family of the offering (for example, m4).

    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

  • :max_duration (Integer)

    This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

  • :min_duration (Integer)

    This is the minimum duration of the reservation you\'d like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.

  • :next_token (String)

    The token to use to retrieve the next page of results.

  • :offering_id (String)

    The ID of the reservation offering.

Returns:

See Also:

#describe_host_reservations(options = {}) ⇒ Types::DescribeHostReservationsResult

Describes reservations that are associated with Dedicated Hosts in your account.

Examples:

Request syntax with placeholder values


resp = client.describe_host_reservations({
  filter: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  host_reservation_id_set: ["HostReservationId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.host_reservation_set #=> Array
resp.host_reservation_set[0].count #=> Integer
resp.host_reservation_set[0].currency_code #=> String, one of "USD"
resp.host_reservation_set[0].duration #=> Integer
resp.host_reservation_set[0].end #=> Time
resp.host_reservation_set[0].host_id_set #=> Array
resp.host_reservation_set[0].host_id_set[0] #=> String
resp.host_reservation_set[0].host_reservation_id #=> String
resp.host_reservation_set[0].hourly_price #=> String
resp.host_reservation_set[0].instance_family #=> String
resp.host_reservation_set[0].offering_id #=> String
resp.host_reservation_set[0].payment_option #=> String, one of "AllUpfront", "PartialUpfront", "NoUpfront"
resp.host_reservation_set[0].start #=> Time
resp.host_reservation_set[0].state #=> String, one of "payment-pending", "payment-failed", "active", "retired"
resp.host_reservation_set[0].upfront_price #=> String
resp.host_reservation_set[0].tags #=> Array
resp.host_reservation_set[0].tags[0].key #=> String
resp.host_reservation_set[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

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

    The filters.

    • instance-family - The instance family (for example, m4).

    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

    • state - The state of the reservation (payment-pending | payment-failed | active | retired).

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

  • :host_reservation_id_set (Array<String>)

    The host reservation IDs.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

  • :next_token (String)

    The token to use to retrieve the next page of results.

Returns:

See Also:

#describe_hosts(options = {}) ⇒ Types::DescribeHostsResult

Describes the specified Dedicated Hosts or all your Dedicated Hosts.

The results describe only the Dedicated Hosts in the Region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released are listed with the state released.

Examples:

Request syntax with placeholder values


resp = client.describe_hosts({
  filter: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  host_ids: ["DedicatedHostId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.hosts #=> Array
resp.hosts[0].auto_placement #=> String, one of "on", "off"
resp.hosts[0].availability_zone #=> String
resp.hosts[0].available_capacity.available_instance_capacity #=> Array
resp.hosts[0].available_capacity.available_instance_capacity[0].available_capacity #=> Integer
resp.hosts[0].available_capacity.available_instance_capacity[0].instance_type #=> String
resp.hosts[0].available_capacity.available_instance_capacity[0].total_capacity #=> Integer
resp.hosts[0].available_capacity.available_v_cpus #=> Integer
resp.hosts[0].client_token #=> String
resp.hosts[0].host_id #=> String
resp.hosts[0].host_properties.cores #=> Integer
resp.hosts[0].host_properties.instance_type #=> String
resp.hosts[0].host_properties.instance_family #=> String
resp.hosts[0].host_properties.sockets #=> Integer
resp.hosts[0].host_properties.total_v_cpus #=> Integer
resp.hosts[0].host_reservation_id #=> String
resp.hosts[0].instances #=> Array
resp.hosts[0].instances[0].instance_id #=> String
resp.hosts[0].instances[0].instance_type #=> String
resp.hosts[0].instances[0].owner_id #=> String
resp.hosts[0].state #=> String, one of "available", "under-assessment", "permanent-failure", "released", "released-permanent-failure", "pending"
resp.hosts[0].allocation_time #=> Time
resp.hosts[0].release_time #=> Time
resp.hosts[0].tags #=> Array
resp.hosts[0].tags[0].key #=> String
resp.hosts[0].tags[0].value #=> String
resp.hosts[0].host_recovery #=> String, one of "on", "off"
resp.hosts[0].allows_multiple_instance_types #=> String, one of "on", "off"
resp.hosts[0].owner_id #=> String
resp.hosts[0].availability_zone_id #=> String
resp.hosts[0].member_of_service_linked_resource_group #=> true/false
resp.next_token #=> String

Options Hash (options):

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

    The filters.

    • auto-placement - Whether auto-placement is enabled or disabled (on | off).

    • availability-zone - The Availability Zone of the host.

    • client-token - The idempotency token that you provided when you allocated the host.

    • host-reservation-id - The ID of the reservation assigned to this host.

    • instance-type - The instance type size that the Dedicated Host is configured to support.

    • state - The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure).

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

  • :host_ids (Array<String>)

    The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

    You cannot specify this parameter and the host IDs parameter in the same request.

  • :next_token (String)

    The token to use to retrieve the next page of results.

Returns:

See Also:

#describe_iam_instance_profile_associations(options = {}) ⇒ Types::DescribeIamInstanceProfileAssociationsResult

Describes your IAM instance profile associations.

Examples:

Example: To describe an IAM instance profile association


# This example describes the specified IAM instance profile association.

resp = client.describe_iam_instance_profile_associations({
  association_ids: [
    "iip-assoc-0db249b1f25fa24b8", 
  ], 
})

# resp.to_h outputs the following:
{
  iam_instance_profile_associations: [
    {
      association_id: "iip-assoc-0db249b1f25fa24b8", 
      iam_instance_profile: {
        arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
        id: "AIPAJVQN4F5WVLGCJDRGM", 
      }, 
      instance_id: "i-09eb09efa73ec1dee", 
      state: "associated", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_iam_instance_profile_associations({
  association_ids: ["IamInstanceProfileAssociationId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.iam_instance_profile_associations #=> Array
resp.iam_instance_profile_associations[0].association_id #=> String
resp.iam_instance_profile_associations[0].instance_id #=> String
resp.iam_instance_profile_associations[0].iam_instance_profile.arn #=> String
resp.iam_instance_profile_associations[0].iam_instance_profile.id #=> String
resp.iam_instance_profile_associations[0].state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.iam_instance_profile_associations[0].timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :association_ids (Array<String>)

    The IAM instance profile associations.

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

    The filters.

    • instance-id - The ID of the instance.

    • state - The state of the association (associating | associated | disassociating).

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:

#describe_id_format(options = {}) ⇒ Types::DescribeIdFormatResult

Describes the ID format settings for your resources on a per-Region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the ModifyIdFormat command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Examples:

Request syntax with placeholder values


resp = client.describe_id_format({
  resource: "String",
})

Response structure


resp.statuses #=> Array
resp.statuses[0].deadline #=> Time
resp.statuses[0].resource #=> String
resp.statuses[0].use_long_ids #=> true/false

Options Hash (options):

  • :resource (String)

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

Returns:

See Also:

#describe_identity_id_format(options = {}) ⇒ Types::DescribeIdentityIdFormatResult

Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.

Examples:

Request syntax with placeholder values


resp = client.describe_identity_id_format({
  principal_arn: "String", # required
  resource: "String",
})

Response structure


resp.statuses #=> Array
resp.statuses[0].deadline #=> Time
resp.statuses[0].resource #=> String
resp.statuses[0].use_long_ids #=> true/false

Options Hash (options):

  • :principal_arn (required, String)

    The ARN of the principal, which can be an IAM role, IAM user, or the root user.

  • :resource (String)

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

Returns:

See Also:

#describe_image_attribute(options = {}) ⇒ Types::ImageAttribute

Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

Examples:

Example: To describe the launch permissions for an AMI


# This example describes the launch permissions for the specified AMI.

resp = client.describe_image_attribute({
  attribute: "launchPermission", 
  image_id: "ami-5731123e", 
})

# resp.to_h outputs the following:
{
  image_id: "ami-5731123e", 
  launch_permissions: [
    {
      user_id: "123456789012", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_image_attribute({
  attribute: "description", # required, accepts description, kernel, ramdisk, launchPermission, productCodes, blockDeviceMapping, sriovNetSupport
  image_id: "ImageId", # required
  dry_run: false,
})

Response structure


resp.block_device_mappings #=> Array
resp.block_device_mappings[0].device_name #=> String
resp.block_device_mappings[0].virtual_name #=> String
resp.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.block_device_mappings[0].ebs.iops #=> Integer
resp.block_device_mappings[0].ebs.snapshot_id #=> String
resp.block_device_mappings[0].ebs.volume_size #=> Integer
resp.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.block_device_mappings[0].ebs.kms_key_id #=> String
resp.block_device_mappings[0].ebs.encrypted #=> true/false
resp.block_device_mappings[0].no_device #=> String
resp.image_id #=> String
resp.launch_permissions #=> Array
resp.launch_permissions[0].group #=> String, one of "all"
resp.launch_permissions[0].user_id #=> String
resp.product_codes #=> Array
resp.product_codes[0].product_code_id #=> String
resp.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.description #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.kernel_id #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.ramdisk_id #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.sriov_net_support #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Options Hash (options):

  • :attribute (required, String)

    The AMI attribute.

    Note: Depending on your account privileges, the blockDeviceMapping attribute may return a Client.AuthFailure error. If this happens, use DescribeImages to get information about the block device mapping for the AMI.

  • :image_id (required, String)

    The ID of the AMI.

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

See Also:

#describe_images(options = {}) ⇒ Types::DescribeImagesResult

Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.

The images available to you include public images, private images that you own, and private images owned by other AWS accounts for which you have explicit launch permissions.

Recently deregistered images appear in the returned results for a short interval and then return empty results. After all instances that reference a deregistered AMI are terminated, specifying the ID of the image results in an error indicating that the AMI ID cannot be found.

Examples:

Example: To describe an AMI


# This example describes the specified AMI.

resp = client.describe_images({
  image_ids: [
    "ami-5731123e", 
  ], 
})

# resp.to_h outputs the following:
{
  images: [
    {
      architecture: "x86_64", 
      block_device_mappings: [
        {
          device_name: "/dev/sda1", 
          ebs: {
            delete_on_termination: true, 
            snapshot_id: "snap-1234567890abcdef0", 
            volume_size: 8, 
            volume_type: "standard", 
          }, 
        }, 
      ], 
      description: "An AMI for my server", 
      hypervisor: "xen", 
      image_id: "ami-5731123e", 
      image_location: "123456789012/My server", 
      image_type: "machine", 
      kernel_id: "aki-88aa75e1", 
      name: "My server", 
      owner_id: "123456789012", 
      public: false, 
      root_device_name: "/dev/sda1", 
      root_device_type: "ebs", 
      state: "available", 
      virtualization_type: "paravirtual", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_images({
  executable_users: ["String"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  image_ids: ["ImageId"],
  owners: ["String"],
  dry_run: false,
})

Response structure


resp.images #=> Array
resp.images[0].architecture #=> String, one of "i386", "x86_64", "arm64"
resp.images[0].creation_date #=> String
resp.images[0].image_id #=> String
resp.images[0].image_location #=> String
resp.images[0].image_type #=> String, one of "machine", "kernel", "ramdisk"
resp.images[0].public #=> true/false
resp.images[0].kernel_id #=> String
resp.images[0].owner_id #=> String
resp.images[0].platform #=> String, one of "Windows"
resp.images[0].platform_details #=> String
resp.images[0].usage_operation #=> String
resp.images[0].product_codes #=> Array
resp.images[0].product_codes[0].product_code_id #=> String
resp.images[0].product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.images[0].ramdisk_id #=> String
resp.images[0].state #=> String, one of "pending", "available", "invalid", "deregistered", "transient", "failed", "error"
resp.images[0].block_device_mappings #=> Array
resp.images[0].block_device_mappings[0].device_name #=> String
resp.images[0].block_device_mappings[0].virtual_name #=> String
resp.images[0].block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.images[0].block_device_mappings[0].ebs.iops #=> Integer
resp.images[0].block_device_mappings[0].ebs.snapshot_id #=> String
resp.images[0].block_device_mappings[0].ebs.volume_size #=> Integer
resp.images[0].block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.images[0].block_device_mappings[0].ebs.kms_key_id #=> String
resp.images[0].block_device_mappings[0].ebs.encrypted #=> true/false
resp.images[0].block_device_mappings[0].no_device #=> String
resp.images[0].description #=> String
resp.images[0].ena_support #=> true/false
resp.images[0].hypervisor #=> String, one of "ovm", "xen"
resp.images[0].image_owner_alias #=> String
resp.images[0].name #=> String
resp.images[0].root_device_name #=> String
resp.images[0].root_device_type #=> String, one of "ebs", "instance-store"
resp.images[0].sriov_net_support #=> String
resp.images[0].state_reason.code #=> String
resp.images[0].state_reason.message #=> String
resp.images[0].tags #=> Array
resp.images[0].tags[0].key #=> String
resp.images[0].tags[0].value #=> String
resp.images[0].virtualization_type #=> String, one of "hvm", "paravirtual"

Options Hash (options):

  • :executable_users (Array<String>)

    Scopes the images by users with explicit launch permissions. Specify an AWS account ID, self (the sender of the request), or all (public AMIs).

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

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64).

    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.

    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh).

    • block-device-mapping.snapshot-id - The ID of the snapshot used for the EBS volume.

    • block-device-mapping.volume-size - The volume size of the EBS volume, in GiB.

    • block-device-mapping.volume-type - The volume type of the EBS volume (gp2 | io1 | io2 | st1| sc1 | standard).

    • block-device-mapping.encrypted - A Boolean that indicates whether the EBS volume is encrypted.

    • description - The description of the image (provided during image creation).

    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.

    • hypervisor - The hypervisor type (ovm | xen).

    • image-id - The ID of the image.

    • image-type - The image type (machine | kernel | ramdisk).

    • is-public - A Boolean that indicates whether the image is public.

    • kernel-id - The kernel ID.

    • manifest-location - The location of the image manifest.

    • name - The name of the AMI (provided during image creation).

    • owner-alias - The owner alias, from an Amazon-maintained list (amazon | aws-marketplace). This is not the user-configured AWS account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.

    • owner-id - The AWS account ID of the owner. We recommend that you use the related parameter instead of this filter.

    • platform - The platform. To only list Windows-based AMIs, use windows.

    • product-code - The product code.

    • product-code.type - The type of the product code (devpay | marketplace).

    • ramdisk-id - The RAM disk ID.

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

    • root-device-type - The type of the root device volume (ebs | instance-store).

    • state - The state of the image (available | pending | failed).

    • state-reason-code - The reason code for the state change.

    • state-reason-message - The message for the state change.

    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.

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

    • virtualization-type - The virtualization type (paravirtual | hvm).

  • :image_ids (Array<String>)

    The image IDs.

    Default: Describes all images available to you.

  • :owners (Array<String>)

    Scopes the results to images with the specified owners. You can specify a combination of AWS account IDs, self, amazon, and aws-marketplace. If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

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

See Also:

#describe_import_image_tasks(options = {}) ⇒ Types::DescribeImportImageTasksResult

Displays details about an import virtual machine or import snapshot tasks that are already created.

Examples:

Request syntax with placeholder values


resp = client.describe_import_image_tasks({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  import_task_ids: ["ImportImageTaskId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.import_image_tasks #=> Array
resp.import_image_tasks[0].architecture #=> String
resp.import_image_tasks[0].description #=> String
resp.import_image_tasks[0].encrypted #=> true/false
resp.import_image_tasks[0].hypervisor #=> String
resp.import_image_tasks[0].image_id #=> String
resp.import_image_tasks[0].import_task_id #=> String
resp.import_image_tasks[0].kms_key_id #=> String
resp.import_image_tasks[0].license_type #=> String
resp.import_image_tasks[0].platform #=> String
resp.import_image_tasks[0].progress #=> String
resp.import_image_tasks[0].snapshot_details #=> Array
resp.import_image_tasks[0].snapshot_details[0].description #=> String
resp.import_image_tasks[0].snapshot_details[0].device_name #=> String
resp.import_image_tasks[0].snapshot_details[0].disk_image_size #=> Float
resp.import_image_tasks[0].snapshot_details[0].format #=> String
resp.import_image_tasks[0].snapshot_details[0].progress #=> String
resp.import_image_tasks[0].snapshot_details[0].snapshot_id #=> String
resp.import_image_tasks[0].snapshot_details[0].status #=> String
resp.import_image_tasks[0].snapshot_details[0].status_message #=> String
resp.import_image_tasks[0].snapshot_details[0].url #=> String
resp.import_image_tasks[0].snapshot_details[0].user_bucket.s3_bucket #=> String
resp.import_image_tasks[0].snapshot_details[0].user_bucket.s3_key #=> String
resp.import_image_tasks[0].status #=> String
resp.import_image_tasks[0].status_message #=> String
resp.import_image_tasks[0].tags #=> Array
resp.import_image_tasks[0].tags[0].key #=> String
resp.import_image_tasks[0].tags[0].value #=> String
resp.import_image_tasks[0].license_specifications #=> Array
resp.import_image_tasks[0].license_specifications[0].license_configuration_arn #=> String
resp.next_token #=> String

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.

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

    Filter tasks using the task-state filter and one of the following values: active, completed, deleting, or deleted.

  • :import_task_ids (Array<String>)

    The IDs of the import image tasks.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :next_token (String)

    A token that indicates the next page of results.

Returns:

See Also:

#describe_import_snapshot_tasks(options = {}) ⇒ Types::DescribeImportSnapshotTasksResult

Describes your import snapshot tasks.

Examples:

Request syntax with placeholder values


resp = client.describe_import_snapshot_tasks({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  import_task_ids: ["ImportSnapshotTaskId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.import_snapshot_tasks #=> Array
resp.import_snapshot_tasks[0].description #=> String
resp.import_snapshot_tasks[0].import_task_id #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.description #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.disk_image_size #=> Float
resp.import_snapshot_tasks[0].snapshot_task_detail.encrypted #=> true/false
resp.import_snapshot_tasks[0].snapshot_task_detail.format #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.kms_key_id #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.progress #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.snapshot_id #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.status #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.status_message #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.url #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.user_bucket.s3_bucket #=> String
resp.import_snapshot_tasks[0].snapshot_task_detail.user_bucket.s3_key #=> String
resp.import_snapshot_tasks[0].tags #=> Array
resp.import_snapshot_tasks[0].tags[0].key #=> String
resp.import_snapshot_tasks[0].tags[0].value #=> String
resp.next_token #=> String

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.

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

    The filters.

  • :import_task_ids (Array<String>)

    A list of import snapshot task IDs.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    A token that indicates the next page of results.

Returns:

See Also:

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

Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport

Examples:

Example: To describe the instance type


# This example describes the instance type of the specified instance.

resp = client.describe_instance_attribute({
  attribute: "instanceType", 
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  instance_id: "i-1234567890abcdef0", 
  instance_type: {
    value: "t1.micro", 
  }, 
}

Example: To describe the disableApiTermination attribute


# This example describes the ``disableApiTermination`` attribute of the specified instance.

resp = client.describe_instance_attribute({
  attribute: "disableApiTermination", 
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  disable_api_termination: {
    value: false, 
  }, 
  instance_id: "i-1234567890abcdef0", 
}

Example: To describe the block device mapping for an instance


# This example describes the ``blockDeviceMapping`` attribute of the specified instance.

resp = client.describe_instance_attribute({
  attribute: "blockDeviceMapping", 
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  block_device_mappings: [
    {
      device_name: "/dev/sda1", 
      ebs: {
        attach_time: Time.parse("2013-05-17T22:42:34.000Z"), 
        delete_on_termination: true, 
        status: "attached", 
        volume_id: "vol-049df61146c4d7901", 
      }, 
    }, 
    {
      device_name: "/dev/sdf", 
      ebs: {
        attach_time: Time.parse("2013-09-10T23:07:00.000Z"), 
        delete_on_termination: false, 
        status: "attached", 
        volume_id: "vol-049df61146c4d7901", 
      }, 
    }, 
  ], 
  instance_id: "i-1234567890abcdef0", 
}

Request syntax with placeholder values


resp = client.describe_instance_attribute({
  attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions
  dry_run: false,
  instance_id: "InstanceId", # required
})

Response structure


resp.groups #=> Array
resp.groups[0].group_name #=> String
resp.groups[0].group_id #=> String
resp.block_device_mappings #=> Array
resp.block_device_mappings[0].device_name #=> String
resp.block_device_mappings[0].ebs.attach_time #=> Time
resp.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.block_device_mappings[0].ebs.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.block_device_mappings[0].ebs.volume_id #=> String
resp.disable_api_termination.value #=> true/false
resp.ena_support.value #=> true/false
resp.enclave_options.enabled #=> true/false
resp.ebs_optimized.value #=> true/false
resp.instance_id #=> String
resp.instance_initiated_shutdown_behavior #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.instance_type #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.kernel_id #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.product_codes #=> Array
resp.product_codes[0].product_code_id #=> String
resp.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.ramdisk_id #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.root_device_name #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.source_dest_check.value #=> true/false
resp.sriov_net_support #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.user_data #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Options Hash (options):

  • :attribute (required, String)

    The instance attribute.

    Note: The enaSupport attribute is not supported at this time.

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

  • :instance_id (required, String)

    The ID of the instance.

Returns:

See Also:

#describe_instance_credit_specifications(options = {}) ⇒ Types::DescribeInstanceCreditSpecificationsResult

Describes the credit option for CPU usage of the specified burstable performance instances. The credit options are standard and unlimited.

If you do not specify an instance ID, Amazon EC2 returns burstable performance instances with the unlimited credit option, as well as instances that were previously configured as T2, T3, and T3a with the unlimited credit option. For example, if you resize a T2 instance, while it is configured as unlimited, to an M4 instance, Amazon EC2 returns the M4 instance.

If you specify one or more instance IDs, Amazon EC2 returns the credit option (standard or unlimited) of those instances. If you specify an instance ID that is not valid, such as an instance that is not a burstable performance instance, an error is returned.

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If an Availability Zone is experiencing a service disruption and you specify instance IDs in the affected zone, or do not specify any instance IDs at all, the call fails. If you specify only instance IDs in an unaffected zone, the call works normally.

For more information, see Burstable performance instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_credit_specifications({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  instance_ids: ["InstanceId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.instance_credit_specifications #=> Array
resp.instance_credit_specifications[0].instance_id #=> String
resp.instance_credit_specifications[0].cpu_credits #=> String
resp.next_token #=> String

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.

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

    The filters.

    • instance-id - The ID of the instance.

    ^

  • :instance_ids (Array<String>)

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 1000 explicitly specified instance IDs.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_instance_event_notification_attributes(options = {}) ⇒ Types::DescribeInstanceEventNotificationAttributesResult

Describes the tag keys that are registered to appear in scheduled event notifications for resources in the current Region.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_event_notification_attributes({
  dry_run: false,
})

Response structure


resp.instance_tag_attribute.instance_tag_keys #=> Array
resp.instance_tag_attribute.instance_tag_keys[0] #=> String
resp.instance_tag_attribute.include_all_tags_of_instance #=> true/false

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.

Returns:

See Also:

#describe_instance_status(options = {}) ⇒ Types::DescribeInstanceStatusResult

Describes the status of the specified instances or all of your instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

Instance status includes the following components:

  • Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status checks for your instances and Troubleshooting instances with failed status checks in the Amazon Elastic Compute Cloud User Guide.

  • Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled events for your instances in the Amazon Elastic Compute Cloud User Guide.

  • Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance lifecycle in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe the status of an instance


# This example describes the current status of the specified instance.

resp = client.describe_instance_status({
  instance_ids: [
    "i-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  instance_statuses: [
    {
      availability_zone: "us-east-1d", 
      instance_id: "i-1234567890abcdef0", 
      instance_state: {
        code: 16, 
        name: "running", 
      }, 
      instance_status: {
        details: [
          {
            name: "reachability", 
            status: "passed", 
          }, 
        ], 
        status: "ok", 
      }, 
      system_status: {
        details: [
          {
            name: "reachability", 
            status: "passed", 
          }, 
        ], 
        status: "ok", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_instance_status({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  instance_ids: ["InstanceId"],
  max_results: 1,
  next_token: "String",
  dry_run: false,
  include_all_instances: false,
})

Response structure


resp.instance_statuses #=> Array
resp.instance_statuses[0].availability_zone #=> String
resp.instance_statuses[0].outpost_arn #=> String
resp.instance_statuses[0].events #=> Array
resp.instance_statuses[0].events[0].instance_event_id #=> String
resp.instance_statuses[0].events[0].code #=> String, one of "instance-reboot", "system-reboot", "system-maintenance", "instance-retirement", "instance-stop"
resp.instance_statuses[0].events[0].description #=> String
resp.instance_statuses[0].events[0].not_after #=> Time
resp.instance_statuses[0].events[0].not_before #=> Time
resp.instance_statuses[0].events[0].not_before_deadline #=> Time
resp.instance_statuses[0].instance_id #=> String
resp.instance_statuses[0].instance_state.code #=> Integer
resp.instance_statuses[0].instance_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.instance_statuses[0].instance_status.details #=> Array
resp.instance_statuses[0].instance_status.details[0].impaired_since #=> Time
resp.instance_statuses[0].instance_status.details[0].name #=> String, one of "reachability"
resp.instance_statuses[0].instance_status.details[0].status #=> String, one of "passed", "failed", "insufficient-data", "initializing"
resp.instance_statuses[0].instance_status.status #=> String, one of "ok", "impaired", "insufficient-data", "not-applicable", "initializing"
resp.instance_statuses[0].system_status.details #=> Array
resp.instance_statuses[0].system_status.details[0].impaired_since #=> Time
resp.instance_statuses[0].system_status.details[0].name #=> String, one of "reachability"
resp.instance_statuses[0].system_status.details[0].status #=> String, one of "passed", "failed", "insufficient-data", "initializing"
resp.instance_statuses[0].system_status.status #=> String, one of "ok", "impaired", "insufficient-data", "not-applicable", "initializing"
resp.next_token #=> String

Options Hash (options):

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

    The filters.

    • availability-zone - The Availability Zone of the instance.

    • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

    • event.description - A description of the event.

    • event.instance-event-id - The ID of the event whose date and time you are modifying.

    • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

    • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

    • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z).

    • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

    • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

    • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

    • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

    • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

    • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • :instance_ids (Array<String>)

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 100 explicitly specified instance IDs.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

  • :next_token (String)

    The token to retrieve the next page of results.

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

  • :include_all_instances (Boolean)

    When true, includes the health status for all instances. When false, includes the health status for running instances only.

    Default: false

Returns:

See Also:

#describe_instance_type_offerings(options = {}) ⇒ Types::DescribeInstanceTypeOfferingsResult

Returns a list of all instance types offered. The results can be filtered by location (Region or Availability Zone). If no location is specified, the instance types offered in the current Region are returned.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_type_offerings({
  dry_run: false,
  location_type: "region", # accepts region, availability-zone, availability-zone-id
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.instance_type_offerings #=> Array
resp.instance_type_offerings[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.instance_type_offerings[0].location_type #=> String, one of "region", "availability-zone", "availability-zone-id"
resp.instance_type_offerings[0].location #=> String
resp.next_token #=> String

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.

  • :location_type (String)

    The location type.

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

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

    • location - This depends on the location type. For example, if the location type is region (default), the location is the Region code (for example, us-east-2.)

    • instance-type - The instance type. For example, c5.2xlarge.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the next token value.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_instance_types(options = {}) ⇒ Types::DescribeInstanceTypesResult

Describes the details of the instance types that are offered in a location. The results can be filtered by the attributes of the instance types.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_types({
  dry_run: false,
  instance_types: ["t1.micro"], # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.instance_types #=> Array
resp.instance_types[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.instance_types[0].current_generation #=> true/false
resp.instance_types[0].free_tier_eligible #=> true/false
resp.instance_types[0].supported_usage_classes #=> Array
resp.instance_types[0].supported_usage_classes[0] #=> String, one of "spot", "on-demand"
resp.instance_types[0].supported_root_device_types #=> Array
resp.instance_types[0].supported_root_device_types[0] #=> String, one of "ebs", "instance-store"
resp.instance_types[0].supported_virtualization_types #=> Array
resp.instance_types[0].supported_virtualization_types[0] #=> String, one of "hvm", "paravirtual"
resp.instance_types[0].bare_metal #=> true/false
resp.instance_types[0].hypervisor #=> String, one of "nitro", "xen"
resp.instance_types[0].processor_info.supported_architectures #=> Array
resp.instance_types[0].processor_info.supported_architectures[0] #=> String, one of "i386", "x86_64", "arm64"
resp.instance_types[0].processor_info.sustained_clock_speed_in_ghz #=> Float
resp.instance_types[0].v_cpu_info.default_v_cpus #=> Integer
resp.instance_types[0].v_cpu_info.default_cores #=> Integer
resp.instance_types[0].v_cpu_info.default_threads_per_core #=> Integer
resp.instance_types[0].v_cpu_info.valid_cores #=> Array
resp.instance_types[0].v_cpu_info.valid_cores[0] #=> Integer
resp.instance_types[0].v_cpu_info.valid_threads_per_core #=> Array
resp.instance_types[0].v_cpu_info.valid_threads_per_core[0] #=> Integer
resp.instance_types[0].memory_info.size_in_mi_b #=> Integer
resp.instance_types[0].instance_storage_supported #=> true/false
resp.instance_types[0].instance_storage_info.total_size_in_gb #=> Integer
resp.instance_types[0].instance_storage_info.disks #=> Array
resp.instance_types[0].instance_storage_info.disks[0].size_in_gb #=> Integer
resp.instance_types[0].instance_storage_info.disks[0].count #=> Integer
resp.instance_types[0].instance_storage_info.disks[0].type #=> String, one of "hdd", "ssd"
resp.instance_types[0].instance_storage_info.nvme_support #=> String, one of "unsupported", "supported", "required"
resp.instance_types[0].ebs_info.ebs_optimized_support #=> String, one of "unsupported", "supported", "default"
resp.instance_types[0].ebs_info.encryption_support #=> String, one of "unsupported", "supported"
resp.instance_types[0].ebs_info.ebs_optimized_info.baseline_bandwidth_in_mbps #=> Integer
resp.instance_types[0].ebs_info.ebs_optimized_info.baseline_throughput_in_m_bps #=> Float
resp.instance_types[0].ebs_info.ebs_optimized_info.baseline_iops #=> Integer
resp.instance_types[0].ebs_info.ebs_optimized_info.maximum_bandwidth_in_mbps #=> Integer
resp.instance_types[0].ebs_info.ebs_optimized_info.maximum_throughput_in_m_bps #=> Float
resp.instance_types[0].ebs_info.ebs_optimized_info.maximum_iops #=> Integer
resp.instance_types[0].ebs_info.nvme_support #=> String, one of "unsupported", "supported", "required"
resp.instance_types[0].network_info.network_performance #=> String
resp.instance_types[0].network_info.maximum_network_interfaces #=> Integer
resp.instance_types[0].network_info.maximum_network_cards #=> Integer
resp.instance_types[0].network_info.default_network_card_index #=> Integer
resp.instance_types[0].network_info.network_cards #=> Array
resp.instance_types[0].network_info.network_cards[0].network_card_index #=> Integer
resp.instance_types[0].network_info.network_cards[0].network_performance #=> String
resp.instance_types[0].network_info.network_cards[0].maximum_network_interfaces #=> Integer
resp.instance_types[0].network_info.ipv_4_addresses_per_interface #=> Integer
resp.instance_types[0].network_info.ipv_6_addresses_per_interface #=> Integer
resp.instance_types[0].network_info.ipv_6_supported #=> true/false
resp.instance_types[0].network_info.ena_support #=> String, one of "unsupported", "supported", "required"
resp.instance_types[0].network_info.efa_supported #=> true/false
resp.instance_types[0].gpu_info.gpus #=> Array
resp.instance_types[0].gpu_info.gpus[0].name #=> String
resp.instance_types[0].gpu_info.gpus[0].manufacturer #=> String
resp.instance_types[0].gpu_info.gpus[0].count #=> Integer
resp.instance_types[0].gpu_info.gpus[0].memory_info.size_in_mi_b #=> Integer
resp.instance_types[0].gpu_info.total_gpu_memory_in_mi_b #=> Integer
resp.instance_types[0].fpga_info.fpgas #=> Array
resp.instance_types[0].fpga_info.fpgas[0].name #=> String
resp.instance_types[0].fpga_info.fpgas[0].manufacturer #=> String
resp.instance_types[0].fpga_info.fpgas[0].count #=> Integer
resp.instance_types[0].fpga_info.fpgas[0].memory_info.size_in_mi_b #=> Integer
resp.instance_types[0].fpga_info.total_fpga_memory_in_mi_b #=> Integer
resp.instance_types[0].placement_group_info.supported_strategies #=> Array
resp.instance_types[0].placement_group_info.supported_strategies[0] #=> String, one of "cluster", "partition", "spread"
resp.instance_types[0].inference_accelerator_info.accelerators #=> Array
resp.instance_types[0].inference_accelerator_info.accelerators[0].count #=> Integer
resp.instance_types[0].inference_accelerator_info.accelerators[0].name #=> String
resp.instance_types[0].inference_accelerator_info.accelerators[0].manufacturer #=> String
resp.instance_types[0].hibernation_supported #=> true/false
resp.instance_types[0].burstable_performance_supported #=> true/false
resp.instance_types[0].dedicated_hosts_supported #=> true/false
resp.instance_types[0].auto_recovery_supported #=> true/false
resp.next_token #=> String

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.

  • :instance_types (Array<String>)

    The instance types. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

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

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

    • auto-recovery-supported - Indicates whether auto recovery is supported (true | false).

    • bare-metal - Indicates whether it is a bare metal instance type (true | false).

    • burstable-performance-supported - Indicates whether it is a burstable performance instance type (true | false).

    • current-generation - Indicates whether this instance type is the latest generation instance type of an instance family (true | false).

    • ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.

    • ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage operations per second for an EBS-optimized instance type.

    • ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline throughput performance for an EBS-optimized instance type, in MB/s.

    • ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.

    • ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage operations per second for an EBS-optimized instance type.

    • ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum throughput performance for an EBS-optimized instance type, in MB/s.

    • ebs-info.ebs-optimized-support - Indicates whether the instance type is EBS-optimized (supported | unsupported | default).

    • ebs-info.encryption-support - Indicates whether EBS encryption is supported (supported | unsupported).

    • ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for EBS volumes (required | supported | unsupported).

    • free-tier-eligible - Indicates whether the instance type is eligible to use in the free tier (true | false).

    • hibernation-supported - Indicates whether On-Demand hibernation is supported (true | false).

    • hypervisor - The hypervisor (nitro | xen).

    • instance-storage-info.disk.count - The number of local disks.

    • instance-storage-info.disk.size-in-gb - The storage size of each instance storage disk, in GB.

    • instance-storage-info.disk.type - The storage technology for the local instance storage disks (hdd | ssd).

    • instance-storage-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for instance store (required | supported) | unsupported).

    • instance-storage-info.total-size-in-gb - The total amount of storage available from all local instance storage, in GB.

    • instance-storage-supported - Indicates whether the instance type has local instance storage (true | false).

    • instance-type - The instance type (for example c5.2xlarge or c5*).

    • memory-info.size-in-mib - The memory size.

    • network-info.efa-supported - Indicates whether the instance type supports Elastic Fabric Adapter (EFA) (true | false).

    • network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is supported or required (required | supported | unsupported).

    • network-info.ipv4-addresses-per-interface - The maximum number of private IPv4 addresses per network interface.

    • network-info.ipv6-addresses-per-interface - The maximum number of private IPv6 addresses per network interface.

    • network-info.ipv6-supported - Indicates whether the instance type supports IPv6 (true | false).

    • network-info.maximum-network-interfaces - The maximum number of network interfaces per instance.

    • network-info.network-performance - The network performance (for example, \"25 Gigabit\").

    • processor-info.supported-architecture - The CPU architecture (arm64 | i386 | x86_64).

    • processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in GHz.

    • supported-root-device-type - The root device type (ebs | instance-store).

    • supported-usage-class - The usage class (on-demand | spot).

    • supported-virtualization-type - The virtualization type (hvm | paravirtual).

    • vcpu-info.default-cores - The default number of cores for the instance type.

    • vcpu-info.default-threads-per-core - The default number of threads per core for the instance type.

    • vcpu-info.default-vcpus - The default number of vCPUs for the instance type.

    • vcpu-info.valid-cores - The number of cores that can be configured for the instance type.

    • vcpu-info.valid-threads-per-core - The number of threads per core that can be configured for the instance type. For example, \"1\" or \"1,2\".

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the next token value.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_instances(options = {}) ⇒ Types::DescribeInstancesResult

Describes the specified instances or all instances.

If you specify instance IDs, the output includes information for only the specified instances. If you specify filters, the output includes information for only those instances that meet the filter criteria. If you do not specify instance IDs or filters, the output includes information for all instances, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the output.

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.

Examples:

Example: To describe an Amazon EC2 instance


# This example describes the specified instance.

resp = client.describe_instances({
  instance_ids: [
    "i-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To describe the instances with a specific instance type


# This example describes the instances with the t2.micro instance type.

resp = client.describe_instances({
  filters: [
    {
      name: "instance-type", 
      values: [
        "t2.micro", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To describe the instances with a specific tag


# This example describes the instances with the Purpose=test tag.

resp = client.describe_instances({
  filters: [
    {
      name: "tag:Purpose", 
      values: [
        "test", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Filtering by tags examples


# filtering by tag keys "key1" or "key2"
ec2.describe_instances(filters:[{ name: 'tag-key', values: ['key1', 'key2'] }])

# filtering by tag values "value1" or "value1"
ec2.describe_instances(filters:[{ name: 'tag-value', values: ['value1', 'value2'] }])

# filtering by key and value, key equals "key1" and value equals "value1" or "value2"
ec2.describe_instances(filters:[{ name: "tag:key1", values: ['value1'] }])

Request syntax with placeholder values


resp = client.describe_instances({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  instance_ids: ["InstanceId"],
  dry_run: false,
  max_results: 1,
  next_token: "String",
})

Response structure


resp.reservations #=> Array
resp.reservations[0].groups #=> Array
resp.reservations[0].groups[0].group_name #=> String
resp.reservations[0].groups[0].group_id #=> String
resp.reservations[0].instances #=> Array
resp.reservations[0].instances[0].ami_launch_index #=> Integer
resp.reservations[0].instances[0].image_id #=> String
resp.reservations[0].instances[0].instance_id #=> String
resp.reservations[0].instances[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.reservations[0].instances[0].kernel_id #=> String
resp.reservations[0].instances[0].key_name #=> String
resp.reservations[0].instances[0].launch_time #=> Time
resp.reservations[0].instances[0].monitoring.state #=> String, one of "disabled", "disabling", "enabled", "pending"
resp.reservations[0].instances[0].placement.availability_zone #=> String
resp.reservations[0].instances[0].placement.affinity #=> String
resp.reservations[0].instances[0].placement.group_name #=> String
resp.reservations[0].instances[0].placement.partition_number #=> Integer
resp.reservations[0].instances[0].placement.host_id #=> String
resp.reservations[0].instances[0].placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.reservations[0].instances[0].placement.spread_domain #=> String
resp.reservations[0].instances[0].placement.host_resource_group_arn #=> String
resp.reservations[0].instances[0].platform #=> String, one of "Windows"
resp.reservations[0].instances[0].private_dns_name #=> String
resp.reservations[0].instances[0].private_ip_address #=> String
resp.reservations[0].instances[0].product_codes #=> Array
resp.reservations[0].instances[0].product_codes[0].product_code_id #=> String
resp.reservations[0].instances[0].product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.reservations[0].instances[0].public_dns_name #=> String
resp.reservations[0].instances[0].public_ip_address #=> String
resp.reservations[0].instances[0].ramdisk_id #=> String
resp.reservations[0].instances[0].state.code #=> Integer
resp.reservations[0].instances[0].state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.reservations[0].instances[0].state_transition_reason #=> String
resp.reservations[0].instances[0].subnet_id #=> String
resp.reservations[0].instances[0].vpc_id #=> String
resp.reservations[0].instances[0].architecture #=> String, one of "i386", "x86_64", "arm64"
resp.reservations[0].instances[0].block_device_mappings #=> Array
resp.reservations[0].instances[0].block_device_mappings[0].device_name #=> String
resp.reservations[0].instances[0].block_device_mappings[0].ebs.attach_time #=> Time
resp.reservations[0].instances[0].block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.reservations[0].instances[0].block_device_mappings[0].ebs.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.reservations[0].instances[0].block_device_mappings[0].ebs.volume_id #=> String
resp.reservations[0].instances[0].client_token #=> String
resp.reservations[0].instances[0].ebs_optimized #=> true/false
resp.reservations[0].instances[0].ena_support #=> true/false
resp.reservations[0].instances[0].hypervisor #=> String, one of "ovm", "xen"
resp.reservations[0].instances[0].iam_instance_profile.arn #=> String
resp.reservations[0].instances[0].iam_instance_profile.id #=> String
resp.reservations[0].instances[0].instance_lifecycle #=> String, one of "spot", "scheduled"
resp.reservations[0].instances[0].elastic_gpu_associations #=> Array
resp.reservations[0].instances[0].elastic_gpu_associations[0].elastic_gpu_id #=> String
resp.reservations[0].instances[0].elastic_gpu_associations[0].elastic_gpu_association_id #=> String
resp.reservations[0].instances[0].elastic_gpu_associations[0].elastic_gpu_association_state #=> String
resp.reservations[0].instances[0].elastic_gpu_associations[0].elastic_gpu_association_time #=> String
resp.reservations[0].instances[0].elastic_inference_accelerator_associations #=> Array
resp.reservations[0].instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_arn #=> String
resp.reservations[0].instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_id #=> String
resp.reservations[0].instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_state #=> String
resp.reservations[0].instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_time #=> Time
resp.reservations[0].instances[0].network_interfaces #=> Array
resp.reservations[0].instances[0].network_interfaces[0].association.carrier_ip #=> String
resp.reservations[0].instances[0].network_interfaces[0].association.ip_owner_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].association.public_dns_name #=> String
resp.reservations[0].instances[0].network_interfaces[0].association.public_ip #=> String
resp.reservations[0].instances[0].network_interfaces[0].attachment.attach_time #=> Time
resp.reservations[0].instances[0].network_interfaces[0].attachment.attachment_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].attachment.delete_on_termination #=> true/false
resp.reservations[0].instances[0].network_interfaces[0].attachment.device_index #=> Integer
resp.reservations[0].instances[0].network_interfaces[0].attachment.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.reservations[0].instances[0].network_interfaces[0].attachment.network_card_index #=> Integer
resp.reservations[0].instances[0].network_interfaces[0].description #=> String
resp.reservations[0].instances[0].network_interfaces[0].groups #=> Array
resp.reservations[0].instances[0].network_interfaces[0].groups[0].group_name #=> String
resp.reservations[0].instances[0].network_interfaces[0].groups[0].group_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].ipv_6_addresses #=> Array
resp.reservations[0].instances[0].network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.reservations[0].instances[0].network_interfaces[0].mac_address #=> String
resp.reservations[0].instances[0].network_interfaces[0].network_interface_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].owner_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_dns_name #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_address #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses #=> Array
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].association.carrier_ip #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].association.ip_owner_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].association.public_dns_name #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].association.public_ip #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].private_dns_name #=> String
resp.reservations[0].instances[0].network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.reservations[0].instances[0].network_interfaces[0].source_dest_check #=> true/false
resp.reservations[0].instances[0].network_interfaces[0].status #=> String, one of "available", "associated", "attaching", "in-use", "detaching"
resp.reservations[0].instances[0].network_interfaces[0].subnet_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].vpc_id #=> String
resp.reservations[0].instances[0].network_interfaces[0].interface_type #=> String
resp.reservations[0].instances[0].outpost_arn #=> String
resp.reservations[0].instances[0].root_device_name #=> String
resp.reservations[0].instances[0].root_device_type #=> String, one of "ebs", "instance-store"
resp.reservations[0].instances[0].security_groups #=> Array
resp.reservations[0].instances[0].security_groups[0].group_name #=> String
resp.reservations[0].instances[0].security_groups[0].group_id #=> String
resp.reservations[0].instances[0].source_dest_check #=> true/false
resp.reservations[0].instances[0].spot_instance_request_id #=> String
resp.reservations[0].instances[0].sriov_net_support #=> String
resp.reservations[0].instances[0].state_reason.code #=> String
resp.reservations[0].instances[0].state_reason.message #=> String
resp.reservations[0].instances[0].tags #=> Array
resp.reservations[0].instances[0].tags[0].key #=> String
resp.reservations[0].instances[0].tags[0].value #=> String
resp.reservations[0].instances[0].virtualization_type #=> String, one of "hvm", "paravirtual"
resp.reservations[0].instances[0].cpu_options.core_count #=> Integer
resp.reservations[0].instances[0].cpu_options.threads_per_core #=> Integer
resp.reservations[0].instances[0].capacity_reservation_id #=> String
resp.reservations[0].instances[0].capacity_reservation_specification.capacity_reservation_preference #=> String, one of "open", "none"
resp.reservations[0].instances[0].capacity_reservation_specification.capacity_reservation_target.capacity_reservation_id #=> String
resp.reservations[0].instances[0].capacity_reservation_specification.capacity_reservation_target.capacity_reservation_resource_group_arn #=> String
resp.reservations[0].instances[0].hibernation_options.configured #=> true/false
resp.reservations[0].instances[0].licenses #=> Array
resp.reservations[0].instances[0].licenses[0].license_configuration_arn #=> String
resp.reservations[0].instances[0]..state #=> String, one of "pending", "applied"
resp.reservations[0].instances[0]..http_tokens #=> String, one of "optional", "required"
resp.reservations[0].instances[0]..http_put_response_hop_limit #=> Integer
resp.reservations[0].instances[0]..http_endpoint #=> String, one of "disabled", "enabled"
resp.reservations[0].instances[0].enclave_options.enabled #=> true/false
resp.reservations[0].owner_id #=> String
resp.reservations[0].requester_id #=> String
resp.reservations[0].reservation_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host).

    • architecture - The instance architecture (i386 | x86_64 | arm64).

    • availability-zone - The Availability Zone of the instance.

    • block-device-mapping.attach-time - The attach time for an EBS volume mapped to the instance, for example, 2010-09-15T17:15:20.000Z.

    • block-device-mapping.delete-on-termination - A Boolean that indicates whether the EBS volume is deleted on instance termination.

    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh).

    • block-device-mapping.status - The status for the EBS volume (attaching | attached | detaching | detached).

    • block-device-mapping.volume-id - The volume ID of the EBS volume.

    • client-token - The idempotency token you provided when you launched the instance.

    • dns-name - The public DNS name of the instance.

    • group-id - The ID of the security group for the instance. EC2-Classic only.

    • group-name - The name of the security group for the instance. EC2-Classic only.

    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.

    • host-id - The ID of the Dedicated Host on which the instance is running, if applicable.

    • hypervisor - The hypervisor type of the instance (ovm | xen). The value xen is used for both Xen and Nitro hypervisors.

    • iam-instance-profile.arn - The instance profile associated with the instance. Specified as an ARN.

    • image-id - The ID of the image used to launch the instance.

    • instance-id - The ID of the instance.

    • instance-lifecycle - Indicates whether this is a Spot Instance or a Scheduled Instance (spot | scheduled).

    • instance-state-code - The state of the instance, as a 16-bit unsigned integer. The high byte is used for internal purposes and should be ignored. The low byte is set based on the state represented. The valid values are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

    • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

    • instance-type - The type of instance (for example, t2.micro).

    • instance.group-id - The ID of the security group for the instance.

    • instance.group-name - The name of the security group for the instance.

    • ip-address - The public IPv4 address of the instance.

    • kernel-id - The kernel ID.

    • key-name - The name of the key pair used when the instance was launched.

    • launch-index - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).

    • launch-time - The time when the instance was launched.

    • metadata-options.http-tokens - The metadata request authorization state (optional | required)

    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64)

    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled)

    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled).

    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.

    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.

    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.

    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.

    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

    • network-interface.attachment.attachment-id - The ID of the interface attachment.

    • network-interface.attachment.instance-id - The ID of the instance to which the network interface is attached.

    • network-interface.attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

    • network-interface.attachment.device-index - The device index to which the network interface is attached.

    • network-interface.attachment.status - The status of the attachment (attaching | attached | detaching | detached).

    • network-interface.attachment.attach-time - The time that the network interface was attached to an instance.

    • network-interface.attachment.delete-on-termination - Specifies whether the attachment is deleted when an instance is terminated.

    • network-interface.availability-zone - The Availability Zone for the network interface.

    • network-interface.description - The description of the network interface.

    • network-interface.group-id - The ID of a security group associated with the network interface.

    • network-interface.group-name - The name of a security group associated with the network interface.

    • network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.

    • network-interface.mac-address - The MAC address of the network interface.

    • network-interface.network-interface-id - The ID of the network interface.

    • network-interface.owner-id - The ID of the owner of the network interface.

    • network-interface.private-dns-name - The private DNS name of the network interface.

    • network-interface.requester-id - The requester ID for the network interface.

    • network-interface.requester-managed - Indicates whether the network interface is being managed by AWS.

    • network-interface.status - The status of the network interface (available) | in-use).

    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

    • network-interface.subnet-id - The ID of the subnet for the network interface.

    • network-interface.vpc-id - The ID of the VPC for the network interface.

    • owner-id - The AWS account ID of the instance owner.

    • placement-group-name - The name of the placement group for the instance.

    • placement-partition-number - The partition in which the instance is located.

    • platform - The platform. To list only Windows instances, use windows.

    • private-dns-name - The private IPv4 DNS name of the instance.

    • private-ip-address - The private IPv4 address of the instance.

    • product-code - The product code associated with the AMI used to launch the instance.

    • product-code.type - The type of product code (devpay | marketplace).

    • ramdisk-id - The RAM disk ID.

    • reason - The reason for the current state of the instance (for example, shows \"User Initiated [date]\" when you stop or terminate the instance). Similar to the state-reason-code filter.

    • requester-id - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).

    • reservation-id - The ID of the instance\'s reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.

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

    • root-device-type - The type of the root device volume (ebs | instance-store).

    • source-dest-check - Indicates whether the instance performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform network address translation (NAT) in your VPC.

    • spot-instance-request-id - The ID of the Spot Instance request.

    • state-reason-code - The reason code for the state change.

    • state-reason-message - A message that describes the state change.

    • subnet-id - The ID of the subnet for the instance.

    • 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 that have a tag with a specific key, regardless of the tag value.

    • tenancy - The tenancy of an instance (dedicated | default | host).

    • virtualization-type - The virtualization type of the instance (paravirtual | hvm).

    • vpc-id - The ID of the VPC that the instance is running in.

  • :instance_ids (Array<String>)

    The instance IDs.

    Default: Describes all your 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.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:

#describe_internet_gateways(options = {}) ⇒ Types::DescribeInternetGatewaysResult

Describes one or more of your internet gateways.

Examples:

Example: To describe the Internet gateway for a VPC


# This example describes the Internet gateway for the specified VPC.

resp = client.describe_internet_gateways({
  filters: [
    {
      name: "attachment.vpc-id", 
      values: [
        "vpc-a01106c2", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  internet_gateways: [
    {
      attachments: [
        {
          state: "available", 
          vpc_id: "vpc-a01106c2", 
        }, 
      ], 
      internet_gateway_id: "igw-c0a643a9", 
      tags: [
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_internet_gateways({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  internet_gateway_ids: ["InternetGatewayId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.internet_gateways #=> Array
resp.internet_gateways[0].attachments #=> Array
resp.internet_gateways[0].attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.internet_gateways[0].attachments[0].vpc_id #=> String
resp.internet_gateways[0].internet_gateway_id #=> String
resp.internet_gateways[0].owner_id #=> String
resp.internet_gateways[0].tags #=> Array
resp.internet_gateways[0].tags[0].key #=> String
resp.internet_gateways[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • attachment.state - The current state of the attachment between the gateway and the VPC (available). Present only if a VPC is attached.

    • attachment.vpc-id - The ID of an attached VPC.

    • internet-gateway-id - The ID of the Internet gateway.

    • owner-id - The ID of the AWS account that owns the internet gateway.

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

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

  • :internet_gateway_ids (Array<String>)

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_ipv_6_pools(options = {}) ⇒ Types::DescribeIpv6PoolsResult

Describes your IPv6 address pools.

Examples:

Request syntax with placeholder values


resp = client.describe_ipv_6_pools({
  pool_ids: ["Ipv6PoolEc2Id"],
  next_token: "NextToken",
  max_results: 1,
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.ipv_6_pools #=> Array
resp.ipv_6_pools[0].pool_id #=> String
resp.ipv_6_pools[0].description #=> String
resp.ipv_6_pools[0].pool_cidr_blocks #=> Array
resp.ipv_6_pools[0].pool_cidr_blocks[0].cidr #=> String
resp.ipv_6_pools[0].tags #=> Array
resp.ipv_6_pools[0].tags[0].key #=> String
resp.ipv_6_pools[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :pool_ids (Array<String>)

    The IDs of the IPv6 address pools.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

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

Returns:

See Also:

#describe_key_pairs(options = {}) ⇒ Types::DescribeKeyPairsResult

Describes the specified key pairs or all of your key pairs.

For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To display a key pair


# This example displays the fingerprint for the specified key.

resp = client.describe_key_pairs({
  key_names: [
    "my-key-pair", 
  ], 
})

# resp.to_h outputs the following:
{
  key_pairs: [
    {
      key_fingerprint: "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f", 
      key_name: "my-key-pair", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_key_pairs({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  key_names: ["KeyPairName"],
  key_pair_ids: ["KeyPairId"],
  dry_run: false,
})

Response structure


resp.key_pairs #=> Array
resp.key_pairs[0].key_pair_id #=> String
resp.key_pairs[0].key_fingerprint #=> String
resp.key_pairs[0].key_name #=> String
resp.key_pairs[0].tags #=> Array
resp.key_pairs[0].tags[0].key #=> String
resp.key_pairs[0].tags[0].value #=> String

Options Hash (options):

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

    The filters.

    • key-pair-id - The ID of the key pair.

    • fingerprint - The fingerprint of the key pair.

    • key-name - The name of the key pair.

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

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

  • :key_names (Array<String>)

    The key pair names.

    Default: Describes all your key pairs.

  • :key_pair_ids (Array<String>)

    The IDs of the key pairs.

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

See Also:

#describe_launch_template_versions(options = {}) ⇒ Types::DescribeLaunchTemplateVersionsResult

Describes one or more versions of a specified launch template. You can describe all versions, individual versions, or a range of versions. You can also describe all the latest versions or all the default versions of all the launch templates in your account.

Examples:

Example: To describe the versions for a launch template


# This example describes the versions for the specified launch template.

resp = client.describe_launch_template_versions({
  launch_template_id: "068f72b72934aff71", 
})

# resp.to_h outputs the following:
{
  launch_template_versions: [
    {
      create_time: Time.parse("2017-11-20T13:12:32.000Z"), 
      created_by: "arn:aws:iam::123456789102:root", 
      default_version: false, 
      launch_template_data: {
        image_id: "ami-6057e21a", 
        instance_type: "t2.medium", 
        key_name: "kp-us-east", 
        network_interfaces: [
          {
            device_index: 0, 
            groups: [
              "sg-7c227019", 
            ], 
            subnet_id: "subnet-1a2b3c4d", 
          }, 
        ], 
      }, 
      launch_template_id: "lt-068f72b72934aff71", 
      launch_template_name: "Webservers", 
      version_number: 2, 
    }, 
    {
      create_time: Time.parse("2017-11-20T12:52:33.000Z"), 
      created_by: "arn:aws:iam::123456789102:root", 
      default_version: true, 
      launch_template_data: {
        image_id: "ami-aabbcc11", 
        instance_type: "t2.medium", 
        key_name: "kp-us-east", 
        network_interfaces: [
          {
            associate_public_ip_address: true, 
            delete_on_termination: false, 
            device_index: 0, 
            groups: [
              "sg-7c227019", 
            ], 
            subnet_id: "subnet-7b16de0c", 
          }, 
        ], 
        user_data: "", 
      }, 
      launch_template_id: "lt-068f72b72934aff71", 
      launch_template_name: "Webservers", 
      version_number: 1, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_launch_template_versions({
  dry_run: false,
  launch_template_id: "LaunchTemplateId",
  launch_template_name: "LaunchTemplateName",
  versions: ["String"],
  min_version: "String",
  max_version: "String",
  next_token: "String",
  max_results: 1,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.launch_template_versions #=> Array
resp.launch_template_versions[0].launch_template_id #=> String
resp.launch_template_versions[0].launch_template_name #=> String
resp.launch_template_versions[0].version_number #=> Integer
resp.launch_template_versions[0].version_description #=> String
resp.launch_template_versions[0].create_time #=> Time
resp.launch_template_versions[0].created_by #=> String
resp.launch_template_versions[0].default_version #=> true/false
resp.launch_template_versions[0].launch_template_data.kernel_id #=> String
resp.launch_template_versions[0].launch_template_data.ebs_optimized #=> true/false
resp.launch_template_versions[0].launch_template_data.iam_instance_profile.arn #=> String
resp.launch_template_versions[0].launch_template_data.iam_instance_profile.name #=> String
resp.launch_template_versions[0].launch_template_data.block_device_mappings #=> Array
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].device_name #=> String
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].virtual_name #=> String
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.encrypted #=> true/false
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.iops #=> Integer
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.kms_key_id #=> String
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.snapshot_id #=> String
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.volume_size #=> Integer
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.launch_template_versions[0].launch_template_data.block_device_mappings[0].no_device #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces #=> Array
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].associate_public_ip_address #=> true/false
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].delete_on_termination #=> true/false
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].description #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].device_index #=> Integer
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].groups #=> Array
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].groups[0] #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].interface_type #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].ipv_6_address_count #=> Integer
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].ipv_6_addresses #=> Array
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].network_interface_id #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].private_ip_address #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].private_ip_addresses #=> Array
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].subnet_id #=> String
resp.launch_template_versions[0].launch_template_data.network_interfaces[0].network_card_index #=> Integer
resp.launch_template_versions[0].launch_template_data.image_id #=> String
resp.launch_template_versions[0].launch_template_data.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.launch_template_versions[0].launch_template_data.key_name #=> String
resp.launch_template_versions[0].launch_template_data.monitoring.enabled #=> true/false
resp.launch_template_versions[0].launch_template_data.placement.availability_zone #=> String
resp.launch_template_versions[0].launch_template_data.placement.affinity #=> String
resp.launch_template_versions[0].launch_template_data.placement.group_name #=> String
resp.launch_template_versions[0].launch_template_data.placement.host_id #=> String
resp.launch_template_versions[0].launch_template_data.placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.launch_template_versions[0].launch_template_data.placement.spread_domain #=> String
resp.launch_template_versions[0].launch_template_data.placement.host_resource_group_arn #=> String
resp.launch_template_versions[0].launch_template_data.placement.partition_number #=> Integer
resp.launch_template_versions[0].launch_template_data.ram_disk_id #=> String
resp.launch_template_versions[0].launch_template_data.disable_api_termination #=> true/false
resp.launch_template_versions[0].launch_template_data.instance_initiated_shutdown_behavior #=> String, one of "stop", "terminate"
resp.launch_template_versions[0].launch_template_data.user_data #=> String
resp.launch_template_versions[0].launch_template_data.tag_specifications #=> Array
resp.launch_template_versions[0].launch_template_data.tag_specifications[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.launch_template_versions[0].launch_template_data.tag_specifications[0].tags #=> Array
resp.launch_template_versions[0].launch_template_data.tag_specifications[0].tags[0].key #=> String
resp.launch_template_versions[0].launch_template_data.tag_specifications[0].tags[0].value #=> String
resp.launch_template_versions[0].launch_template_data.elastic_gpu_specifications #=> Array
resp.launch_template_versions[0].launch_template_data.elastic_gpu_specifications[0].type #=> String
resp.launch_template_versions[0].launch_template_data.elastic_inference_accelerators #=> Array
resp.launch_template_versions[0].launch_template_data.elastic_inference_accelerators[0].type #=> String
resp.launch_template_versions[0].launch_template_data.elastic_inference_accelerators[0].count #=> Integer
resp.launch_template_versions[0].launch_template_data.security_group_ids #=> Array
resp.launch_template_versions[0].launch_template_data.security_group_ids[0] #=> String
resp.launch_template_versions[0].launch_template_data.security_groups #=> Array
resp.launch_template_versions[0].launch_template_data.security_groups[0] #=> String
resp.launch_template_versions[0].launch_template_data.instance_market_options.market_type #=> String, one of "spot"
resp.launch_template_versions[0].launch_template_data.instance_market_options.spot_options.max_price #=> String
resp.launch_template_versions[0].launch_template_data.instance_market_options.spot_options.spot_instance_type #=> String, one of "one-time", "persistent"
resp.launch_template_versions[0].launch_template_data.instance_market_options.spot_options.block_duration_minutes #=> Integer
resp.launch_template_versions[0].launch_template_data.instance_market_options.spot_options.valid_until #=> Time
resp.launch_template_versions[0].launch_template_data.instance_market_options.spot_options.instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.launch_template_versions[0].launch_template_data.credit_specification.cpu_credits #=> String
resp.launch_template_versions[0].launch_template_data.cpu_options.core_count #=> Integer
resp.launch_template_versions[0].launch_template_data.cpu_options.threads_per_core #=> Integer
resp.launch_template_versions[0].launch_template_data.capacity_reservation_specification.capacity_reservation_preference #=> String, one of "open", "none"
resp.launch_template_versions[0].launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_id #=> String
resp.launch_template_versions[0].launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_resource_group_arn #=> String
resp.launch_template_versions[0].launch_template_data.license_specifications #=> Array
resp.launch_template_versions[0].launch_template_data.license_specifications[0].license_configuration_arn #=> String
resp.launch_template_versions[0].launch_template_data.hibernation_options.configured #=> true/false
resp.launch_template_versions[0].launch_template_data..state #=> String, one of "pending", "applied"
resp.launch_template_versions[0].launch_template_data..http_tokens #=> String, one of "optional", "required"
resp.launch_template_versions[0].launch_template_data..http_put_response_hop_limit #=> Integer
resp.launch_template_versions[0].launch_template_data..http_endpoint #=> String, one of "disabled", "enabled"
resp.launch_template_versions[0].launch_template_data.enclave_options.enabled #=> true/false
resp.next_token #=> String

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.

  • :launch_template_id (String)

    The ID of the launch template. To describe one or more versions of a specified launch template, you must specify either the launch template ID or the launch template name in the request. To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • :launch_template_name (String)

    The name of the launch template. To describe one or more versions of a specified launch template, you must specify either the launch template ID or the launch template name in the request. To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • :versions (Array<String>)

    One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.

    To describe one or more versions of a specified launch template, valid values are $Latest, $Default, and numbers.

    To describe all launch templates in your account that are defined as the latest version, the valid value is $Latest. To describe all launch templates in your account that are defined as the default version, the valid value is $Default. You can specify $Latest and $Default in the same call. You cannot specify numbers.

  • :min_version (String)

    The version number after which to describe launch template versions.

  • :max_version (String)

    The version number up to which to describe launch template versions.

  • :next_token (String)

    The token to request the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200.

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

    One or more filters.

    • create-time - The time the launch template version was created.

    • ebs-optimized - A boolean that indicates whether the instance is optimized for Amazon EBS I/O.

    • iam-instance-profile - The ARN of the IAM instance profile.

    • image-id - The ID of the AMI.

    • instance-type - The instance type.

    • is-default-version - A boolean that indicates whether the launch template version is the default version.

    • kernel-id - The kernel ID.

    • ram-disk-id - The RAM disk ID.

Returns:

See Also:

#describe_launch_templates(options = {}) ⇒ Types::DescribeLaunchTemplatesResult

Describes one or more launch templates.

Examples:

Example: To describe a launch template


# This example describes the specified launch template.

resp = client.describe_launch_templates({
  launch_template_ids: [
    "lt-01238c059e3466abc", 
  ], 
})

# resp.to_h outputs the following:
{
  launch_templates: [
    {
      create_time: Time.parse("2018-01-16T04:32:57.000Z"), 
      created_by: "arn:aws:iam::123456789012:root", 
      default_version_number: 1, 
      latest_version_number: 1, 
      launch_template_id: "lt-01238c059e3466abc", 
      launch_template_name: "my-template", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_launch_templates({
  dry_run: false,
  launch_template_ids: ["LaunchTemplateId"],
  launch_template_names: ["LaunchTemplateName"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.launch_templates #=> Array
resp.launch_templates[0].launch_template_id #=> String
resp.launch_templates[0].launch_template_name #=> String
resp.launch_templates[0].create_time #=> Time
resp.launch_templates[0].created_by #=> String
resp.launch_templates[0].default_version_number #=> Integer
resp.launch_templates[0].latest_version_number #=> Integer
resp.launch_templates[0].tags #=> Array
resp.launch_templates[0].tags[0].key #=> String
resp.launch_templates[0].tags[0].value #=> String
resp.next_token #=> String

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.

  • :launch_template_ids (Array<String>)

    One or more launch template IDs.

  • :launch_template_names (Array<String>)

    One or more launch template names.

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

    One or more filters.

    • create-time - The time the launch template was created.

    • launch-template-name - The name of the launch template.

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

  • :next_token (String)

    The token to request the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200.

Returns:

See Also:

#describe_local_gateway_route_table_virtual_interface_group_associations(options = {}) ⇒ Types::DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResult

Describes the associations between virtual interface groups and local gateway route tables.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateway_route_table_virtual_interface_group_associations({
  local_gateway_route_table_virtual_interface_group_association_ids: ["LocalGatewayRouteTableVirtualInterfaceGroupAssociationId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateway_route_table_virtual_interface_group_associations #=> Array
resp.local_gateway_route_table_virtual_interface_group_associations[0].local_gateway_route_table_virtual_interface_group_association_id #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].local_gateway_virtual_interface_group_id #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].local_gateway_id #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].local_gateway_route_table_id #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].local_gateway_route_table_arn #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].owner_id #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].state #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].tags #=> Array
resp.local_gateway_route_table_virtual_interface_group_associations[0].tags[0].key #=> String
resp.local_gateway_route_table_virtual_interface_group_associations[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_route_table_virtual_interface_group_association_ids (Array<String>)

    The IDs of the associations.

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

    One or more filters.

    • local-gateway-id - The ID of a local gateway.

    • local-gateway-route-table-id - The ID of the local gateway route table.

    • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.

    • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.

    • state - The state of the association.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_local_gateway_route_table_vpc_associations(options = {}) ⇒ Types::DescribeLocalGatewayRouteTableVpcAssociationsResult

Describes the specified associations between VPCs and local gateway route tables.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateway_route_table_vpc_associations({
  local_gateway_route_table_vpc_association_ids: ["LocalGatewayRouteTableVpcAssociationId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateway_route_table_vpc_associations #=> Array
resp.local_gateway_route_table_vpc_associations[0].local_gateway_route_table_vpc_association_id #=> String
resp.local_gateway_route_table_vpc_associations[0].local_gateway_route_table_id #=> String
resp.local_gateway_route_table_vpc_associations[0].local_gateway_route_table_arn #=> String
resp.local_gateway_route_table_vpc_associations[0].local_gateway_id #=> String
resp.local_gateway_route_table_vpc_associations[0].vpc_id #=> String
resp.local_gateway_route_table_vpc_associations[0].owner_id #=> String
resp.local_gateway_route_table_vpc_associations[0].state #=> String
resp.local_gateway_route_table_vpc_associations[0].tags #=> Array
resp.local_gateway_route_table_vpc_associations[0].tags[0].key #=> String
resp.local_gateway_route_table_vpc_associations[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_route_table_vpc_association_ids (Array<String>)

    The IDs of the associations.

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

    One or more filters.

    • local-gateway-id - The ID of a local gateway.

    • local-gateway-route-table-id - The ID of the local gateway route table.

    • local-gateway-route-table-vpc-association-id - The ID of the association.

    • state - The state of the association.

    • vpc-id - The ID of the VPC.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_local_gateway_route_tables(options = {}) ⇒ Types::DescribeLocalGatewayRouteTablesResult

Describes one or more local gateway route tables. By default, all local gateway route tables are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateway_route_tables({
  local_gateway_route_table_ids: ["LocalGatewayRoutetableId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateway_route_tables #=> Array
resp.local_gateway_route_tables[0].local_gateway_route_table_id #=> String
resp.local_gateway_route_tables[0].local_gateway_route_table_arn #=> String
resp.local_gateway_route_tables[0].local_gateway_id #=> String
resp.local_gateway_route_tables[0].outpost_arn #=> String
resp.local_gateway_route_tables[0].owner_id #=> String
resp.local_gateway_route_tables[0].state #=> String
resp.local_gateway_route_tables[0].tags #=> Array
resp.local_gateway_route_tables[0].tags[0].key #=> String
resp.local_gateway_route_tables[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_route_table_ids (Array<String>)

    The IDs of the local gateway route tables.

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

    One or more filters.

    • local-gateway-id - The ID of a local gateway.

    • local-gateway-route-table-id - The ID of a local gateway route table.

    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

    • state - The state of the local gateway route table.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_local_gateway_virtual_interface_groups(options = {}) ⇒ Types::DescribeLocalGatewayVirtualInterfaceGroupsResult

Describes the specified local gateway virtual interface groups.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateway_virtual_interface_groups({
  local_gateway_virtual_interface_group_ids: ["LocalGatewayVirtualInterfaceGroupId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateway_virtual_interface_groups #=> Array
resp.local_gateway_virtual_interface_groups[0].local_gateway_virtual_interface_group_id #=> String
resp.local_gateway_virtual_interface_groups[0].local_gateway_virtual_interface_ids #=> Array
resp.local_gateway_virtual_interface_groups[0].local_gateway_virtual_interface_ids[0] #=> String
resp.local_gateway_virtual_interface_groups[0].local_gateway_id #=> String
resp.local_gateway_virtual_interface_groups[0].owner_id #=> String
resp.local_gateway_virtual_interface_groups[0].tags #=> Array
resp.local_gateway_virtual_interface_groups[0].tags[0].key #=> String
resp.local_gateway_virtual_interface_groups[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_virtual_interface_group_ids (Array<String>)

    The IDs of the virtual interface groups.

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

    One or more filters.

    • local-gateway-id - The ID of a local gateway.

    • local-gateway-virtual-interface-id - The ID of the virtual interface.

    • local-gateway-virtual-interface-group-id - The ID of the virtual interface group.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_local_gateway_virtual_interfaces(options = {}) ⇒ Types::DescribeLocalGatewayVirtualInterfacesResult

Describes the specified local gateway virtual interfaces.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateway_virtual_interfaces({
  local_gateway_virtual_interface_ids: ["LocalGatewayVirtualInterfaceId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateway_virtual_interfaces #=> Array
resp.local_gateway_virtual_interfaces[0].local_gateway_virtual_interface_id #=> String
resp.local_gateway_virtual_interfaces[0].local_gateway_id #=> String
resp.local_gateway_virtual_interfaces[0].vlan #=> Integer
resp.local_gateway_virtual_interfaces[0].local_address #=> String
resp.local_gateway_virtual_interfaces[0].peer_address #=> String
resp.local_gateway_virtual_interfaces[0].local_bgp_asn #=> Integer
resp.local_gateway_virtual_interfaces[0].peer_bgp_asn #=> Integer
resp.local_gateway_virtual_interfaces[0].owner_id #=> String
resp.local_gateway_virtual_interfaces[0].tags #=> Array
resp.local_gateway_virtual_interfaces[0].tags[0].key #=> String
resp.local_gateway_virtual_interfaces[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_virtual_interface_ids (Array<String>)

    The IDs of the virtual interfaces.

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

    One or more filters.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_local_gateways(options = {}) ⇒ Types::DescribeLocalGatewaysResult

Describes one or more local gateways. By default, all local gateways are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_local_gateways({
  local_gateway_ids: ["LocalGatewayId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.local_gateways #=> Array
resp.local_gateways[0].local_gateway_id #=> String
resp.local_gateways[0].outpost_arn #=> String
resp.local_gateways[0].owner_id #=> String
resp.local_gateways[0].state #=> String
resp.local_gateways[0].tags #=> Array
resp.local_gateways[0].tags[0].key #=> String
resp.local_gateways[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_ids (Array<String>)

    One or more filters.

    • local-gateway-id - The ID of a local gateway.

    • local-gateway-route-table-id - The ID of the local gateway route table.

    • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.

    • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.

    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

    • state - The state of the association.

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

    One or more filters.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_managed_prefix_lists(options = {}) ⇒ Types::DescribeManagedPrefixListsResult

Describes your managed prefix lists and any AWS-managed prefix lists.

To view the entries for your prefix list, use GetManagedPrefixListEntries.

Examples:

Request syntax with placeholder values


resp = client.describe_managed_prefix_lists({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
  prefix_list_ids: ["String"],
})

Response structure


resp.next_token #=> String
resp.prefix_lists #=> Array
resp.prefix_lists[0].prefix_list_id #=> String
resp.prefix_lists[0].address_family #=> String
resp.prefix_lists[0].state #=> String, one of "create-in-progress", "create-complete", "create-failed", "modify-in-progress", "modify-complete", "modify-failed", "restore-in-progress", "restore-complete", "restore-failed", "delete-in-progress", "delete-complete", "delete-failed"
resp.prefix_lists[0].state_message #=> String
resp.prefix_lists[0].prefix_list_arn #=> String
resp.prefix_lists[0].prefix_list_name #=> String
resp.prefix_lists[0].max_entries #=> Integer
resp.prefix_lists[0].version #=> Integer
resp.prefix_lists[0].tags #=> Array
resp.prefix_lists[0].tags[0].key #=> String
resp.prefix_lists[0].tags[0].value #=> String
resp.prefix_lists[0].owner_id #=> String

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.

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

    One or more filters.

    • owner-id - The ID of the prefix list owner.

    • prefix-list-id - The ID of the prefix list.

    • prefix-list-name - The name of the prefix list.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

  • :prefix_list_ids (Array<String>)

    One or more prefix list IDs.

Returns:

See Also:

#describe_moving_addresses(options = {}) ⇒ Types::DescribeMovingAddressesResult

Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.

Examples:

Example: To describe your moving addresses


# This example describes all of your moving Elastic IP addresses.

resp = client.describe_moving_addresses({
})

# resp.to_h outputs the following:
{
  moving_address_statuses: [
    {
      move_status: "MovingToVpc", 
      public_ip: "198.51.100.0", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_moving_addresses({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  max_results: 1,
  next_token: "String",
  public_ips: ["String"],
})

Response structure


resp.moving_address_statuses #=> Array
resp.moving_address_statuses[0].move_status #=> String, one of "movingToVpc", "restoringToClassic"
resp.moving_address_statuses[0].public_ip #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic).

    ^

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

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value outside of this range, an error is returned.

    Default: If no value is provided, the default is 1000.

  • :next_token (String)

    The token for the next page of results.

  • :public_ips (Array<String>)

    One or more Elastic IP addresses.

Returns:

See Also:

#describe_nat_gateways(options = {}) ⇒ Types::DescribeNatGatewaysResult

Describes one or more of your NAT gateways.

Examples:

Example: To describe a NAT gateway


# This example describes the NAT gateway for the specified VPC.

resp = client.describe_nat_gateways({
  filter: [
    {
      name: "vpc-id", 
      values: [
        "vpc-1a2b3c4d", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  nat_gateways: [
    {
      create_time: Time.parse("2015-12-01T12:26:55.983Z"), 
      nat_gateway_addresses: [
        {
          allocation_id: "eipalloc-89c620ec", 
          network_interface_id: "eni-9dec76cd", 
          private_ip: "10.0.0.149", 
          public_ip: "198.11.222.333", 
        }, 
      ], 
      nat_gateway_id: "nat-05dba92075d71c408", 
      state: "available", 
      subnet_id: "subnet-847e4dc2", 
      vpc_id: "vpc-1a2b3c4d", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_nat_gateways({
  dry_run: false,
  filter: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  nat_gateway_ids: ["NatGatewayId"],
  next_token: "String",
})

Response structure


resp.nat_gateways #=> Array
resp.nat_gateways[0].create_time #=> Time
resp.nat_gateways[0].delete_time #=> Time
resp.nat_gateways[0].failure_code #=> String
resp.nat_gateways[0].failure_message #=> String
resp.nat_gateways[0].nat_gateway_addresses #=> Array
resp.nat_gateways[0].nat_gateway_addresses[0].allocation_id #=> String
resp.nat_gateways[0].nat_gateway_addresses[0].network_interface_id #=> String
resp.nat_gateways[0].nat_gateway_addresses[0].private_ip #=> String
resp.nat_gateways[0].nat_gateway_addresses[0].public_ip #=> String
resp.nat_gateways[0].nat_gateway_id #=> String
resp.nat_gateways[0].provisioned_bandwidth.provision_time #=> Time
resp.nat_gateways[0].provisioned_bandwidth.provisioned #=> String
resp.nat_gateways[0].provisioned_bandwidth.request_time #=> Time
resp.nat_gateways[0].provisioned_bandwidth.requested #=> String
resp.nat_gateways[0].provisioned_bandwidth.status #=> String
resp.nat_gateways[0].state #=> String, one of "pending", "failed", "available", "deleting", "deleted"
resp.nat_gateways[0].subnet_id #=> String
resp.nat_gateways[0].vpc_id #=> String
resp.nat_gateways[0].tags #=> Array
resp.nat_gateways[0].tags[0].key #=> String
resp.nat_gateways[0].tags[0].value #=> String
resp.next_token #=> String

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.

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

    One or more filters.

    • nat-gateway-id - The ID of the NAT gateway.

    • state - The state of the NAT gateway (pending | failed | available | deleting | deleted).

    • subnet-id - The ID of the subnet in which the NAT gateway resides.

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

    • vpc-id - The ID of the VPC in which the NAT gateway resides.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :nat_gateway_ids (Array<String>)

    One or more NAT gateway IDs.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_network_acls(options = {}) ⇒ Types::DescribeNetworkAclsResult

Describes one or more of your network ACLs.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To describe a network ACL


# This example describes the specified network ACL.

resp = client.describe_network_acls({
  network_acl_ids: [
    "acl-5fb85d36", 
  ], 
})

# resp.to_h outputs the following:
{
  network_acls: [
    {
      associations: [
        {
          network_acl_association_id: "aclassoc-66ea5f0b", 
          network_acl_id: "acl-9aeb5ef7", 
          subnet_id: "subnet-65ea5f08", 
        }, 
      ], 
      entries: [
        {
          cidr_block: "0.0.0.0/0", 
          egress: true, 
          protocol: "-1", 
          rule_action: "deny", 
          rule_number: 32767, 
        }, 
        {
          cidr_block: "0.0.0.0/0", 
          egress: false, 
          protocol: "-1", 
          rule_action: "deny", 
          rule_number: 32767, 
        }, 
      ], 
      is_default: false, 
      network_acl_id: "acl-5fb85d36", 
      tags: [
      ], 
      vpc_id: "vpc-a01106c2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_network_acls({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  network_acl_ids: ["NetworkAclId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.network_acls #=> Array
resp.network_acls[0].associations #=> Array
resp.network_acls[0].associations[0].network_acl_association_id #=> String
resp.network_acls[0].associations[0].network_acl_id #=> String
resp.network_acls[0].associations[0].subnet_id #=> String
resp.network_acls[0].entries #=> Array
resp.network_acls[0].entries[0].cidr_block #=> String
resp.network_acls[0].entries[0].egress #=> true/false
resp.network_acls[0].entries[0].icmp_type_code.code #=> Integer
resp.network_acls[0].entries[0].icmp_type_code.type #=> Integer
resp.network_acls[0].entries[0].ipv_6_cidr_block #=> String
resp.network_acls[0].entries[0].port_range.from #=> Integer
resp.network_acls[0].entries[0].port_range.to #=> Integer
resp.network_acls[0].entries[0].protocol #=> String
resp.network_acls[0].entries[0].rule_action #=> String, one of "allow", "deny"
resp.network_acls[0].entries[0].rule_number #=> Integer
resp.network_acls[0].is_default #=> true/false
resp.network_acls[0].network_acl_id #=> String
resp.network_acls[0].tags #=> Array
resp.network_acls[0].tags[0].key #=> String
resp.network_acls[0].tags[0].value #=> String
resp.network_acls[0].vpc_id #=> String
resp.network_acls[0].owner_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • association.association-id - The ID of an association ID for the ACL.

    • association.network-acl-id - The ID of the network ACL involved in the association.

    • association.subnet-id - The ID of the subnet involved in the association.

    • default - Indicates whether the ACL is the default network ACL for the VPC.

    • entry.cidr - The IPv4 CIDR range specified in the entry.

    • entry.icmp.code - The ICMP code specified in the entry, if any.

    • entry.icmp.type - The ICMP type specified in the entry, if any.

    • entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.

    • entry.port-range.from - The start of the port range specified in the entry.

    • entry.port-range.to - The end of the port range specified in the entry.

    • entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a protocol number).

    • entry.rule-action - Allows or denies the matching traffic (allow | deny).

    • entry.rule-number - The number of an entry (in other words, rule) in the set of ACL entries.

    • network-acl-id - The ID of the network ACL.

    • owner-id - The ID of the AWS account that owns the network ACL.

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

    • vpc-id - The ID of the VPC for the network ACL.

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

  • :network_acl_ids (Array<String>)

    One or more network ACL IDs.

    Default: Describes all your network ACLs.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_network_interface_attribute(options = {}) ⇒ Types::DescribeNetworkInterfaceAttributeResult

Describes a network interface attribute. You can specify only one attribute at a time.

Examples:

Example: To describe the attachment attribute of a network interface


# This example describes the attachment attribute of the specified network interface.

resp = client.describe_network_interface_attribute({
  attribute: "attachment", 
  network_interface_id: "eni-686ea200", 
})

# resp.to_h outputs the following:
{
  attachment: {
    attach_time: Time.parse("2015-05-21T20:02:20.000Z"), 
    attachment_id: "eni-attach-43348162", 
    delete_on_termination: true, 
    device_index: 0, 
    instance_id: "i-1234567890abcdef0", 
    instance_owner_id: "123456789012", 
    status: "attached", 
  }, 
  network_interface_id: "eni-686ea200", 
}

Example: To describe the description attribute of a network interface


# This example describes the description attribute of the specified network interface.

resp = client.describe_network_interface_attribute({
  attribute: "description", 
  network_interface_id: "eni-686ea200", 
})

# resp.to_h outputs the following:
{
  description: {
    value: "My description", 
  }, 
  network_interface_id: "eni-686ea200", 
}

Example: To describe the groupSet attribute of a network interface


# This example describes the groupSet attribute of the specified network interface.

resp = client.describe_network_interface_attribute({
  attribute: "groupSet", 
  network_interface_id: "eni-686ea200", 
})

# resp.to_h outputs the following:
{
  groups: [
    {
      group_id: "sg-903004f8", 
      group_name: "my-security-group", 
    }, 
  ], 
  network_interface_id: "eni-686ea200", 
}

Example: To describe the sourceDestCheck attribute of a network interface


# This example describes the sourceDestCheck attribute of the specified network interface.

resp = client.describe_network_interface_attribute({
  attribute: "sourceDestCheck", 
  network_interface_id: "eni-686ea200", 
})

# resp.to_h outputs the following:
{
  network_interface_id: "eni-686ea200", 
  source_dest_check: {
    value: true, 
  }, 
}

Request syntax with placeholder values


resp = client.describe_network_interface_attribute({
  attribute: "description", # accepts description, groupSet, sourceDestCheck, attachment
  dry_run: false,
  network_interface_id: "NetworkInterfaceId", # required
})

Response structure


resp.attachment.attach_time #=> Time
resp.attachment.attachment_id #=> String
resp.attachment.delete_on_termination #=> true/false
resp.attachment.device_index #=> Integer
resp.attachment.network_card_index #=> Integer
resp.attachment.instance_id #=> String
resp.attachment.instance_owner_id #=> String
resp.attachment.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.description #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.groups #=> Array
resp.groups[0].group_name #=> String
resp.groups[0].group_id #=> String
resp.network_interface_id #=> String
resp.source_dest_check.value #=> true/false

Options Hash (options):

  • :attribute (String)

    The attribute of the network interface. This parameter is required.

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

  • :network_interface_id (required, String)

    The ID of the network interface.

Returns:

See Also:

#describe_network_interface_permissions(options = {}) ⇒ Types::DescribeNetworkInterfacePermissionsResult

Describes the permissions for your network interfaces.

Examples:

Request syntax with placeholder values


resp = client.describe_network_interface_permissions({
  network_interface_permission_ids: ["NetworkInterfacePermissionId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.network_interface_permissions #=> Array
resp.network_interface_permissions[0].network_interface_permission_id #=> String
resp.network_interface_permissions[0].network_interface_id #=> String
resp.network_interface_permissions[0]. #=> String
resp.network_interface_permissions[0].aws_service #=> String
resp.network_interface_permissions[0].permission #=> String, one of "INSTANCE-ATTACH", "EIP-ASSOCIATE"
resp.network_interface_permissions[0].permission_state.state #=> String, one of "pending", "granted", "revoking", "revoked"
resp.network_interface_permissions[0].permission_state.status_message #=> String
resp.next_token #=> String

Options Hash (options):

  • :network_interface_permission_ids (Array<String>)

    One or more network interface permission IDs.

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

    One or more filters.

    • network-interface-permission.network-interface-permission-id - The ID of the permission.

    • network-interface-permission.network-interface-id - The ID of the network interface.

    • network-interface-permission.aws-account-id - The AWS account ID.

    • network-interface-permission.aws-service - The AWS service.

    • network-interface-permission.permission - The type of permission (INSTANCE-ATTACH | EIP-ASSOCIATE).

  • :next_token (String)

    The token to request the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. If this parameter is not specified, up to 50 results are returned by default.

Returns:

See Also:

#describe_network_interfaces(options = {}) ⇒ Types::DescribeNetworkInterfacesResult

Describes one or more of your network interfaces.

Examples:

Example: To describe a network interface


# 

resp = client.describe_network_interfaces({
  network_interface_ids: [
    "eni-e5aa89a3", 
  ], 
})

# resp.to_h outputs the following:
{
  network_interfaces: [
    {
      association: {
        association_id: "eipassoc-0fbb766a", 
        ip_owner_id: "123456789012", 
        public_dns_name: "ec2-203-0-113-12.compute-1.amazonaws.com", 
        public_ip: "203.0.113.12", 
      }, 
      attachment: {
        attach_time: Time.parse("2013-11-30T23:36:42.000Z"), 
        attachment_id: "eni-attach-66c4350a", 
        delete_on_termination: false, 
        device_index: 1, 
        instance_id: "i-1234567890abcdef0", 
        instance_owner_id: "123456789012", 
        status: "attached", 
      }, 
      availability_zone: "us-east-1d", 
      description: "my network interface", 
      groups: [
        {
          group_id: "sg-8637d3e3", 
          group_name: "default", 
        }, 
      ], 
      mac_address: "02:2f:8f:b0:cf:75", 
      network_interface_id: "eni-e5aa89a3", 
      owner_id: "123456789012", 
      private_dns_name: "ip-10-0-1-17.ec2.internal", 
      private_ip_address: "10.0.1.17", 
      private_ip_addresses: [
        {
          association: {
            association_id: "eipassoc-0fbb766a", 
            ip_owner_id: "123456789012", 
            public_dns_name: "ec2-203-0-113-12.compute-1.amazonaws.com", 
            public_ip: "203.0.113.12", 
          }, 
          primary: true, 
          private_dns_name: "ip-10-0-1-17.ec2.internal", 
          private_ip_address: "10.0.1.17", 
        }, 
      ], 
      requester_managed: false, 
      source_dest_check: true, 
      status: "in-use", 
      subnet_id: "subnet-b61f49f0", 
      tag_set: [
      ], 
      vpc_id: "vpc-a01106c2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_network_interfaces({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  network_interface_ids: ["NetworkInterfaceId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.network_interfaces #=> Array
resp.network_interfaces[0].association.allocation_id #=> String
resp.network_interfaces[0].association.association_id #=> String
resp.network_interfaces[0].association.ip_owner_id #=> String
resp.network_interfaces[0].association.public_dns_name #=> String
resp.network_interfaces[0].association.public_ip #=> String
resp.network_interfaces[0].association.customer_owned_ip #=> String
resp.network_interfaces[0].association.carrier_ip #=> String
resp.network_interfaces[0].attachment.attach_time #=> Time
resp.network_interfaces[0].attachment.attachment_id #=> String
resp.network_interfaces[0].attachment.delete_on_termination #=> true/false
resp.network_interfaces[0].attachment.device_index #=> Integer
resp.network_interfaces[0].attachment.network_card_index #=> Integer
resp.network_interfaces[0].attachment.instance_id #=> String
resp.network_interfaces[0].attachment.instance_owner_id #=> String
resp.network_interfaces[0].attachment.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.network_interfaces[0].availability_zone #=> String
resp.network_interfaces[0].description #=> String
resp.network_interfaces[0].groups #=> Array
resp.network_interfaces[0].groups[0].group_name #=> String
resp.network_interfaces[0].groups[0].group_id #=> String
resp.network_interfaces[0].interface_type #=> String, one of "interface", "natGateway", "efa"
resp.network_interfaces[0].ipv_6_addresses #=> Array
resp.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.network_interfaces[0].mac_address #=> String
resp.network_interfaces[0].network_interface_id #=> String
resp.network_interfaces[0].outpost_arn #=> String
resp.network_interfaces[0].owner_id #=> String
resp.network_interfaces[0].private_dns_name #=> String
resp.network_interfaces[0].private_ip_address #=> String
resp.network_interfaces[0].private_ip_addresses #=> Array
resp.network_interfaces[0].private_ip_addresses[0].association.allocation_id #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.association_id #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.ip_owner_id #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.public_dns_name #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.public_ip #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.customer_owned_ip #=> String
resp.network_interfaces[0].private_ip_addresses[0].association.carrier_ip #=> String
resp.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.network_interfaces[0].private_ip_addresses[0].private_dns_name #=> String
resp.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.network_interfaces[0].requester_id #=> String
resp.network_interfaces[0].requester_managed #=> true/false
resp.network_interfaces[0].source_dest_check #=> true/false
resp.network_interfaces[0].status #=> String, one of "available", "associated", "attaching", "in-use", "detaching"
resp.network_interfaces[0].subnet_id #=> String
resp.network_interfaces[0].tag_set #=> Array
resp.network_interfaces[0].tag_set[0].key #=> String
resp.network_interfaces[0].tag_set[0].value #=> String
resp.network_interfaces[0].vpc_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.

    • addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface.

    • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).

    • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.

    • association.association-id - The association ID returned when the network interface was associated with an IPv4 address.

    • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.

    • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.

    • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.

    • association.public-dns-name - The public DNS name for the network interface (IPv4).

    • attachment.attachment-id - The ID of the interface attachment.

    • attachment.attach-time - The time that the network interface was attached to an instance.

    • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.

    • attachment.device-index - The device index to which the network interface is attached.

    • attachment.instance-id - The ID of the instance to which the network interface is attached.

    • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.

    • attachment.status - The status of the attachment (attaching | attached | detaching | detached).

    • availability-zone - The Availability Zone of the network interface.

    • description - The description of the network interface.

    • group-id - The ID of a security group associated with the network interface.

    • group-name - The name of a security group associated with the network interface.

    • ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface.

    • mac-address - The MAC address of the network interface.

    • network-interface-id - The ID of the network interface.

    • owner-id - The AWS account ID of the network interface owner.

    • private-ip-address - The private IPv4 address or addresses of the network interface.

    • private-dns-name - The private DNS name of the network interface (IPv4).

    • requester-id - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).

    • requester-managed - Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on).

    • source-dest-check - Indicates whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.

    • status - The status of the network interface. If the network interface is not attached to an instance, the status is available; if a network interface is attached to an instance the status is in-use.

    • subnet-id - The ID of the subnet for the network interface.

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

    • vpc-id - The ID of the VPC for the network interface.

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

  • :network_interface_ids (Array<String>)

    One or more network interface IDs.

    Default: Describes all your network interfaces.

  • :next_token (String)

    The token to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.

Returns:

See Also:

#describe_placement_groups(options = {}) ⇒ Types::DescribePlacementGroupsResult

Describes the specified placement groups or all of your placement groups. For more information, see Placement groups in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_placement_groups({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  group_names: ["PlacementGroupName"],
  group_ids: ["PlacementGroupId"],
})

Response structure


resp.placement_groups #=> Array
resp.placement_groups[0].group_name #=> String
resp.placement_groups[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.placement_groups[0].strategy #=> String, one of "cluster", "spread", "partition"
resp.placement_groups[0].partition_count #=> Integer
resp.placement_groups[0].group_id #=> String
resp.placement_groups[0].tags #=> Array
resp.placement_groups[0].tags[0].key #=> String
resp.placement_groups[0].tags[0].value #=> String

Options Hash (options):

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

    The filters.

    • group-name - The name of the placement group.

    • state - The state of the placement group (pending | available | deleting | deleted).

    • strategy - The strategy of the placement group (cluster | spread | partition).

    • 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 that have a tag with a specific key, regardless of the tag value.

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

  • :group_names (Array<String>)

    The names of the placement groups.

    Default: Describes all your placement groups, or only those otherwise specified.

  • :group_ids (Array<String>)

    The IDs of the placement groups.

Returns:

See Also:

#describe_prefix_lists(options = {}) ⇒ Types::DescribePrefixListsResult

Describes available AWS services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service.

We recommend that you use DescribeManagedPrefixLists instead.

Examples:

Request syntax with placeholder values


resp = client.describe_prefix_lists({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  prefix_list_ids: ["PrefixListResourceId"],
})

Response structure


resp.next_token #=> String
resp.prefix_lists #=> Array
resp.prefix_lists[0].cidrs #=> Array
resp.prefix_lists[0].cidrs[0] #=> String
resp.prefix_lists[0].prefix_list_id #=> String
resp.prefix_lists[0].prefix_list_name #=> String

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.

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

    One or more filters.

    • prefix-list-id: The ID of a prefix list.

    • prefix-list-name: The name of a prefix list.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

  • :prefix_list_ids (Array<String>)

    One or more prefix list IDs.

Returns:

See Also:

#describe_principal_id_format(options = {}) ⇒ Types::DescribePrincipalIdFormatResult

Describes the ID format settings for the root user and all IAM roles and IAM users that have explicitly specified a longer ID (17-character ID) preference.

By default, all IAM roles and IAM users default to the same ID settings as the root user, unless they explicitly override the settings. This request is useful for identifying those IAM users and IAM roles that have overridden the default ID settings.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

Examples:

Request syntax with placeholder values


resp = client.describe_principal_id_format({
  dry_run: false,
  resources: ["String"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.principals #=> Array
resp.principals[0].arn #=> String
resp.principals[0].statuses #=> Array
resp.principals[0].statuses[0].deadline #=> Time
resp.principals[0].statuses[0].resource #=> String
resp.principals[0].statuses[0].use_long_ids #=> true/false
resp.next_token #=> String

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.

  • :resources (Array<String>)

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:

#describe_public_ipv_4_pools(options = {}) ⇒ Types::DescribePublicIpv4PoolsResult

Describes the specified IPv4 address pools.

Examples:

Request syntax with placeholder values


resp = client.describe_public_ipv_4_pools({
  pool_ids: ["Ipv4PoolEc2Id"],
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Response structure


resp.public_ipv_4_pools #=> Array
resp.public_ipv_4_pools[0].pool_id #=> String
resp.public_ipv_4_pools[0].description #=> String
resp.public_ipv_4_pools[0].pool_address_ranges #=> Array
resp.public_ipv_4_pools[0].pool_address_ranges[0].first_address #=> String
resp.public_ipv_4_pools[0].pool_address_ranges[0].last_address #=> String
resp.public_ipv_4_pools[0].pool_address_ranges[0].address_count #=> Integer
resp.public_ipv_4_pools[0].pool_address_ranges[0].available_address_count #=> Integer
resp.public_ipv_4_pools[0].total_address_count #=> Integer
resp.public_ipv_4_pools[0].total_available_address_count #=> Integer
resp.public_ipv_4_pools[0].network_border_group #=> String
resp.public_ipv_4_pools[0].tags #=> Array
resp.public_ipv_4_pools[0].tags[0].key #=> String
resp.public_ipv_4_pools[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :pool_ids (Array<String>)

    The IDs of the address pools.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

    One or more filters.

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

Returns:

See Also:

#describe_regions(options = {}) ⇒ Types::DescribeRegionsResult

Describes the Regions that are enabled for your account, or all Regions.

For a list of the Regions supported by Amazon EC2, see Regions and Endpoints.

For information about enabling and disabling Regions for your account, see Managing AWS Regions in the AWS General Reference.

Examples:

Example: To describe your regions


# This example describes all the regions that are available to you.

resp = client.describe_regions({
})

# resp.to_h outputs the following:
{
  regions: [
    {
      endpoint: "ec2.ap-south-1.amazonaws.com", 
      region_name: "ap-south-1", 
    }, 
    {
      endpoint: "ec2.eu-west-1.amazonaws.com", 
      region_name: "eu-west-1", 
    }, 
    {
      endpoint: "ec2.ap-southeast-1.amazonaws.com", 
      region_name: "ap-southeast-1", 
    }, 
    {
      endpoint: "ec2.ap-southeast-2.amazonaws.com", 
      region_name: "ap-southeast-2", 
    }, 
    {
      endpoint: "ec2.eu-central-1.amazonaws.com", 
      region_name: "eu-central-1", 
    }, 
    {
      endpoint: "ec2.ap-northeast-2.amazonaws.com", 
      region_name: "ap-northeast-2", 
    }, 
    {
      endpoint: "ec2.ap-northeast-1.amazonaws.com", 
      region_name: "ap-northeast-1", 
    }, 
    {
      endpoint: "ec2.us-east-1.amazonaws.com", 
      region_name: "us-east-1", 
    }, 
    {
      endpoint: "ec2.sa-east-1.amazonaws.com", 
      region_name: "sa-east-1", 
    }, 
    {
      endpoint: "ec2.us-west-1.amazonaws.com", 
      region_name: "us-west-1", 
    }, 
    {
      endpoint: "ec2.us-west-2.amazonaws.com", 
      region_name: "us-west-2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_regions({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  region_names: ["String"],
  dry_run: false,
  all_regions: false,
})

Response structure


resp.regions #=> Array
resp.regions[0].endpoint #=> String
resp.regions[0].region_name #=> String
resp.regions[0].opt_in_status #=> String

Options Hash (options):

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

    The filters.

    • endpoint - The endpoint of the Region (for example, ec2.us-east-1.amazonaws.com).

    • opt-in-status - The opt-in status of the Region (opt-in-not-required | opted-in | not-opted-in).

    • region-name - The name of the Region (for example, us-east-1).

  • :region_names (Array<String>)

    The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.

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

  • :all_regions (Boolean)

    Indicates whether to display all Regions, including Regions that are disabled for your account.

Returns:

See Also:

#describe_reserved_instances(options = {}) ⇒ Types::DescribeReservedInstancesResult

Describes one or more of the Reserved Instances that you purchased.

For more information about Reserved Instances, see Reserved Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_reserved_instances({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  offering_class: "standard", # accepts standard, convertible
  reserved_instances_ids: ["ReservationId"],
  dry_run: false,
  offering_type: "Heavy Utilization", # accepts Heavy Utilization, Medium Utilization, Light Utilization, No Upfront, Partial Upfront, All Upfront
})

Response structure


resp.reserved_instances #=> Array
resp.reserved_instances[0].availability_zone #=> String
resp.reserved_instances[0].duration #=> Integer
resp.reserved_instances[0].end #=> Time
resp.reserved_instances[0].fixed_price #=> Float
resp.reserved_instances[0].instance_count #=> Integer
resp.reserved_instances[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.reserved_instances[0].product_description #=> String, one of "Linux/UNIX", "Linux/UNIX (Amazon VPC)", "Windows", "Windows (Amazon VPC)"
resp.reserved_instances[0].reserved_instances_id #=> String
resp.reserved_instances[0].start #=> Time
resp.reserved_instances[0].state #=> String, one of "payment-pending", "active", "payment-failed", "retired", "queued", "queued-deleted"
resp.reserved_instances[0].usage_price #=> Float
resp.reserved_instances[0].currency_code #=> String, one of "USD"
resp.reserved_instances[0].instance_tenancy #=> String, one of "default", "dedicated", "host"
resp.reserved_instances[0].offering_class #=> String, one of "standard", "convertible"
resp.reserved_instances[0].offering_type #=> String, one of "Heavy Utilization", "Medium Utilization", "Light Utilization", "No Upfront", "Partial Upfront", "All Upfront"
resp.reserved_instances[0].recurring_charges #=> Array
resp.reserved_instances[0].recurring_charges[0].amount #=> Float
resp.reserved_instances[0].recurring_charges[0].frequency #=> String, one of "Hourly"
resp.reserved_instances[0].scope #=> String, one of "Availability Zone", "Region"
resp.reserved_instances[0].tags #=> Array
resp.reserved_instances[0].tags[0].key #=> String
resp.reserved_instances[0].tags[0].value #=> String

Options Hash (options):

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

    One or more filters.

    • availability-zone - The Availability Zone where the Reserved Instance can be used.

    • duration - The duration of the Reserved Instance (one year or three years), in seconds (31536000 | 94608000).

    • end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).

    • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

    • instance-type - The instance type that is covered by the reservation.

    • scope - The scope of the Reserved Instance (Region or Availability Zone).

    • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC)).

    • reserved-instances-id - The ID of the Reserved Instance.

    • start - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).

    • state - The state of the Reserved Instance (payment-pending | active | payment-failed | retired).

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

    • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • :offering_class (String)

    Describes whether the Reserved Instance is Standard or Convertible.

  • :reserved_instances_ids (Array<String>)

    One or more Reserved Instance IDs.

    Default: Describes all your Reserved Instances, or only those otherwise specified.

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

  • :offering_type (String)

    The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

Returns:

See Also:

#describe_reserved_instances_listings(options = {}) ⇒ Types::DescribeReservedInstancesListingsResult

Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_reserved_instances_listings({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  reserved_instances_id: "ReservationId",
  reserved_instances_listing_id: "ReservedInstancesListingId",
})

Response structure


resp.reserved_instances_listings #=> Array
resp.reserved_instances_listings[0].client_token #=> String
resp.reserved_instances_listings[0].create_date #=> Time
resp.reserved_instances_listings[0].instance_counts #=> Array
resp.reserved_instances_listings[0].instance_counts[0].instance_count #=> Integer
resp.reserved_instances_listings[0].instance_counts[0].state #=> String, one of "available", "sold", "cancelled", "pending"
resp.reserved_instances_listings[0].price_schedules #=> Array
resp.reserved_instances_listings[0].price_schedules[0].active #=> true/false
resp.reserved_instances_listings[0].price_schedules[0].currency_code #=> String, one of "USD"
resp.reserved_instances_listings[0].price_schedules[0].price #=> Float
resp.reserved_instances_listings[0].price_schedules[0].term #=> Integer
resp.reserved_instances_listings[0].reserved_instances_id #=> String
resp.reserved_instances_listings[0].reserved_instances_listing_id #=> String
resp.reserved_instances_listings[0].status #=> String, one of "active", "pending", "cancelled", "closed"
resp.reserved_instances_listings[0].status_message #=> String
resp.reserved_instances_listings[0].tags #=> Array
resp.reserved_instances_listings[0].tags[0].key #=> String
resp.reserved_instances_listings[0].tags[0].value #=> String
resp.reserved_instances_listings[0].update_date #=> Time

Options Hash (options):

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

    One or more filters.

    • reserved-instances-id - The ID of the Reserved Instances.

    • reserved-instances-listing-id - The ID of the Reserved Instances listing.

    • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

    • status-message - The reason for the status.

  • :reserved_instances_id (String)

    One or more Reserved Instance IDs.

  • :reserved_instances_listing_id (String)

    One or more Reserved Instance listing IDs.

Returns:

See Also:

#describe_reserved_instances_modifications(options = {}) ⇒ Types::DescribeReservedInstancesModificationsResult

Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.

For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_reserved_instances_modifications({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  reserved_instances_modification_ids: ["ReservedInstancesModificationId"],
  next_token: "String",
})

Response structure


resp.next_token #=> String
resp.reserved_instances_modifications #=> Array
resp.reserved_instances_modifications[0].client_token #=> String
resp.reserved_instances_modifications[0].create_date #=> Time
resp.reserved_instances_modifications[0].effective_date #=> Time
resp.reserved_instances_modifications[0].modification_results #=> Array
resp.reserved_instances_modifications[0].modification_results[0].reserved_instances_id #=> String
resp.reserved_instances_modifications[0].modification_results[0].target_configuration.availability_zone #=> String
resp.reserved_instances_modifications[0].modification_results[0].target_configuration.instance_count #=> Integer
resp.reserved_instances_modifications[0].modification_results[0].target_configuration.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.reserved_instances_modifications[0].modification_results[0].target_configuration.platform #=> String
resp.reserved_instances_modifications[0].modification_results[0].target_configuration.scope #=> String, one of "Availability Zone", "Region"
resp.reserved_instances_modifications[0].reserved_instances_ids #=> Array
resp.reserved_instances_modifications[0].reserved_instances_ids[0].reserved_instances_id #=> String
resp.reserved_instances_modifications[0].reserved_instances_modification_id #=> String
resp.reserved_instances_modifications[0].status #=> String
resp.reserved_instances_modifications[0].status_message #=> String
resp.reserved_instances_modifications[0].update_date #=> Time

Options Hash (options):

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

    One or more filters.

    • client-token - The idempotency token for the modification request.

    • create-date - The time when the modification request was created.

    • effective-date - The time when the modification becomes effective.

    • modification-result.reserved-instances-id - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is fulfilled.

    • modification-result.target-configuration.availability-zone - The Availability Zone for the new Reserved Instances.

    • modification-result.target-configuration.instance-count - The number of new Reserved Instances.

    • modification-result.target-configuration.instance-type - The instance type of the new Reserved Instances.

    • modification-result.target-configuration.platform - The network platform of the new Reserved Instances (EC2-Classic | EC2-VPC).

    • reserved-instances-id - The ID of the Reserved Instances modified.

    • reserved-instances-modification-id - The ID of the modification request.

    • status - The status of the Reserved Instances modification request (processing | fulfilled | failed).

    • status-message - The reason for the status.

    • update-date - The time when the modification request was last updated.

  • :reserved_instances_modification_ids (Array<String>)

    IDs for the submitted modification request.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_reserved_instances_offerings(options = {}) ⇒ Types::DescribeReservedInstancesOfferingsResult

Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.

If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_reserved_instances_offerings({
  availability_zone: "String",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  include_marketplace: false,
  instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
  max_duration: 1,
  max_instance_count: 1,
  min_duration: 1,
  offering_class: "standard", # accepts standard, convertible
  product_description: "Linux/UNIX", # accepts Linux/UNIX, Linux/UNIX (Amazon VPC), Windows, Windows (Amazon VPC)
  reserved_instances_offering_ids: ["ReservedInstancesOfferingId"],
  dry_run: false,
  instance_tenancy: "default", # accepts default, dedicated, host
  max_results: 1,
  next_token: "String",
  offering_type: "Heavy Utilization", # accepts Heavy Utilization, Medium Utilization, Light Utilization, No Upfront, Partial Upfront, All Upfront
})

Response structure


resp.reserved_instances_offerings #=> Array
resp.reserved_instances_offerings[0].availability_zone #=> String
resp.reserved_instances_offerings[0].duration #=> Integer
resp.reserved_instances_offerings[0].fixed_price #=> Float
resp.reserved_instances_offerings[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.reserved_instances_offerings[0].product_description #=> String, one of "Linux/UNIX", "Linux/UNIX (Amazon VPC)", "Windows", "Windows (Amazon VPC)"
resp.reserved_instances_offerings[0].reserved_instances_offering_id #=> String
resp.reserved_instances_offerings[0].usage_price #=> Float
resp.reserved_instances_offerings[0].currency_code #=> String, one of "USD"
resp.reserved_instances_offerings[0].instance_tenancy #=> String, one of "default", "dedicated", "host"
resp.reserved_instances_offerings[0].marketplace #=> true/false
resp.reserved_instances_offerings[0].offering_class #=> String, one of "standard", "convertible"
resp.reserved_instances_offerings[0].offering_type #=> String, one of "Heavy Utilization", "Medium Utilization", "Light Utilization", "No Upfront", "Partial Upfront", "All Upfront"
resp.reserved_instances_offerings[0].pricing_details #=> Array
resp.reserved_instances_offerings[0].pricing_details[0].count #=> Integer
resp.reserved_instances_offerings[0].pricing_details[0].price #=> Float
resp.reserved_instances_offerings[0].recurring_charges #=> Array
resp.reserved_instances_offerings[0].recurring_charges[0].amount #=> Float
resp.reserved_instances_offerings[0].recurring_charges[0].frequency #=> String, one of "Hourly"
resp.reserved_instances_offerings[0].scope #=> String, one of "Availability Zone", "Region"
resp.next_token #=> String

Options Hash (options):

  • :availability_zone (String)

    The Availability Zone in which the Reserved Instance can be used.

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

    One or more filters.

    • availability-zone - The Availability Zone where the Reserved Instance can be used.

    • duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000).

    • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

    • instance-type - The instance type that is covered by the reservation.

    • marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed.

    • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC))

    • reserved-instances-offering-id - The Reserved Instances offering ID.

    • scope - The scope of the Reserved Instance (Availability Zone or Region).

    • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • :include_marketplace (Boolean)

    Include Reserved Instance Marketplace offerings in the response.

  • :instance_type (String)

    The instance type that the reservation will cover (for example, m1.small). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.

  • :max_duration (Integer)

    The maximum duration (in seconds) to filter when searching for offerings.

    Default: 94608000 (3 years)

  • :max_instance_count (Integer)

    The maximum number of instances to filter when searching for offerings.

    Default: 20

  • :min_duration (Integer)

    The minimum duration (in seconds) to filter when searching for offerings.

    Default: 2592000 (1 month)

  • :offering_class (String)

    The offering class of the Reserved Instance. Can be standard or convertible.

  • :product_description (String)

    The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.

  • :reserved_instances_offering_ids (Array<String>)

    One or more Reserved Instances offering IDs.

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

  • :instance_tenancy (String)

    The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.

    Default: 100

  • :next_token (String)

    The token to retrieve the next page of results.

  • :offering_type (String)

    The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

Returns:

See Also:

#describe_route_tables(options = {}) ⇒ Types::DescribeRouteTablesResult

Describes one or more of your route tables.

Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.

For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To describe a route table


# This example describes the specified route table.

resp = client.describe_route_tables({
  route_table_ids: [
    "rtb-1f382e7d", 
  ], 
})

# resp.to_h outputs the following:
{
  route_tables: [
    {
      associations: [
        {
          main: true, 
          route_table_association_id: "rtbassoc-d8ccddba", 
          route_table_id: "rtb-1f382e7d", 
        }, 
      ], 
      propagating_vgws: [
      ], 
      route_table_id: "rtb-1f382e7d", 
      routes: [
        {
          destination_cidr_block: "10.0.0.0/16", 
          gateway_id: "local", 
          state: "active", 
        }, 
      ], 
      tags: [
      ], 
      vpc_id: "vpc-a01106c2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_route_tables({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  route_table_ids: ["RouteTableId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.route_tables #=> Array
resp.route_tables[0].associations #=> Array
resp.route_tables[0].associations[0].main #=> true/false
resp.route_tables[0].associations[0].route_table_association_id #=> String
resp.route_tables[0].associations[0].route_table_id #=> String
resp.route_tables[0].associations[0].subnet_id #=> String
resp.route_tables[0].associations[0].gateway_id #=> String
resp.route_tables[0].associations[0].association_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failed"
resp.route_tables[0].associations[0].association_state.status_message #=> String
resp.route_tables[0].propagating_vgws #=> Array
resp.route_tables[0].propagating_vgws[0].gateway_id #=> String
resp.route_tables[0].route_table_id #=> String
resp.route_tables[0].routes #=> Array
resp.route_tables[0].routes[0].destination_cidr_block #=> String
resp.route_tables[0].routes[0].destination_ipv_6_cidr_block #=> String
resp.route_tables[0].routes[0].destination_prefix_list_id #=> String
resp.route_tables[0].routes[0].egress_only_internet_gateway_id #=> String
resp.route_tables[0].routes[0].gateway_id #=> String
resp.route_tables[0].routes[0].instance_id #=> String
resp.route_tables[0].routes[0].instance_owner_id #=> String
resp.route_tables[0].routes[0].nat_gateway_id #=> String
resp.route_tables[0].routes[0].transit_gateway_id #=> String
resp.route_tables[0].routes[0].local_gateway_id #=> String
resp.route_tables[0].routes[0].carrier_gateway_id #=> String
resp.route_tables[0].routes[0].network_interface_id #=> String
resp.route_tables[0].routes[0].origin #=> String, one of "CreateRouteTable", "CreateRoute", "EnableVgwRoutePropagation"
resp.route_tables[0].routes[0].state #=> String, one of "active", "blackhole"
resp.route_tables[0].routes[0].vpc_peering_connection_id #=> String
resp.route_tables[0].tags #=> Array
resp.route_tables[0].tags[0].key #=> String
resp.route_tables[0].tags[0].value #=> String
resp.route_tables[0].vpc_id #=> String
resp.route_tables[0].owner_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • association.route-table-association-id - The ID of an association ID for the route table.

    • association.route-table-id - The ID of the route table involved in the association.

    • association.subnet-id - The ID of the subnet involved in the association.

    • association.main - Indicates whether the route table is the main route table for the VPC (true | false). Route tables that do not have an association ID are not returned in the response.

    • owner-id - The ID of the AWS account that owns the route table.

    • route-table-id - The ID of the route table.

    • route.destination-cidr-block - The IPv4 CIDR range specified in a route in the table.

    • route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route in the route table.

    • route.destination-prefix-list-id - The ID (prefix) of the AWS service specified in a route in the table.

    • route.egress-only-internet-gateway-id - The ID of an egress-only Internet gateway specified in a route in the route table.

    • route.gateway-id - The ID of a gateway specified in a route in the table.

    • route.instance-id - The ID of an instance specified in a route in the table.

    • route.nat-gateway-id - The ID of a NAT gateway.

    • route.transit-gateway-id - The ID of a transit gateway.

    • route.origin - Describes how the route was created. CreateRouteTable indicates that the route was automatically created when the route table was created; CreateRoute indicates that the route was manually added to the route table; EnableVgwRoutePropagation indicates that the route was propagated by route propagation.

    • route.state - The state of a route in the route table (active | blackhole). The blackhole state indicates that the route\'s target isn\'t available (for example, the specified gateway isn\'t attached to the VPC, the specified NAT instance has been terminated, and so on).

    • route.vpc-peering-connection-id - The ID of a VPC peering connection specified in a route in the table.

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

    • vpc-id - The ID of the VPC for the route table.

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

  • :route_table_ids (Array<String>)

    One or more route table IDs.

    Default: Describes all your route tables.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_scheduled_instance_availability(options = {}) ⇒ Types::DescribeScheduledInstanceAvailabilityResult

Finds available schedules that meet the specified criteria.

You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

Examples:

Example: To describe an available schedule


# This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example.

resp = client.describe_scheduled_instance_availability({
  first_slot_start_time_range: {
    earliest_time: Time.parse("2016-01-31T00:00:00Z"), 
    latest_time: Time.parse("2016-01-31T04:00:00Z"), 
  }, 
  recurrence: {
    frequency: "Weekly", 
    interval: 1, 
    occurrence_days: [
      1, 
    ], 
  }, 
})

# resp.to_h outputs the following:
{
  scheduled_instance_availability_set: [
    {
      availability_zone: "us-west-2b", 
      available_instance_count: 20, 
      first_slot_start_time: Time.parse("2016-01-31T00:00:00Z"), 
      hourly_price: "0.095", 
      instance_type: "c4.large", 
      max_term_duration_in_days: 366, 
      min_term_duration_in_days: 366, 
      network_platform: "EC2-VPC", 
      platform: "Linux/UNIX", 
      purchase_token: "eyJ2IjoiMSIsInMiOjEsImMiOi...", 
      recurrence: {
        frequency: "Weekly", 
        interval: 1, 
        occurrence_day_set: [
          1, 
        ], 
        occurrence_relative_to_end: false, 
      }, 
      slot_duration_in_hours: 23, 
      total_scheduled_instance_hours: 1219, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_scheduled_instance_availability({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  first_slot_start_time_range: { # required
    earliest_time: Time.now, # required
    latest_time: Time.now, # required
  },
  max_results: 1,
  max_slot_duration_in_hours: 1,
  min_slot_duration_in_hours: 1,
  next_token: "String",
  recurrence: { # required
    frequency: "String",
    interval: 1,
    occurrence_days: [1],
    occurrence_relative_to_end: false,
    occurrence_unit: "String",
  },
})

Response structure


resp.next_token #=> String
resp.scheduled_instance_availability_set #=> Array
resp.scheduled_instance_availability_set[0].availability_zone #=> String
resp.scheduled_instance_availability_set[0].available_instance_count #=> Integer
resp.scheduled_instance_availability_set[0].first_slot_start_time #=> Time
resp.scheduled_instance_availability_set[0].hourly_price #=> String
resp.scheduled_instance_availability_set[0].instance_type #=> String
resp.scheduled_instance_availability_set[0].max_term_duration_in_days #=> Integer
resp.scheduled_instance_availability_set[0].min_term_duration_in_days #=> Integer
resp.scheduled_instance_availability_set[0].network_platform #=> String
resp.scheduled_instance_availability_set[0].platform #=> String
resp.scheduled_instance_availability_set[0].purchase_token #=> String
resp.scheduled_instance_availability_set[0].recurrence.frequency #=> String
resp.scheduled_instance_availability_set[0].recurrence.interval #=> Integer
resp.scheduled_instance_availability_set[0].recurrence.occurrence_day_set #=> Array
resp.scheduled_instance_availability_set[0].recurrence.occurrence_day_set[0] #=> Integer
resp.scheduled_instance_availability_set[0].recurrence.occurrence_relative_to_end #=> true/false
resp.scheduled_instance_availability_set[0].recurrence.occurrence_unit #=> String
resp.scheduled_instance_availability_set[0].slot_duration_in_hours #=> Integer
resp.scheduled_instance_availability_set[0].total_scheduled_instance_hours #=> Integer

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.

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

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a).

    • instance-type - The instance type (for example, c4.large).

    • network-platform - The network platform (EC2-Classic or EC2-VPC).

    • platform - The platform (Linux/UNIX or Windows).

  • :first_slot_start_time_range (required, Types::SlotDateTimeRangeRequest)

    The time period for the first schedule to start.

  • :max_results (Integer)

    The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned NextToken value.

  • :max_slot_duration_in_hours (Integer)

    The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.

  • :min_slot_duration_in_hours (Integer)

    The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

  • :next_token (String)

    The token for the next set of results.

  • :recurrence (required, Types::ScheduledInstanceRecurrenceRequest)

    The schedule recurrence.

Returns:

See Also:

#describe_scheduled_instances(options = {}) ⇒ Types::DescribeScheduledInstancesResult

Describes the specified Scheduled Instances or all your Scheduled Instances.

Examples:

Example: To describe your Scheduled Instances


# This example describes the specified Scheduled Instance.

resp = client.describe_scheduled_instances({
  scheduled_instance_ids: [
    "sci-1234-1234-1234-1234-123456789012", 
  ], 
})

# resp.to_h outputs the following:
{
  scheduled_instance_set: [
    {
      availability_zone: "us-west-2b", 
      create_date: Time.parse("2016-01-25T21:43:38.612Z"), 
      hourly_price: "0.095", 
      instance_count: 1, 
      instance_type: "c4.large", 
      network_platform: "EC2-VPC", 
      next_slot_start_time: Time.parse("2016-01-31T09:00:00Z"), 
      platform: "Linux/UNIX", 
      recurrence: {
        frequency: "Weekly", 
        interval: 1, 
        occurrence_day_set: [
          1, 
        ], 
        occurrence_relative_to_end: false, 
        occurrence_unit: "", 
      }, 
      scheduled_instance_id: "sci-1234-1234-1234-1234-123456789012", 
      slot_duration_in_hours: 32, 
      term_end_date: Time.parse("2017-01-31T09:00:00Z"), 
      term_start_date: Time.parse("2016-01-31T09:00:00Z"), 
      total_scheduled_instance_hours: 1696, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_scheduled_instances({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  scheduled_instance_ids: ["ScheduledInstanceId"],
  slot_start_time_range: {
    earliest_time: Time.now,
    latest_time: Time.now,
  },
})

Response structure


resp.next_token #=> String
resp.scheduled_instance_set #=> Array
resp.scheduled_instance_set[0].availability_zone #=> String
resp.scheduled_instance_set[0].create_date #=> Time
resp.scheduled_instance_set[0].hourly_price #=> String
resp.scheduled_instance_set[0].instance_count #=> Integer
resp.scheduled_instance_set[0].instance_type #=> String
resp.scheduled_instance_set[0].network_platform #=> String
resp.scheduled_instance_set[0].next_slot_start_time #=> Time
resp.scheduled_instance_set[0].platform #=> String
resp.scheduled_instance_set[0].previous_slot_end_time #=> Time
resp.scheduled_instance_set[0].recurrence.frequency #=> String
resp.scheduled_instance_set[0].recurrence.interval #=> Integer
resp.scheduled_instance_set[0].recurrence.occurrence_day_set #=> Array
resp.scheduled_instance_set[0].recurrence.occurrence_day_set[0] #=> Integer
resp.scheduled_instance_set[0].recurrence.occurrence_relative_to_end #=> true/false
resp.scheduled_instance_set[0].recurrence.occurrence_unit #=> String
resp.scheduled_instance_set[0].scheduled_instance_id #=> String
resp.scheduled_instance_set[0].slot_duration_in_hours #=> Integer
resp.scheduled_instance_set[0].term_end_date #=> Time
resp.scheduled_instance_set[0].term_start_date #=> Time
resp.scheduled_instance_set[0].total_scheduled_instance_hours #=> Integer

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.

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

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a).

    • instance-type - The instance type (for example, c4.large).

    • network-platform - The network platform (EC2-Classic or EC2-VPC).

    • platform - The platform (Linux/UNIX or Windows).

  • :max_results (Integer)

    The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :scheduled_instance_ids (Array<String>)

    The Scheduled Instance IDs.

  • :slot_start_time_range (Types::SlotStartTimeRangeRequest)

    The time period for the first schedule to start.

Returns:

See Also:

#describe_security_group_references(options = {}) ⇒ Types::DescribeSecurityGroupReferencesResult

[VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.

Examples:

Example: To describe security group references


# This example describes the security group references for the specified security group.

resp = client.describe_security_group_references({
  group_id: [
    "sg-903004f8", 
  ], 
})

# resp.to_h outputs the following:
{
  security_group_reference_set: [
    {
      group_id: "sg-903004f8", 
      referencing_vpc_id: "vpc-1a2b3c4d", 
      vpc_peering_connection_id: "pcx-b04deed9", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_security_group_references({
  dry_run: false,
  group_id: ["SecurityGroupId"], # required
})

Response structure


resp.security_group_reference_set #=> Array
resp.security_group_reference_set[0].group_id #=> String
resp.security_group_reference_set[0].referencing_vpc_id #=> String
resp.security_group_reference_set[0].vpc_peering_connection_id #=> String

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.

  • :group_id (required, Array<String>)

    The IDs of the security groups in your account.

Returns:

See Also:

#describe_security_groups(options = {}) ⇒ Types::DescribeSecurityGroupsResult

Describes the specified security groups or all of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To describe a security group


# This example describes the specified security group.

resp = client.describe_security_groups({
  group_ids: [
    "sg-903004f8", 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To describe a tagged security group


# This example describes the security groups that include the specified tag (Purpose=test).

resp = client.describe_security_groups({
  filters: [
    {
      name: "tag:Purpose", 
      values: [
        "test", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.describe_security_groups({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  group_ids: ["String"],
  group_names: ["SecurityGroupName"],
  dry_run: false,
  next_token: "String",
  max_results: 1,
})

Response structure


resp.security_groups #=> Array
resp.security_groups[0].description #=> String
resp.security_groups[0].group_name #=> String
resp.security_groups[0].ip_permissions #=> Array
resp.security_groups[0].ip_permissions[0].from_port #=> Integer
resp.security_groups[0].ip_permissions[0].ip_protocol #=> String
resp.security_groups[0].ip_permissions[0].ip_ranges #=> Array
resp.security_groups[0].ip_permissions[0].ip_ranges[0].cidr_ip #=> String
resp.security_groups[0].ip_permissions[0].ip_ranges[0].description #=> String
resp.security_groups[0].ip_permissions[0].ipv_6_ranges #=> Array
resp.security_groups[0].ip_permissions[0].ipv_6_ranges[0].cidr_ipv_6 #=> String
resp.security_groups[0].ip_permissions[0].ipv_6_ranges[0].description #=> String
resp.security_groups[0].ip_permissions[0].prefix_list_ids #=> Array
resp.security_groups[0].ip_permissions[0].prefix_list_ids[0].description #=> String
resp.security_groups[0].ip_permissions[0].prefix_list_ids[0].prefix_list_id #=> String
resp.security_groups[0].ip_permissions[0].to_port #=> Integer
resp.security_groups[0].ip_permissions[0].user_id_group_pairs #=> Array
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].description #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].group_id #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].group_name #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].peering_status #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].user_id #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].vpc_id #=> String
resp.security_groups[0].ip_permissions[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String
resp.security_groups[0].owner_id #=> String
resp.security_groups[0].group_id #=> String
resp.security_groups[0].ip_permissions_egress #=> Array
resp.security_groups[0].ip_permissions_egress[0].from_port #=> Integer
resp.security_groups[0].ip_permissions_egress[0].ip_protocol #=> String
resp.security_groups[0].ip_permissions_egress[0].ip_ranges #=> Array
resp.security_groups[0].ip_permissions_egress[0].ip_ranges[0].cidr_ip #=> String
resp.security_groups[0].ip_permissions_egress[0].ip_ranges[0].description #=> String
resp.security_groups[0].ip_permissions_egress[0].ipv_6_ranges #=> Array
resp.security_groups[0].ip_permissions_egress[0].ipv_6_ranges[0].cidr_ipv_6 #=> String
resp.security_groups[0].ip_permissions_egress[0].ipv_6_ranges[0].description #=> String
resp.security_groups[0].ip_permissions_egress[0].prefix_list_ids #=> Array
resp.security_groups[0].ip_permissions_egress[0].prefix_list_ids[0].description #=> String
resp.security_groups[0].ip_permissions_egress[0].prefix_list_ids[0].prefix_list_id #=> String
resp.security_groups[0].ip_permissions_egress[0].to_port #=> Integer
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs #=> Array
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].description #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].group_id #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].group_name #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].peering_status #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].user_id #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].vpc_id #=> String
resp.security_groups[0].ip_permissions_egress[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String
resp.security_groups[0].tags #=> Array
resp.security_groups[0].tags[0].key #=> String
resp.security_groups[0].tags[0].value #=> String
resp.security_groups[0].vpc_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    The filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

    • description - The description of the security group.

    • egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security group rule.

    • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.

    • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.

    • egress.ip-permission.group-name - The name of a security group that has been referenced in an outbound security group rule.

    • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.

    • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.

    • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp or a protocol number).

    • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

    • egress.ip-permission.user-id - The ID of an AWS account that has been referenced in an outbound security group rule.

    • group-id - The ID of the security group.

    • group-name - The name of the security group.

    • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.

    • ip-permission.from-port - For an inbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.

    • ip-permission.group-id - The ID of a security group that has been referenced in an inbound security group rule.

    • ip-permission.group-name - The name of a security group that has been referenced in an inbound security group rule.

    • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.

    • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.

    • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp or a protocol number).

    • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.

    • ip-permission.user-id - The ID of an AWS account that has been referenced in an inbound security group rule.

    • owner-id - The AWS account ID of the owner of the security group.

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

    • vpc-id - The ID of the VPC specified when the security group was created.

  • :group_ids (Array<String>)

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all your security groups.

  • :group_names (Array<String>)

    [EC2-Classic and default VPC only] The names of the security groups. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the group-name filter to describe security groups by name.

    Default: Describes all your security groups.

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

  • :next_token (String)

    The token to request the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.

Returns:

See Also:

#describe_snapshot_attribute(options = {}) ⇒ Types::DescribeSnapshotAttributeResult

Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe snapshot attributes


# This example describes the ``createVolumePermission`` attribute on a snapshot with the snapshot ID of ``snap-066877671789bd71b``.

resp = client.describe_snapshot_attribute({
  attribute: "createVolumePermission", 
  snapshot_id: "snap-066877671789bd71b", 
})

# resp.to_h outputs the following:
{
  create_volume_permissions: [
  ], 
  snapshot_id: "snap-066877671789bd71b", 
}

Request syntax with placeholder values


resp = client.describe_snapshot_attribute({
  attribute: "productCodes", # required, accepts productCodes, createVolumePermission
  snapshot_id: "SnapshotId", # required
  dry_run: false,
})

Response structure


resp.create_volume_permissions #=> Array
resp.create_volume_permissions[0].group #=> String, one of "all"
resp.create_volume_permissions[0].user_id #=> String
resp.product_codes #=> Array
resp.product_codes[0].product_code_id #=> String
resp.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.snapshot_id #=> String

Options Hash (options):

  • :attribute (required, String)

    The snapshot attribute you would like to view.

  • :snapshot_id (required, String)

    The ID of the EBS snapshot.

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

See Also:

#describe_snapshots(options = {}) ⇒ Types::DescribeSnapshotsResult

Describes the specified EBS snapshots available to you or all of the EBS snapshots available to you.

The snapshots available to you include public snapshots, private snapshots that you own, and private snapshots owned by other AWS accounts for which you have explicit create volume permissions.

The create volume permissions fall into the following categories:

  • public: The owner of the snapshot granted create volume permissions for the snapshot to the all group. All AWS accounts have create volume permissions for these snapshots.

  • explicit: The owner of the snapshot granted create volume permissions to a specific AWS account.

  • implicit: An AWS account has implicit create volume permissions for all snapshots it owns.

The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot owners, or AWS accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.

If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.

If you specify one or more snapshot owners using the OwnerIds option, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own.

If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify AWS account IDs (if you own the snapshots), self for snapshots for which you own or have explicit permissions, or all for public snapshots.

If you are describing a long list of snapshots, we recommend that you paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSnapshots request to retrieve the remaining results.

To get the state of fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores.

For more information about EBS snapshots, see Amazon EBS Snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe a snapshot


# This example describes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``.

resp = client.describe_snapshots({
  snapshot_ids: [
    "snap-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  next_token: "", 
  snapshots: [
    {
      description: "This is my snapshot.", 
      owner_id: "012345678910", 
      progress: "100%", 
      snapshot_id: "snap-1234567890abcdef0", 
      start_time: Time.parse("2014-02-28T21:28:32.000Z"), 
      state: "completed", 
      volume_id: "vol-049df61146c4d7901", 
      volume_size: 8, 
    }, 
  ], 
}

Example: To describe snapshots using filters


# This example describes all snapshots owned by the ID 012345678910 that are in the ``pending`` status.

resp = client.describe_snapshots({
  filters: [
    {
      name: "status", 
      values: [
        "pending", 
      ], 
    }, 
  ], 
  owner_ids: [
    "012345678910", 
  ], 
})

# resp.to_h outputs the following:
{
  next_token: "", 
  snapshots: [
    {
      description: "This is my copied snapshot.", 
      owner_id: "012345678910", 
      progress: "87%", 
      snapshot_id: "snap-066877671789bd71b", 
      start_time: Time.parse("2014-02-28T21:37:27.000Z"), 
      state: "pending", 
      volume_id: "vol-1234567890abcdef0", 
      volume_size: 8, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_snapshots({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  owner_ids: ["String"],
  restorable_by_user_ids: ["String"],
  snapshot_ids: ["SnapshotId"],
  dry_run: false,
})

Response structure


resp.snapshots #=> Array
resp.snapshots[0].data_encryption_key_id #=> String
resp.snapshots[0].description #=> String
resp.snapshots[0].encrypted #=> true/false
resp.snapshots[0].kms_key_id #=> String
resp.snapshots[0].owner_id #=> String
resp.snapshots[0].progress #=> String
resp.snapshots[0].snapshot_id #=> String
resp.snapshots[0].start_time #=> Time
resp.snapshots[0].state #=> String, one of "pending", "completed", "error"
resp.snapshots[0].state_message #=> String
resp.snapshots[0].volume_id #=> String
resp.snapshots[0].volume_size #=> Integer
resp.snapshots[0].owner_alias #=> String
resp.snapshots[0].tags #=> Array
resp.snapshots[0].tags[0].key #=> String
resp.snapshots[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

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

    The filters.

    • description - A description of the snapshot.

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

    • owner-alias - The owner alias, from an Amazon-maintained list (amazon). This is not the user-configured AWS account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.

    • owner-id - The AWS account ID of the owner. We recommend that you use the related parameter instead of this filter.

    • progress - The progress of the snapshot, as a percentage (for example, 80%).

    • snapshot-id - The snapshot ID.

    • start-time - The time stamp when the snapshot was initiated.

    • status - The status of the snapshot (pending | completed | 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 ID of the volume the snapshot is for.

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

  • :max_results (Integer)

    The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.

  • :next_token (String)

    The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

  • :owner_ids (Array<String>)

    Scopes the results to snapshots with the specified owners. You can specify a combination of AWS account IDs, self, and amazon.

  • :restorable_by_user_ids (Array<String>)

    The IDs of the AWS accounts that can create volumes from the snapshot.

  • :snapshot_ids (Array<String>)

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

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

See Also:

#describe_spot_datafeed_subscription(options = {}) ⇒ Types::DescribeSpotDatafeedSubscriptionResult

Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances.

Examples:

Example: To describe the datafeed for your AWS account


# This example describes the Spot Instance datafeed subscription for your AWS account.

resp = client.describe_spot_datafeed_subscription({
})

# resp.to_h outputs the following:
{
  spot_datafeed_subscription: {
    bucket: "my-s3-bucket", 
    owner_id: "123456789012", 
    prefix: "spotdata", 
    state: "Active", 
  }, 
}

Request syntax with placeholder values


resp = client.describe_spot_datafeed_subscription({
  dry_run: false,
})

Response structure


resp.spot_datafeed_subscription.bucket #=> String
resp.spot_datafeed_subscription.fault.code #=> String
resp.spot_datafeed_subscription.fault.message #=> String
resp.spot_datafeed_subscription.owner_id #=> String
resp.spot_datafeed_subscription.prefix #=> String
resp.spot_datafeed_subscription.state #=> String, one of "Active", "Inactive"

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.

Returns:

See Also:

#describe_spot_fleet_instances(options = {}) ⇒ Types::DescribeSpotFleetInstancesResponse

Describes the running instances for the specified Spot Fleet.

Examples:

Example: To describe the Spot Instances associated with a Spot fleet


# This example lists the Spot Instances associated with the specified Spot fleet.

resp = client.describe_spot_fleet_instances({
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
})

# resp.to_h outputs the following:
{
  active_instances: [
    {
      instance_id: "i-1234567890abcdef0", 
      instance_type: "m3.medium", 
      spot_instance_request_id: "sir-08b93456", 
    }, 
  ], 
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
}

Request syntax with placeholder values


resp = client.describe_spot_fleet_instances({
  dry_run: false,
  max_results: 1,
  next_token: "String",
  spot_fleet_request_id: "SpotFleetRequestId", # required
})

Response structure


resp.active_instances #=> Array
resp.active_instances[0].instance_id #=> String
resp.active_instances[0].instance_type #=> String
resp.active_instances[0].spot_instance_request_id #=> String
resp.active_instances[0].instance_health #=> String, one of "healthy", "unhealthy"
resp.next_token #=> String
resp.spot_fleet_request_id #=> String

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.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :spot_fleet_request_id (required, String)

    The ID of the Spot Fleet request.

Returns:

See Also:

#describe_spot_fleet_request_history(options = {}) ⇒ Types::DescribeSpotFleetRequestHistoryResponse

Describes the events for the specified Spot Fleet request during the specified time.

Spot Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. Spot Fleet events are available for 48 hours.

Examples:

Example: To describe Spot fleet history


# This example returns the history for the specified Spot fleet starting at the specified time.

resp = client.describe_spot_fleet_request_history({
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  start_time: Time.parse("2015-05-26T00:00:00Z"), 
})

# resp.to_h outputs the following:
{
  history_records: [
    {
      event_information: {
        event_sub_type: "submitted", 
      }, 
      event_type: "fleetRequestChange", 
      timestamp: Time.parse("2015-05-26T23:17:20.697Z"), 
    }, 
    {
      event_information: {
        event_sub_type: "active", 
      }, 
      event_type: "fleetRequestChange", 
      timestamp: Time.parse("2015-05-26T23:17:20.873Z"), 
    }, 
    {
      event_information: {
        event_sub_type: "launched", 
        instance_id: "i-1234567890abcdef0", 
      }, 
      event_type: "instanceChange", 
      timestamp: Time.parse("2015-05-26T23:21:21.712Z"), 
    }, 
    {
      event_information: {
        event_sub_type: "launched", 
        instance_id: "i-1234567890abcdef1", 
      }, 
      event_type: "instanceChange", 
      timestamp: Time.parse("2015-05-26T23:21:21.816Z"), 
    }, 
  ], 
  next_token: "CpHNsscimcV5oH7bSbub03CI2Qms5+ypNpNm+53MNlR0YcXAkp0xFlfKf91yVxSExmbtma3awYxMFzNA663ZskT0AHtJ6TCb2Z8bQC2EnZgyELbymtWPfpZ1ZbauVg+P+TfGlWxWWB/Vr5dk5d4LfdgA/DRAHUrYgxzrEXAMPLE=", 
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  start_time: Time.parse("2015-05-26T00:00:00Z"), 
}

Request syntax with placeholder values


resp = client.describe_spot_fleet_request_history({
  dry_run: false,
  event_type: "instanceChange", # accepts instanceChange, fleetRequestChange, error, information
  max_results: 1,
  next_token: "String",
  spot_fleet_request_id: "SpotFleetRequestId", # required
  start_time: Time.now, # required
})

Response structure


resp.history_records #=> Array
resp.history_records[0].event_information.event_description #=> String
resp.history_records[0].event_information.event_sub_type #=> String
resp.history_records[0].event_information.instance_id #=> String
resp.history_records[0].event_type #=> String, one of "instanceChange", "fleetRequestChange", "error", "information"
resp.history_records[0].timestamp #=> Time
resp.last_evaluated_time #=> Time
resp.next_token #=> String
resp.spot_fleet_request_id #=> String
resp.start_time #=> Time

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.

  • :event_type (String)

    The type of events to describe. By default, all events are described.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :spot_fleet_request_id (required, String)

    The ID of the Spot Fleet request.

  • :start_time (required, Time)

    The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

See Also:

#describe_spot_fleet_requests(options = {}) ⇒ Types::DescribeSpotFleetRequestsResponse

Describes your Spot Fleet requests.

Spot Fleet requests are deleted 48 hours after they are canceled and their instances are terminated.

Examples:

Example: To describe a Spot fleet request


# This example describes the specified Spot fleet request.

resp = client.describe_spot_fleet_requests({
  spot_fleet_request_ids: [
    "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  ], 
})

# resp.to_h outputs the following:
{
  spot_fleet_request_configs: [
    {
      spot_fleet_request_config: {
        iam_fleet_role: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
        launch_specifications: [
          {
            ebs_optimized: false, 
            image_id: "ami-1a2b3c4d", 
            instance_type: "cc2.8xlarge", 
            network_interfaces: [
              {
                associate_public_ip_address: true, 
                delete_on_termination: false, 
                device_index: 0, 
                secondary_private_ip_address_count: 0, 
                subnet_id: "subnet-a61dafcf", 
              }, 
            ], 
          }, 
          {
            ebs_optimized: false, 
            image_id: "ami-1a2b3c4d", 
            instance_type: "r3.8xlarge", 
            network_interfaces: [
              {
                associate_public_ip_address: true, 
                delete_on_termination: false, 
                device_index: 0, 
                secondary_private_ip_address_count: 0, 
                subnet_id: "subnet-a61dafcf", 
              }, 
            ], 
          }, 
        ], 
        spot_price: "0.05", 
        target_capacity: 20, 
      }, 
      spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
      spot_fleet_request_state: "active", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_spot_fleet_requests({
  dry_run: false,
  max_results: 1,
  next_token: "String",
  spot_fleet_request_ids: ["SpotFleetRequestId"],
})

Response structure


resp.next_token #=> String
resp.spot_fleet_request_configs #=> Array
resp.spot_fleet_request_configs[0].activity_status #=> String, one of "error", "pending_fulfillment", "pending_termination", "fulfilled"
resp.spot_fleet_request_configs[0].create_time #=> Time
resp.spot_fleet_request_configs[0].spot_fleet_request_config.allocation_strategy #=> String, one of "lowestPrice", "diversified", "capacityOptimized"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.on_demand_allocation_strategy #=> String, one of "lowestPrice", "prioritized"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.spot_maintenance_strategies.capacity_rebalance.replacement_strategy #=> String, one of "launch"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.client_token #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.excess_capacity_termination_policy #=> String, one of "noTermination", "default"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.fulfilled_capacity #=> Float
resp.spot_fleet_request_configs[0].spot_fleet_request_config.on_demand_fulfilled_capacity #=> Float
resp.spot_fleet_request_configs[0].spot_fleet_request_config.iam_fleet_role #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].security_groups #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].security_groups[0].group_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].security_groups[0].group_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].addressing_type #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].device_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].virtual_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.iops #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.snapshot_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.volume_size #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.kms_key_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].ebs.encrypted #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].block_device_mappings[0].no_device #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].ebs_optimized #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].iam_instance_profile.arn #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].iam_instance_profile.name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].image_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].kernel_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].key_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].monitoring.enabled #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].associate_public_ip_address #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].delete_on_termination #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].description #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].device_index #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].groups #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].groups[0] #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].ipv_6_address_count #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].ipv_6_addresses #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].network_interface_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].private_ip_address #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].private_ip_addresses #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].subnet_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].interface_type #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].network_interfaces[0].network_card_index #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].placement.availability_zone #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].placement.group_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].ramdisk_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].spot_price #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].subnet_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].user_data #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].weighted_capacity #=> Float
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].tag_specifications #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].tag_specifications[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].tag_specifications[0].tags #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].tag_specifications[0].tags[0].key #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_specifications[0].tag_specifications[0].tags[0].value #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].launch_template_specification.launch_template_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].launch_template_specification.launch_template_name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].launch_template_specification.version #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].spot_price #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].subnet_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].availability_zone #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].weighted_capacity #=> Float
resp.spot_fleet_request_configs[0].spot_fleet_request_config.launch_template_configs[0].overrides[0].priority #=> Float
resp.spot_fleet_request_configs[0].spot_fleet_request_config.spot_price #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.target_capacity #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.on_demand_target_capacity #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.on_demand_max_total_price #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.spot_max_total_price #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.terminate_instances_with_expiration #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.type #=> String, one of "request", "maintain", "instant"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.valid_from #=> Time
resp.spot_fleet_request_configs[0].spot_fleet_request_config.valid_until #=> Time
resp.spot_fleet_request_configs[0].spot_fleet_request_config.replace_unhealthy_instances #=> true/false
resp.spot_fleet_request_configs[0].spot_fleet_request_config.instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.load_balancers_config.classic_load_balancers_config.classic_load_balancers #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.load_balancers_config.classic_load_balancers_config.classic_load_balancers[0].name #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.load_balancers_config.target_groups_config.target_groups #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.load_balancers_config.target_groups_config.target_groups[0].arn #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.instance_pools_to_use_count #=> Integer
resp.spot_fleet_request_configs[0].spot_fleet_request_config.tag_specifications #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.tag_specifications[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.spot_fleet_request_configs[0].spot_fleet_request_config.tag_specifications[0].tags #=> Array
resp.spot_fleet_request_configs[0].spot_fleet_request_config.tag_specifications[0].tags[0].key #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_config.tag_specifications[0].tags[0].value #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_id #=> String
resp.spot_fleet_request_configs[0].spot_fleet_request_state #=> String, one of "submitted", "active", "cancelled", "failed", "cancelled_running", "cancelled_terminating", "modifying"
resp.spot_fleet_request_configs[0].tags #=> Array
resp.spot_fleet_request_configs[0].tags[0].key #=> String
resp.spot_fleet_request_configs[0].tags[0].value #=> String

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.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :spot_fleet_request_ids (Array<String>)

    The IDs of the Spot Fleet requests.

Returns:

See Also:

#describe_spot_instance_requests(options = {}) ⇒ Types::DescribeSpotInstanceRequestsResult

Describes the specified Spot Instance requests.

You can use DescribeSpotInstanceRequests to find a running Spot Instance by examining the response. If the status of the Spot Instance is fulfilled, the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use DescribeInstances with a filter to look for instances where the instance lifecycle is spot.

We recommend that you set MaxResults to a value between 5 and 1000 to limit the number of results returned. This paginates the output, which makes the list more manageable and returns the results faster. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSpotInstanceRequests request to retrieve the remaining results.

Spot Instance requests are deleted four hours after they are canceled and their instances are terminated.

Examples:

Example: To describe a Spot Instance request


# This example describes the specified Spot Instance request.

resp = client.describe_spot_instance_requests({
  spot_instance_request_ids: [
    "sir-08b93456", 
  ], 
})

# resp.to_h outputs the following:
{
  spot_instance_requests: [
    {
      create_time: Time.parse("2014-04-30T18:14:55.000Z"), 
      instance_id: "i-1234567890abcdef0", 
      launch_specification: {
        block_device_mappings: [
          {
            device_name: "/dev/sda1", 
            ebs: {
              delete_on_termination: true, 
              volume_size: 8, 
              volume_type: "standard", 
            }, 
          }, 
        ], 
        ebs_optimized: false, 
        image_id: "ami-7aba833f", 
        instance_type: "m1.small", 
        key_name: "my-key-pair", 
        security_groups: [
          {
            group_id: "sg-e38f24a7", 
            group_name: "my-security-group", 
          }, 
        ], 
      }, 
      launched_availability_zone: "us-west-1b", 
      product_description: "Linux/UNIX", 
      spot_instance_request_id: "sir-08b93456", 
      spot_price: "0.010000", 
      state: "active", 
      status: {
        code: "fulfilled", 
        message: "Your Spot request is fulfilled.", 
        update_time: Time.parse("2014-04-30T18:16:21.000Z"), 
      }, 
      type: "one-time", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_spot_instance_requests({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  spot_instance_request_ids: ["SpotInstanceRequestId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.spot_instance_requests #=> Array
resp.spot_instance_requests[0].actual_block_hourly_price #=> String
resp.spot_instance_requests[0].availability_zone_group #=> String
resp.spot_instance_requests[0].block_duration_minutes #=> Integer
resp.spot_instance_requests[0].create_time #=> Time
resp.spot_instance_requests[0].fault.code #=> String
resp.spot_instance_requests[0].fault.message #=> String
resp.spot_instance_requests[0].instance_id #=> String
resp.spot_instance_requests[0].launch_group #=> String
resp.spot_instance_requests[0].launch_specification.user_data #=> String
resp.spot_instance_requests[0].launch_specification.security_groups #=> Array
resp.spot_instance_requests[0].launch_specification.security_groups[0].group_name #=> String
resp.spot_instance_requests[0].launch_specification.security_groups[0].group_id #=> String
resp.spot_instance_requests[0].launch_specification.addressing_type #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings #=> Array
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].device_name #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].virtual_name #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.iops #=> Integer
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.snapshot_id #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.volume_size #=> Integer
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.kms_key_id #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.encrypted #=> true/false
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].no_device #=> String
resp.spot_instance_requests[0].launch_specification.ebs_optimized #=> true/false
resp.spot_instance_requests[0].launch_specification.iam_instance_profile.arn #=> String
resp.spot_instance_requests[0].launch_specification.iam_instance_profile.name #=> String
resp.spot_instance_requests[0].launch_specification.image_id #=> String
resp.spot_instance_requests[0].launch_specification.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.spot_instance_requests[0].launch_specification.kernel_id #=> String
resp.spot_instance_requests[0].launch_specification.key_name #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].associate_public_ip_address #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].delete_on_termination #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].description #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].device_index #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].groups #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].groups[0] #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_address_count #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_addresses #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].network_interface_id #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].subnet_id #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].interface_type #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].network_card_index #=> Integer
resp.spot_instance_requests[0].launch_specification.placement.availability_zone #=> String
resp.spot_instance_requests[0].launch_specification.placement.group_name #=> String
resp.spot_instance_requests[0].launch_specification.placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.spot_instance_requests[0].launch_specification.ramdisk_id #=> String
resp.spot_instance_requests[0].launch_specification.subnet_id #=> String
resp.spot_instance_requests[0].launch_specification.monitoring.enabled #=> true/false
resp.spot_instance_requests[0].launched_availability_zone #=> String
resp.spot_instance_requests[0].product_description #=> String, one of "Linux/UNIX", "Linux/UNIX (Amazon VPC)", "Windows", "Windows (Amazon VPC)"
resp.spot_instance_requests[0].spot_instance_request_id #=> String
resp.spot_instance_requests[0].spot_price #=> String
resp.spot_instance_requests[0].state #=> String, one of "open", "active", "closed", "cancelled", "failed"
resp.spot_instance_requests[0].status.code #=> String
resp.spot_instance_requests[0].status.message #=> String
resp.spot_instance_requests[0].status.update_time #=> Time
resp.spot_instance_requests[0].tags #=> Array
resp.spot_instance_requests[0].tags[0].key #=> String
resp.spot_instance_requests[0].tags[0].value #=> String
resp.spot_instance_requests[0].type #=> String, one of "one-time", "persistent"
resp.spot_instance_requests[0].valid_from #=> Time
resp.spot_instance_requests[0].valid_until #=> Time
resp.spot_instance_requests[0].instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • availability-zone-group - The Availability Zone group.

    • create-time - The time stamp when the Spot Instance request was created.

    • fault-code - The fault code related to the request.

    • fault-message - The fault message related to the request.

    • instance-id - The ID of the instance that fulfilled the request.

    • launch-group - The Spot Instance launch group.

    • launch.block-device-mapping.delete-on-termination - Indicates whether the EBS volume is deleted on instance termination.

    • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh).

    • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.

    • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.

    • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic.

    • launch.group-id - The ID of the security group for the instance.

    • launch.group-name - The name of the security group for the instance.

    • launch.image-id - The ID of the AMI.

    • launch.instance-type - The type of instance (for example, m3.medium).

    • launch.kernel-id - The kernel ID.

    • launch.key-name - The name of the key pair the instance launched with.

    • launch.monitoring-enabled - Whether detailed monitoring is enabled for the Spot Instance.

    • launch.ramdisk-id - The RAM disk ID.

    • launched-availability-zone - The Availability Zone in which the request is launched.

    • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.

    • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.

    • network-interface.description - A description of the network interface.

    • network-interface.device-index - The index of the device for the network interface attachment on the instance.

    • network-interface.group-id - The ID of the security group associated with the network interface.

    • network-interface.network-interface-id - The ID of the network interface.

    • network-interface.private-ip-address - The primary private IP address of the network interface.

    • network-interface.subnet-id - The ID of the subnet for the instance.

    • product-description - The product description associated with the instance (Linux/UNIX | Windows).

    • spot-instance-request-id - The Spot Instance request ID.

    • spot-price - The maximum hourly price for any Spot Instance launched to fulfill the request.

    • state - The state of the Spot Instance request (open | active | closed | cancelled | failed). Spot request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.

    • status-code - The short code describing the most recent evaluation of your Spot Instance request.

    • status-message - The message explaining the status of the Spot Instance request.

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

    • type - The type of Spot Instance request (one-time | persistent).

    • valid-from - The start date of the request.

    • valid-until - The end date of the request.

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

  • :spot_instance_request_ids (Array<String>)

    One or more Spot Instance request IDs.

  • :next_token (String)

    The token to request the next set of results. This value is null when there are no more results to return.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

Returns:

See Also:

#describe_spot_price_history(options = {}) ⇒ Types::DescribeSpotPriceHistoryResult

Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide for Linux Instances.

When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.

Examples:

Example: To describe Spot price history for Linux/UNIX (Amazon VPC)


# This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.

resp = client.describe_spot_price_history({
  end_time: Time.parse("2014-01-06T08:09:10"), 
  instance_types: [
    "m1.xlarge", 
  ], 
  product_descriptions: [
    "Linux/UNIX (Amazon VPC)", 
  ], 
  start_time: Time.parse("2014-01-06T07:08:09"), 
})

# resp.to_h outputs the following:
{
  spot_price_history: [
    {
      availability_zone: "us-west-1a", 
      instance_type: "m1.xlarge", 
      product_description: "Linux/UNIX (Amazon VPC)", 
      spot_price: "0.080000", 
      timestamp: Time.parse("2014-01-06T04:32:53.000Z"), 
    }, 
    {
      availability_zone: "us-west-1c", 
      instance_type: "m1.xlarge", 
      product_description: "Linux/UNIX (Amazon VPC)", 
      spot_price: "0.080000", 
      timestamp: Time.parse("2014-01-05T11:28:26.000Z"), 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_spot_price_history({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  availability_zone: "String",
  dry_run: false,
  end_time: Time.now,
  instance_types: ["t1.micro"], # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
  max_results: 1,
  next_token: "String",
  product_descriptions: ["String"],
  start_time: Time.now,
})

Response structure


resp.next_token #=> String
resp.spot_price_history #=> Array
resp.spot_price_history[0].availability_zone #=> String
resp.spot_price_history[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.spot_price_history[0].product_description #=> String, one of "Linux/UNIX", "Linux/UNIX (Amazon VPC)", "Windows", "Windows (Amazon VPC)"
resp.spot_price_history[0].spot_price #=> String
resp.spot_price_history[0].timestamp #=> Time

Options Hash (options):

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

    One or more filters.

    • availability-zone - The Availability Zone for which prices should be returned.

    • instance-type - The type of instance (for example, m3.medium).

    • product-description - The product description for the Spot price (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

    • spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

    • timestamp - The time stamp of the Spot price history, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

  • :availability_zone (String)

    Filters the results by the specified Availability Zone.

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

  • :end_time (Time)

    The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

  • :instance_types (Array<String>)

    Filters the results by the specified instance types.

  • :max_results (Integer)

    The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token for the next set of results.

  • :product_descriptions (Array<String>)

    Filters the results by the specified basic product descriptions.

  • :start_time (Time)

    The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

See Also:

#describe_stale_security_groups(options = {}) ⇒ Types::DescribeStaleSecurityGroupsResult

[VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in a peer VPC, or a security group in a peer VPC for which the VPC peering connection has been deleted.

Examples:

Request syntax with placeholder values


resp = client.describe_stale_security_groups({
  dry_run: false,
  max_results: 1,
  next_token: "DescribeStaleSecurityGroupsNextToken",
  vpc_id: "VpcId", # required
})

Response structure


resp.next_token #=> String
resp.stale_security_group_set #=> Array
resp.stale_security_group_set[0].description #=> String
resp.stale_security_group_set[0].group_id #=> String
resp.stale_security_group_set[0].group_name #=> String
resp.stale_security_group_set[0].stale_ip_permissions #=> Array
resp.stale_security_group_set[0].stale_ip_permissions[0].from_port #=> Integer
resp.stale_security_group_set[0].stale_ip_permissions[0].ip_protocol #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].ip_ranges #=> Array
resp.stale_security_group_set[0].stale_ip_permissions[0].ip_ranges[0] #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].prefix_list_ids #=> Array
resp.stale_security_group_set[0].stale_ip_permissions[0].prefix_list_ids[0] #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].to_port #=> Integer
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs #=> Array
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].description #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].group_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].group_name #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].peering_status #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].user_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].vpc_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress #=> Array
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].from_port #=> Integer
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].ip_protocol #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].ip_ranges #=> Array
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].ip_ranges[0] #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].prefix_list_ids #=> Array
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].prefix_list_ids[0] #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].to_port #=> Integer
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs #=> Array
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].description #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].group_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].group_name #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].peering_status #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].user_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].vpc_id #=> String
resp.stale_security_group_set[0].stale_ip_permissions_egress[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String
resp.stale_security_group_set[0].vpc_id #=> String

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.

  • :max_results (Integer)

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a prior call.)

  • :vpc_id (required, String)

    The ID of the VPC.

Returns:

See Also:

#describe_subnets(options = {}) ⇒ Types::DescribeSubnetsResult

Describes one or more of your subnets.

For more information, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To describe the subnets for a VPC


# This example describes the subnets for the specified VPC.

resp = client.describe_subnets({
  filters: [
    {
      name: "vpc-id", 
      values: [
        "vpc-a01106c2", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  subnets: [
    {
      availability_zone: "us-east-1c", 
      available_ip_address_count: 251, 
      cidr_block: "10.0.1.0/24", 
      default_for_az: false, 
      map_public_ip_on_launch: false, 
      state: "available", 
      subnet_id: "subnet-9d4a7b6c", 
      vpc_id: "vpc-a01106c2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_subnets({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  subnet_ids: ["SubnetId"],
  dry_run: false,
  next_token: "String",
  max_results: 1,
})

Response structure


resp.subnets #=> Array
resp.subnets[0].availability_zone #=> String
resp.subnets[0].availability_zone_id #=> String
resp.subnets[0].available_ip_address_count #=> Integer
resp.subnets[0].cidr_block #=> String
resp.subnets[0].default_for_az #=> true/false
resp.subnets[0].map_public_ip_on_launch #=> true/false
resp.subnets[0].map_customer_owned_ip_on_launch #=> true/false
resp.subnets[0].customer_owned_ipv_4_pool #=> String
resp.subnets[0].state #=> String, one of "pending", "available"
resp.subnets[0].subnet_id #=> String
resp.subnets[0].vpc_id #=> String
resp.subnets[0].owner_id #=> String
resp.subnets[0].assign_ipv_6_address_on_creation #=> true/false
resp.subnets[0].ipv_6_cidr_block_association_set #=> Array
resp.subnets[0].ipv_6_cidr_block_association_set[0].association_id #=> String
resp.subnets[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.subnets[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.subnets[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.subnets[0].tags #=> Array
resp.subnets[0].tags[0].key #=> String
resp.subnets[0].tags[0].value #=> String
resp.subnets[0].subnet_arn #=> String
resp.subnets[0].outpost_arn #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.

    • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.

    • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.

    • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet\'s CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.

    • default-for-az - Indicates whether this is the default subnet for the Availability Zone. You can also use defaultForAz as the filter name.

    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.

    • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.

    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.

    • owner-id - The ID of the AWS account that owns the subnet.

    • state - The state of the subnet (pending | available).

    • subnet-arn - The Amazon Resource Name (ARN) of the subnet.

    • subnet-id - The ID of the subnet.

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

    • vpc-id - The ID of the VPC for the subnet.

  • :subnet_ids (Array<String>)

    One or more subnet IDs.

    Default: Describes all your subnets.

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

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_tags(options = {}) ⇒ Types::DescribeTagsResult

Describes the specified tags for your EC2 resources.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe the tags for a single resource


# This example describes the tags for the specified instance.

resp = client.describe_tags({
  filters: [
    {
      name: "resource-id", 
      values: [
        "i-1234567890abcdef8", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  tags: [
    {
      key: "Stack", 
      resource_id: "i-1234567890abcdef8", 
      resource_type: "instance", 
      value: "test", 
    }, 
    {
      key: "Name", 
      resource_id: "i-1234567890abcdef8", 
      resource_type: "instance", 
      value: "Beta Server", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_tags({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.next_token #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].resource_id #=> String
resp.tags[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.tags[0].value #=> String

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.

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

    The filters.

    • key - The tag key.

    • resource-id - The ID of the resource.

    • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway).

    • tag:<key> - The key/value combination of the tag. For example, specify \"tag:Owner\" for the filter name and \"TeamA\" for the filter value to find resources with the tag \"Owner=TeamA\".

    • value - The tag value.

  • :max_results (Integer)

    The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_traffic_mirror_filters(options = {}) ⇒ Types::DescribeTrafficMirrorFiltersResult

Describes one or more Traffic Mirror filters.

Examples:

Request syntax with placeholder values


resp = client.describe_traffic_mirror_filters({
  traffic_mirror_filter_ids: ["TrafficMirrorFilterId"],
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.traffic_mirror_filters #=> Array
resp.traffic_mirror_filters[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filters[0].ingress_filter_rules #=> Array
resp.traffic_mirror_filters[0].ingress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filters[0].ingress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filters[0].ingress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filters[0].ingress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filters[0].ingress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filters[0].ingress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filters[0].ingress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filters[0].ingress_filter_rules[0].description #=> String
resp.traffic_mirror_filters[0].egress_filter_rules #=> Array
resp.traffic_mirror_filters[0].egress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filters[0].egress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filters[0].egress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filters[0].egress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filters[0].egress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filters[0].egress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filters[0].egress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filters[0].egress_filter_rules[0].description #=> String
resp.traffic_mirror_filters[0].network_services #=> Array
resp.traffic_mirror_filters[0].network_services[0] #=> String, one of "amazon-dns"
resp.traffic_mirror_filters[0].description #=> String
resp.traffic_mirror_filters[0].tags #=> Array
resp.traffic_mirror_filters[0].tags[0].key #=> String
resp.traffic_mirror_filters[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :traffic_mirror_filter_ids (Array<String>)

    The ID of the Traffic Mirror filter.

  • :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. The possible values are:

    • description: The Traffic Mirror filter description.

    • traffic-mirror-filter-id: The ID of the Traffic Mirror filter.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_traffic_mirror_sessions(options = {}) ⇒ Types::DescribeTrafficMirrorSessionsResult

Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_traffic_mirror_sessions({
  traffic_mirror_session_ids: ["TrafficMirrorSessionId"],
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.traffic_mirror_sessions #=> Array
resp.traffic_mirror_sessions[0].traffic_mirror_session_id #=> String
resp.traffic_mirror_sessions[0].traffic_mirror_target_id #=> String
resp.traffic_mirror_sessions[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_sessions[0].network_interface_id #=> String
resp.traffic_mirror_sessions[0].owner_id #=> String
resp.traffic_mirror_sessions[0].packet_length #=> Integer
resp.traffic_mirror_sessions[0].session_number #=> Integer
resp.traffic_mirror_sessions[0].virtual_network_id #=> Integer
resp.traffic_mirror_sessions[0].description #=> String
resp.traffic_mirror_sessions[0].tags #=> Array
resp.traffic_mirror_sessions[0].tags[0].key #=> String
resp.traffic_mirror_sessions[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :traffic_mirror_session_ids (Array<String>)

    The ID of the Traffic Mirror session.

  • :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. The possible values are:

    • description: The Traffic Mirror session description.

    • network-interface-id: The ID of the Traffic Mirror session network interface.

    • owner-id: The ID of the account that owns the Traffic Mirror session.

    • packet-length: The assigned number of packets to mirror.

    • session-number: The assigned session number.

    • traffic-mirror-filter-id: The ID of the Traffic Mirror filter.

    • traffic-mirror-session-id: The ID of the Traffic Mirror session.

    • traffic-mirror-target-id: The ID of the Traffic Mirror target.

    • virtual-network-id: The virtual network ID of the Traffic Mirror session.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_traffic_mirror_targets(options = {}) ⇒ Types::DescribeTrafficMirrorTargetsResult

Information about one or more Traffic Mirror targets.

Examples:

Request syntax with placeholder values


resp = client.describe_traffic_mirror_targets({
  traffic_mirror_target_ids: ["TrafficMirrorTargetId"],
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.traffic_mirror_targets #=> Array
resp.traffic_mirror_targets[0].traffic_mirror_target_id #=> String
resp.traffic_mirror_targets[0].network_interface_id #=> String
resp.traffic_mirror_targets[0].network_load_balancer_arn #=> String
resp.traffic_mirror_targets[0].type #=> String, one of "network-interface", "network-load-balancer"
resp.traffic_mirror_targets[0].description #=> String
resp.traffic_mirror_targets[0].owner_id #=> String
resp.traffic_mirror_targets[0].tags #=> Array
resp.traffic_mirror_targets[0].tags[0].key #=> String
resp.traffic_mirror_targets[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :traffic_mirror_target_ids (Array<String>)

    The ID of the Traffic Mirror targets.

  • :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. The possible values are:

    • description: The Traffic Mirror target description.

    • network-interface-id: The ID of the Traffic Mirror session network interface.

    • network-load-balancer-arn: The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.

    • owner-id: The ID of the account that owns the Traffic Mirror session.

    • traffic-mirror-target-id: The ID of the Traffic Mirror target.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#describe_transit_gateway_attachments(options = {}) ⇒ Types::DescribeTransitGatewayAttachmentsResult

Describes one or more attachments between resources and transit gateways. By default, all attachments are described. Alternatively, you can filter the results by attachment ID, attachment state, resource ID, or resource owner.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateway_attachments({
  transit_gateway_attachment_ids: ["TransitGatewayAttachmentId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_attachments #=> Array
resp.transit_gateway_attachments[0].transit_gateway_attachment_id #=> String
resp.transit_gateway_attachments[0].transit_gateway_id #=> String
resp.transit_gateway_attachments[0].transit_gateway_owner_id #=> String
resp.transit_gateway_attachments[0].resource_owner_id #=> String
resp.transit_gateway_attachments[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_attachments[0].resource_id #=> String
resp.transit_gateway_attachments[0].state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_attachments[0].association.transit_gateway_route_table_id #=> String
resp.transit_gateway_attachments[0].association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.transit_gateway_attachments[0].creation_time #=> Time
resp.transit_gateway_attachments[0].tags #=> Array
resp.transit_gateway_attachments[0].tags[0].key #=> String
resp.transit_gateway_attachments[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_attachment_ids (Array<String>)

    The IDs of the attachments.

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

    One or more filters. The possible values are:

    • association.state - The state of the association (associating | associated | disassociating).

    • association.transit-gateway-route-table-id - The ID of the route table for the transit gateway.

    • resource-id - The ID of the resource.

    • resource-owner-id - The ID of the AWS account that owns the resource.

    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering.

    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting.

    • transit-gateway-attachment-id - The ID of the attachment.

    • transit-gateway-id - The ID of the transit gateway.

    • transit-gateway-owner-id - The ID of the AWS account that owns the transit gateway.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_transit_gateway_multicast_domains(options = {}) ⇒ Types::DescribeTransitGatewayMulticastDomainsResult

Describes one or more transit gateway multicast domains.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateway_multicast_domains({
  transit_gateway_multicast_domain_ids: ["TransitGatewayMulticastDomainId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_multicast_domains #=> Array
resp.transit_gateway_multicast_domains[0].transit_gateway_multicast_domain_id #=> String
resp.transit_gateway_multicast_domains[0].transit_gateway_id #=> String
resp.transit_gateway_multicast_domains[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_multicast_domains[0].creation_time #=> Time
resp.transit_gateway_multicast_domains[0].tags #=> Array
resp.transit_gateway_multicast_domains[0].tags[0].key #=> String
resp.transit_gateway_multicast_domains[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_ids (Array<String>)

    The ID of the transit gateway multicast domain.

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

    One or more filters. The possible values are:

    • state - The state of the transit gateway multicast domain. Valid values are pending | available | deleting | deleted.

    • transit-gateway-id - The ID of the transit gateway.

    • transit-gateway-multicast-domain-id - The ID of the transit gateway multicast domain.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_transit_gateway_peering_attachments(options = {}) ⇒ Types::DescribeTransitGatewayPeeringAttachmentsResult

Describes your transit gateway peering attachments.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateway_peering_attachments({
  transit_gateway_attachment_ids: ["TransitGatewayAttachmentId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_peering_attachments #=> Array
resp.transit_gateway_peering_attachments[0].transit_gateway_attachment_id #=> String
resp.transit_gateway_peering_attachments[0].requester_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachments[0].requester_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachments[0].requester_tgw_info.region #=> String
resp.transit_gateway_peering_attachments[0].accepter_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachments[0].accepter_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachments[0].accepter_tgw_info.region #=> String
resp.transit_gateway_peering_attachments[0].status.code #=> String
resp.transit_gateway_peering_attachments[0].status.message #=> String
resp.transit_gateway_peering_attachments[0].state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_peering_attachments[0].creation_time #=> Time
resp.transit_gateway_peering_attachments[0].tags #=> Array
resp.transit_gateway_peering_attachments[0].tags[0].key #=> String
resp.transit_gateway_peering_attachments[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_attachment_ids (Array<String>)

    One or more IDs of the transit gateway peering attachments.

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

    One or more filters. The possible values are:

    • transit-gateway-attachment-id - The ID of the transit gateway attachment.

    • local-owner-id - The ID of your AWS account.

    • remote-owner-id - The ID of the AWS account in the remote Region that owns the transit gateway.

    • state - The state of the peering attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting).

    • 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 that have a tag with a specific key, regardless of the tag value.

    • transit-gateway-id - The ID of the transit gateway.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_transit_gateway_route_tables(options = {}) ⇒ Types::DescribeTransitGatewayRouteTablesResult

Describes one or more transit gateway route tables. By default, all transit gateway route tables are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateway_route_tables({
  transit_gateway_route_table_ids: ["TransitGatewayRouteTableId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_route_tables #=> Array
resp.transit_gateway_route_tables[0].transit_gateway_route_table_id #=> String
resp.transit_gateway_route_tables[0].transit_gateway_id #=> String
resp.transit_gateway_route_tables[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.transit_gateway_route_tables[0].default_association_route_table #=> true/false
resp.transit_gateway_route_tables[0].default_propagation_route_table #=> true/false
resp.transit_gateway_route_tables[0].creation_time #=> Time
resp.transit_gateway_route_tables[0].tags #=> Array
resp.transit_gateway_route_tables[0].tags[0].key #=> String
resp.transit_gateway_route_tables[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_route_table_ids (Array<String>)

    The IDs of the transit gateway route tables.

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

    One or more filters. The possible values are:

    • default-association-route-table - Indicates whether this is the default association route table for the transit gateway (true | false).

    • default-propagation-route-table - Indicates whether this is the default propagation route table for the transit gateway (true | false).

    • state - The state of the route table (available | deleting | deleted | pending).

    • transit-gateway-id - The ID of the transit gateway.

    • transit-gateway-route-table-id - The ID of the transit gateway route table.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_transit_gateway_vpc_attachments(options = {}) ⇒ Types::DescribeTransitGatewayVpcAttachmentsResult

Describes one or more VPC attachments. By default, all VPC attachments are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateway_vpc_attachments({
  transit_gateway_attachment_ids: ["TransitGatewayAttachmentId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachments #=> Array
resp.transit_gateway_vpc_attachments[0].transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachments[0].transit_gateway_id #=> String
resp.transit_gateway_vpc_attachments[0].vpc_id #=> String
resp.transit_gateway_vpc_attachments[0].vpc_owner_id #=> String
resp.transit_gateway_vpc_attachments[0].state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachments[0].subnet_ids #=> Array
resp.transit_gateway_vpc_attachments[0].subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachments[0].creation_time #=> Time
resp.transit_gateway_vpc_attachments[0].options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachments[0].options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachments[0].options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachments[0].tags #=> Array
resp.transit_gateway_vpc_attachments[0].tags[0].key #=> String
resp.transit_gateway_vpc_attachments[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_attachment_ids (Array<String>)

    The IDs of the attachments.

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

    One or more filters. The possible values are:

    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting.

    • transit-gateway-attachment-id - The ID of the attachment.

    • transit-gateway-id - The ID of the transit gateway.

    • vpc-id - The ID of the VPC.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_transit_gateways(options = {}) ⇒ Types::DescribeTransitGatewaysResult

Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can filter the results.

Examples:

Request syntax with placeholder values


resp = client.describe_transit_gateways({
  transit_gateway_ids: ["TransitGatewayId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateways #=> Array
resp.transit_gateways[0].transit_gateway_id #=> String
resp.transit_gateways[0].transit_gateway_arn #=> String
resp.transit_gateways[0].state #=> String, one of "pending", "available", "modifying", "deleting", "deleted"
resp.transit_gateways[0].owner_id #=> String
resp.transit_gateways[0].description #=> String
resp.transit_gateways[0].creation_time #=> Time
resp.transit_gateways[0].options.amazon_side_asn #=> Integer
resp.transit_gateways[0].options.auto_accept_shared_attachments #=> String, one of "enable", "disable"
resp.transit_gateways[0].options.default_route_table_association #=> String, one of "enable", "disable"
resp.transit_gateways[0].options.association_default_route_table_id #=> String
resp.transit_gateways[0].options.default_route_table_propagation #=> String, one of "enable", "disable"
resp.transit_gateways[0].options.propagation_default_route_table_id #=> String
resp.transit_gateways[0].options.vpn_ecmp_support #=> String, one of "enable", "disable"
resp.transit_gateways[0].options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateways[0].options.multicast_support #=> String, one of "enable", "disable"
resp.transit_gateways[0].tags #=> Array
resp.transit_gateways[0].tags[0].key #=> String
resp.transit_gateways[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_ids (Array<String>)

    The IDs of the transit gateways.

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

    One or more filters. The possible values are:

    • options.propagation-default-route-table-id - The ID of the default propagation route table.

    • options.amazon-side-asn - The private ASN for the Amazon side of a BGP session.

    • options.association-default-route-table-id - The ID of the default association route table.

    • options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable).

    • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable).

    • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable).

    • options.dns-support - Indicates whether DNS support is enabled (enable | disable).

    • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable).

    • owner-id - The ID of the AWS account that owns the transit gateway.

    • state - The state of the transit gateway (available | deleted | deleting | modifying | pending).

    • transit-gateway-id - The ID of the transit gateway.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#describe_volume_attribute(options = {}) ⇒ Types::DescribeVolumeAttributeResult

Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe a volume attribute


# This example describes the ``autoEnableIo`` attribute of the volume with the ID ``vol-049df61146c4d7901``.

resp = client.describe_volume_attribute({
  attribute: "autoEnableIO", 
  volume_id: "vol-049df61146c4d7901", 
})

# resp.to_h outputs the following:
{
  auto_enable_io: {
    value: false, 
  }, 
  volume_id: "vol-049df61146c4d7901", 
}

Request syntax with placeholder values


resp = client.describe_volume_attribute({
  attribute: "autoEnableIO", # required, accepts autoEnableIO, productCodes
  volume_id: "VolumeId", # required
  dry_run: false,
})

Response structure


resp.auto_enable_io.value #=> true/false
resp.product_codes #=> Array
resp.product_codes[0].product_code_id #=> String
resp.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.volume_id #=> String

Options Hash (options):

  • :attribute (required, String)

    The attribute of the volume. This parameter is required.

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

See Also:

#describe_volume_status(options = {}) ⇒ Types::DescribeVolumeStatusResult

Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

The DescribeVolumeStatus operation provides the following information about the specified volumes:

Status: Reflects the current status of the volume. The possible values are ok, impaired , warning, or insufficient-data. If all checks pass, the overall status of the volume is ok. If the check fails, the overall status is impaired. If the status is insufficient-data, then the checks may still be taking place on your volume at the time. We recommend that you retry the request. For more information about volume status, see Monitoring the status of your volumes in the Amazon Elastic Compute Cloud User Guide.

Events: Reflect the cause of a volume status and may require you to take action. For example, if your volume returns an impaired status, then the volume event might be potential-data-inconsistency. This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and may have inconsistent data.

Actions: Reflect the actions you may have to take in response to an event. For example, if the status of the volume is impaired and the volume event shows potential-data-inconsistency, then the action shows enable-volume-io. This means that you may want to enable the I/O operations for the volume by calling the EnableVolumeIO action and then check the volume for data consistency.

Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the error state (for example, when a volume is incapable of accepting I/O.)

Examples:

Example: To describe the status of a single volume


# This example describes the status for the volume ``vol-1234567890abcdef0``.

resp = client.describe_volume_status({
  volume_ids: [
    "vol-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  volume_statuses: [
    {
      actions: [
      ], 
      availability_zone: "us-east-1a", 
      events: [
      ], 
      volume_id: "vol-1234567890abcdef0", 
      volume_status: {
        details: [
          {
            name: "io-enabled", 
            status: "passed", 
          }, 
          {
            name: "io-performance", 
            status: "not-applicable", 
          }, 
        ], 
        status: "ok", 
      }, 
    }, 
  ], 
}

Example: To describe the status of impaired volumes


# This example describes the status for all volumes that are impaired. In this example output, there are no impaired volumes.

resp = client.describe_volume_status({
  filters: [
    {
      name: "volume-status.status", 
      values: [
        "impaired", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  volume_statuses: [
  ], 
}

Request syntax with placeholder values


resp = client.describe_volume_status({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  volume_ids: ["VolumeId"],
  dry_run: false,
})

Response structure


resp.next_token #=> String
resp.volume_statuses #=> Array
resp.volume_statuses[0].actions #=> Array
resp.volume_statuses[0].actions[0].code #=> String
resp.volume_statuses[0].actions[0].description #=> String
resp.volume_statuses[0].actions[0].event_id #=> String
resp.volume_statuses[0].actions[0].event_type #=> String
resp.volume_statuses[0].availability_zone #=> String
resp.volume_statuses[0].outpost_arn #=> String
resp.volume_statuses[0].events #=> Array
resp.volume_statuses[0].events[0].description #=> String
resp.volume_statuses[0].events[0].event_id #=> String
resp.volume_statuses[0].events[0].event_type #=> String
resp.volume_statuses[0].events[0].not_after #=> Time
resp.volume_statuses[0].events[0].not_before #=> Time
resp.volume_statuses[0].events[0].instance_id #=> String
resp.volume_statuses[0].volume_id #=> String
resp.volume_statuses[0].volume_status.details #=> Array
resp.volume_statuses[0].volume_status.details[0].name #=> String, one of "io-enabled", "io-performance"
resp.volume_statuses[0].volume_status.details[0].status #=> String
resp.volume_statuses[0].volume_status.status #=> String, one of "ok", "impaired", "insufficient-data"
resp.volume_statuses[0].attachment_statuses #=> Array
resp.volume_statuses[0].attachment_statuses[0].io_performance #=> String
resp.volume_statuses[0].attachment_statuses[0].instance_id #=> String

Options Hash (options):

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

    The filters.

    • action.code - The action code for the event (for example, enable-volume-io).

    • action.description - A description of the action.

    • action.event-id - The event ID associated with the action.

    • availability-zone - The Availability Zone of the instance.

    • event.description - A description of the event.

    • event.event-id - The event ID.

    • event.event-type - The event type (for io-enabled: passed | failed; for io-performance: io-performance:degraded | io-performance:severely-degraded | io-performance:stalled).

    • event.not-after - The latest end time for the event.

    • event.not-before - The earliest start time for the event.

    • volume-status.details-name - The cause for volume-status.status (io-enabled | io-performance).

    • volume-status.details-status - The status of volume-status.details-name (for io-enabled: passed | failed; for io-performance: normal | degraded | severely-degraded | stalled).

    • volume-status.status - The status of the volume (ok | impaired | warning | insufficient-data).

  • :max_results (Integer)

    The maximum number of volume results returned by DescribeVolumeStatus in paginated output. When this parameter is used, the request only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. If this parameter is not used, then DescribeVolumeStatus returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

  • :next_token (String)

    The NextToken value to include in a future DescribeVolumeStatus request. When the results of the request exceed MaxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

  • :volume_ids (Array<String>)

    The IDs of the volumes.

    Default: Describes all your volumes.

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

See Also:

#describe_volumes(options = {}) ⇒ Types::DescribeVolumesResult

Describes the specified EBS volumes or all of your EBS volumes.

If you are describing a long list of volumes, we recommend that you paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeVolumes request to retrieve the remaining results.

For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To describe all volumes


# This example describes all of your volumes in the default region.

resp = client.describe_volumes({
})

# resp.to_h outputs the following:
{
  next_token: "", 
  volumes: [
    {
      attachments: [
        {
          attach_time: Time.parse("2013-12-18T22:35:00.000Z"), 
          delete_on_termination: true, 
          device: "/dev/sda1", 
          instance_id: "i-1234567890abcdef0", 
          state: "attached", 
          volume_id: "vol-049df61146c4d7901", 
        }, 
      ], 
      availability_zone: "us-east-1a", 
      create_time: Time.parse("2013-12-18T22:35:00.084Z"), 
      size: 8, 
      snapshot_id: "snap-1234567890abcdef0", 
      state: "in-use", 
      volume_id: "vol-049df61146c4d7901", 
      volume_type: "standard", 
    }, 
  ], 
}

Example: To describe volumes that are attached to a specific instance


# This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates.

resp = client.describe_volumes({
  filters: [
    {
      name: "attachment.instance-id", 
      values: [
        "i-1234567890abcdef0", 
      ], 
    }, 
    {
      name: "attachment.delete-on-termination", 
      values: [
        "true", 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  volumes: [
    {
      attachments: [
        {
          attach_time: Time.parse("2013-12-18T22:35:00.000Z"), 
          delete_on_termination: true, 
          device: "/dev/sda1", 
          instance_id: "i-1234567890abcdef0", 
          state: "attached", 
          volume_id: "vol-049df61146c4d7901", 
        }, 
      ], 
      availability_zone: "us-east-1a", 
      create_time: Time.parse("2013-12-18T22:35:00.084Z"), 
      size: 8, 
      snapshot_id: "snap-1234567890abcdef0", 
      state: "in-use", 
      volume_id: "vol-049df61146c4d7901", 
      volume_type: "standard", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_volumes({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  volume_ids: ["VolumeId"],
  dry_run: false,
  max_results: 1,
  next_token: "String",
})

Response structure


resp.volumes #=> Array
resp.volumes[0].attachments #=> Array
resp.volumes[0].attachments[0].attach_time #=> Time
resp.volumes[0].attachments[0].device #=> String
resp.volumes[0].attachments[0].instance_id #=> String
resp.volumes[0].attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached", "busy"
resp.volumes[0].attachments[0].volume_id #=> String
resp.volumes[0].attachments[0].delete_on_termination #=> true/false
resp.volumes[0].availability_zone #=> String
resp.volumes[0].create_time #=> Time
resp.volumes[0].encrypted #=> true/false
resp.volumes[0].kms_key_id #=> String
resp.volumes[0].outpost_arn #=> String
resp.volumes[0].size #=> Integer
resp.volumes[0].snapshot_id #=> String
resp.volumes[0].state #=> String, one of "creating", "available", "in-use", "deleting", "deleted", "error"
resp.volumes[0].volume_id #=> String
resp.volumes[0].iops #=> Integer
resp.volumes[0].tags #=> Array
resp.volumes[0].tags[0].key #=> String
resp.volumes[0].tags[0].value #=> String
resp.volumes[0].volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.volumes[0].fast_restored #=> true/false
resp.volumes[0].multi_attach_enabled #=> true/false
resp.next_token #=> String

Options Hash (options):

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

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

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

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

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

    • 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. This can be gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

  • :volume_ids (Array<String>)

    The volume IDs.

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

  • :max_results (Integer)

    The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.

  • :next_token (String)

    The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.

Returns:

See Also:

#describe_volumes_modifications(options = {}) ⇒ Types::DescribeVolumesModificationsResult

Describes the most recent volume modification request for the specified EBS volumes.

If a volume has never been modified, some information in the output will be null. If a volume has been modified more than once, the output includes only the most recent modification request.

You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide. For more information, see Monitoring volume modifications in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_volumes_modifications({
  dry_run: false,
  volume_ids: ["VolumeId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.volumes_modifications #=> Array
resp.volumes_modifications[0].volume_id #=> String
resp.volumes_modifications[0].modification_state #=> String, one of "modifying", "optimizing", "completed", "failed"
resp.volumes_modifications[0].status_message #=> String
resp.volumes_modifications[0].target_size #=> Integer
resp.volumes_modifications[0].target_iops #=> Integer
resp.volumes_modifications[0].target_volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.volumes_modifications[0].original_size #=> Integer
resp.volumes_modifications[0].original_iops #=> Integer
resp.volumes_modifications[0].original_volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.volumes_modifications[0].progress #=> Integer
resp.volumes_modifications[0].start_time #=> Time
resp.volumes_modifications[0].end_time #=> Time
resp.next_token #=> String

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.

  • :volume_ids (Array<String>)

    The IDs of the volumes.

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

    The filters.

    • modification-state - The current modification state (modifying | optimizing | completed | failed).

    • original-iops - The original IOPS rate of the volume.

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

    • original-volume-type - The original volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).

    • originalMultiAttachEnabled - Indicates whether Multi-Attach support was enabled (true | false).

    • start-time - The modification start time.

    • target-iops - The target IOPS rate of the volume.

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

    • target-volume-type - The target volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).

    • targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be enabled (true | false).

    • volume-id - The ID of the volume.

  • :next_token (String)

    The nextToken value returned by a previous paginated request.

  • :max_results (Integer)

    The maximum number of results (up to a limit of 500) to be returned in a paginated request.

Returns:

See Also:

#describe_vpc_attribute(options = {}) ⇒ Types::DescribeVpcAttributeResult

Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

Examples:

Example: To describe the enableDnsSupport attribute


# This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

resp = client.describe_vpc_attribute({
  attribute: "enableDnsSupport", 
  vpc_id: "vpc-a01106c2", 
})

# resp.to_h outputs the following:
{
  enable_dns_support: {
    value: true, 
  }, 
  vpc_id: "vpc-a01106c2", 
}

Example: To describe the enableDnsHostnames attribute


# This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.

resp = client.describe_vpc_attribute({
  attribute: "enableDnsHostnames", 
  vpc_id: "vpc-a01106c2", 
})

# resp.to_h outputs the following:
{
  enable_dns_hostnames: {
    value: true, 
  }, 
  vpc_id: "vpc-a01106c2", 
}

Request syntax with placeholder values


resp = client.describe_vpc_attribute({
  attribute: "enableDnsSupport", # required, accepts enableDnsSupport, enableDnsHostnames
  vpc_id: "VpcId", # required
  dry_run: false,
})

Response structure


resp.vpc_id #=> String
resp.enable_dns_hostnames.value #=> true/false
resp.enable_dns_support.value #=> true/false

Options Hash (options):

  • :attribute (required, String)

    The VPC attribute.

  • :vpc_id (required, String)

    The ID of the VPC.

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

See Also:

Describes the ClassicLink status of one or more VPCs.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_classic_link({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  vpc_ids: ["VpcId"],
})

Response structure


resp.vpcs #=> Array
resp.vpcs[0].classic_link_enabled #=> true/false
resp.vpcs[0].tags #=> Array
resp.vpcs[0].tags[0].key #=> String
resp.vpcs[0].tags[0].value #=> String
resp.vpcs[0].vpc_id #=> String

Options Hash (options):

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

    One or more filters.

    • is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true | false).

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

  • :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_ids (Array<String>)

    One or more VPCs for which you want to describe the ClassicLink status.

Returns:

See Also:

Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_classic_link_dns_support({
  max_results: 1,
  next_token: "DescribeVpcClassicLinkDnsSupportNextToken",
  vpc_ids: ["VpcId"],
})

Response structure


resp.next_token #=> String
resp.vpcs #=> Array
resp.vpcs[0].classic_link_dns_supported #=> true/false
resp.vpcs[0].vpc_id #=> String

Options Hash (options):

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

  • :vpc_ids (Array<String>)

    One or more VPC IDs.

Returns:

See Also:

#describe_vpc_endpoint_connection_notifications(options = {}) ⇒ Types::DescribeVpcEndpointConnectionNotificationsResult

Describes the connection notifications for VPC endpoints and VPC endpoint services.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoint_connection_notifications({
  dry_run: false,
  connection_notification_id: "ConnectionNotificationId",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.connection_notification_set #=> Array
resp.connection_notification_set[0].connection_notification_id #=> String
resp.connection_notification_set[0].service_id #=> String
resp.connection_notification_set[0].vpc_endpoint_id #=> String
resp.connection_notification_set[0].connection_notification_type #=> String, one of "Topic"
resp.connection_notification_set[0].connection_notification_arn #=> String
resp.connection_notification_set[0].connection_events #=> Array
resp.connection_notification_set[0].connection_events[0] #=> String
resp.connection_notification_set[0].connection_notification_state #=> String, one of "Enabled", "Disabled"
resp.next_token #=> String

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.

  • :connection_notification_id (String)

    The ID of the notification.

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

    One or more filters.

    • connection-notification-arn - The ARN of the SNS topic for the notification.

    • connection-notification-id - The ID of the notification.

    • connection-notification-state - The state of the notification (Enabled | Disabled).

    • connection-notification-type - The type of notification (Topic).

    • service-id - The ID of the endpoint service.

    • vpc-endpoint-id - The ID of the VPC endpoint.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value.

  • :next_token (String)

    The token to request the next page of results.

Returns:

See Also:

#describe_vpc_endpoint_connections(options = {}) ⇒ Types::DescribeVpcEndpointConnectionsResult

Describes the VPC endpoint connections to your VPC endpoint services, including any endpoints that are pending your acceptance.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoint_connections({
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.vpc_endpoint_connections #=> Array
resp.vpc_endpoint_connections[0].service_id #=> String
resp.vpc_endpoint_connections[0].vpc_endpoint_id #=> String
resp.vpc_endpoint_connections[0].vpc_endpoint_owner #=> String
resp.vpc_endpoint_connections[0].vpc_endpoint_state #=> String, one of "PendingAcceptance", "Pending", "Available", "Deleting", "Deleted", "Rejected", "Failed", "Expired"
resp.vpc_endpoint_connections[0].creation_timestamp #=> Time
resp.vpc_endpoint_connections[0].dns_entries #=> Array
resp.vpc_endpoint_connections[0].dns_entries[0].dns_name #=> String
resp.vpc_endpoint_connections[0].dns_entries[0].hosted_zone_id #=> String
resp.vpc_endpoint_connections[0].network_load_balancer_arns #=> Array
resp.vpc_endpoint_connections[0].network_load_balancer_arns[0] #=> String
resp.vpc_endpoint_connections[0].gateway_load_balancer_arns #=> Array
resp.vpc_endpoint_connections[0].gateway_load_balancer_arns[0] #=> String
resp.next_token #=> String

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.

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

    One or more filters.

    • service-id - The ID of the service.

    • vpc-endpoint-owner - The AWS account number of the owner of the endpoint.

    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed).

    • vpc-endpoint-id - The ID of the endpoint.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_vpc_endpoint_service_configurations(options = {}) ⇒ Types::DescribeVpcEndpointServiceConfigurationsResult

Describes the VPC endpoint service configurations in your account (your services).

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoint_service_configurations({
  dry_run: false,
  service_ids: ["VpcEndpointServiceId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.service_configurations #=> Array
resp.service_configurations[0].service_type #=> Array
resp.service_configurations[0].service_type[0].service_type #=> String, one of "Interface", "Gateway", "GatewayLoadBalancer"
resp.service_configurations[0].service_id #=> String
resp.service_configurations[0].service_name #=> String
resp.service_configurations[0].service_state #=> String, one of "Pending", "Available", "Deleting", "Deleted", "Failed"
resp.service_configurations[0].availability_zones #=> Array
resp.service_configurations[0].availability_zones[0] #=> String
resp.service_configurations[0].acceptance_required #=> true/false
resp.service_configurations[0].manages_vpc_endpoints #=> true/false
resp.service_configurations[0].network_load_balancer_arns #=> Array
resp.service_configurations[0].network_load_balancer_arns[0] #=> String
resp.service_configurations[0].gateway_load_balancer_arns #=> Array
resp.service_configurations[0].gateway_load_balancer_arns[0] #=> String
resp.service_configurations[0].base_endpoint_dns_names #=> Array
resp.service_configurations[0].base_endpoint_dns_names[0] #=> String
resp.service_configurations[0].private_dns_name #=> String
resp.service_configurations[0].private_dns_name_configuration.state #=> String, one of "pendingVerification", "verified", "failed"
resp.service_configurations[0].private_dns_name_configuration.type #=> String
resp.service_configurations[0].private_dns_name_configuration.value #=> String
resp.service_configurations[0].private_dns_name_configuration.name #=> String
resp.service_configurations[0].tags #=> Array
resp.service_configurations[0].tags[0].key #=> String
resp.service_configurations[0].tags[0].value #=> String
resp.next_token #=> String

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.

  • :service_ids (Array<String>)

    The IDs of one or more services.

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

    One or more filters.

    • service-name - The name of the service.

    • service-id - The ID of the service.

    • service-state - The state of the service (Pending | Available | Deleting | Deleted | Failed).

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

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_vpc_endpoint_service_permissions(options = {}) ⇒ Types::DescribeVpcEndpointServicePermissionsResult

Describes the principals (service consumers) that are permitted to discover your VPC endpoint service.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoint_service_permissions({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.allowed_principals #=> Array
resp.allowed_principals[0].principal_type #=> String, one of "All", "Service", "OrganizationUnit", "Account", "User", "Role"
resp.allowed_principals[0].principal #=> String
resp.next_token #=> String

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.

  • :service_id (required, String)

    The ID of the service.

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

    One or more filters.

    • principal - The ARN of the principal.

    • principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role).

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

  • :next_token (String)

    The token to retrieve the next page of results.

Returns:

See Also:

#describe_vpc_endpoint_services(options = {}) ⇒ Types::DescribeVpcEndpointServicesResult

Describes available services to which you can create a VPC endpoint.

When the service provider and the consumer have different accounts multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses us-east-1a and us-east-1c and the consumer uses us-east-1a and us-east-1a and us-east-1b, the response includes the VPC endpoint services in the common Availability Zone, us-east-1a.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoint_services({
  dry_run: false,
  service_names: ["String"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.service_names #=> Array
resp.service_names[0] #=> String
resp.service_details #=> Array
resp.service_details[0].service_name #=> String
resp.service_details[0].service_id #=> String
resp.service_details[0].service_type #=> Array
resp.service_details[0].service_type[0].service_type #=> String, one of "Interface", "Gateway", "GatewayLoadBalancer"
resp.service_details[0].availability_zones #=> Array
resp.service_details[0].availability_zones[0] #=> String
resp.service_details[0].owner #=> String
resp.service_details[0].base_endpoint_dns_names #=> Array
resp.service_details[0].base_endpoint_dns_names[0] #=> String
resp.service_details[0].private_dns_name #=> String
resp.service_details[0].vpc_endpoint_policy_supported #=> true/false
resp.service_details[0].acceptance_required #=> true/false
resp.service_details[0].manages_vpc_endpoints #=> true/false
resp.service_details[0].tags #=> Array
resp.service_details[0].tags[0].key #=> String
resp.service_details[0].tags[0].value #=> String
resp.service_details[0].private_dns_name_verification_state #=> String, one of "pendingVerification", "verified", "failed"
resp.next_token #=> String

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.

  • :service_names (Array<String>)

    One or more service names.

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

    One or more filters.

    • service-name - The name of the service.

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

  • :max_results (Integer)

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

    Constraint: If the value is greater than 1,000, we return only 1,000 items.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a prior call.)

Returns:

See Also:

#describe_vpc_endpoints(options = {}) ⇒ Types::DescribeVpcEndpointsResult

Describes one or more of your VPC endpoints.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_endpoints({
  dry_run: false,
  vpc_endpoint_ids: ["VpcEndpointId"],
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.vpc_endpoints #=> Array
resp.vpc_endpoints[0].vpc_endpoint_id #=> String
resp.vpc_endpoints[0].vpc_endpoint_type #=> String, one of "Interface", "Gateway", "GatewayLoadBalancer"
resp.vpc_endpoints[0].vpc_id #=> String
resp.vpc_endpoints[0].service_name #=> String
resp.vpc_endpoints[0].state #=> String, one of "PendingAcceptance", "Pending", "Available", "Deleting", "Deleted", "Rejected", "Failed", "Expired"
resp.vpc_endpoints[0].policy_document #=> String
resp.vpc_endpoints[0].route_table_ids #=> Array
resp.vpc_endpoints[0].route_table_ids[0] #=> String
resp.vpc_endpoints[0].subnet_ids #=> Array
resp.vpc_endpoints[0].subnet_ids[0] #=> String
resp.vpc_endpoints[0].groups #=> Array
resp.vpc_endpoints[0].groups[0].group_id #=> String
resp.vpc_endpoints[0].groups[0].group_name #=> String
resp.vpc_endpoints[0].private_dns_enabled #=> true/false
resp.vpc_endpoints[0].requester_managed #=> true/false
resp.vpc_endpoints[0].network_interface_ids #=> Array
resp.vpc_endpoints[0].network_interface_ids[0] #=> String
resp.vpc_endpoints[0].dns_entries #=> Array
resp.vpc_endpoints[0].dns_entries[0].dns_name #=> String
resp.vpc_endpoints[0].dns_entries[0].hosted_zone_id #=> String
resp.vpc_endpoints[0].creation_timestamp #=> Time
resp.vpc_endpoints[0].tags #=> Array
resp.vpc_endpoints[0].tags[0].key #=> String
resp.vpc_endpoints[0].tags[0].value #=> String
resp.vpc_endpoints[0].owner_id #=> String
resp.vpc_endpoints[0].last_error.message #=> String
resp.vpc_endpoints[0].last_error.code #=> String
resp.next_token #=> String

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_endpoint_ids (Array<String>)

    One or more endpoint IDs.

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

    One or more filters.

    • service-name - The name of the service.

    • vpc-id - The ID of the VPC in which the endpoint resides.

    • vpc-endpoint-id - The ID of the endpoint.

    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed).

    • vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer).

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

  • :max_results (Integer)

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

    Constraint: If the value is greater than 1,000, we return only 1,000 items.

  • :next_token (String)

    The token for the next set of items to return. (You received this token from a prior call.)

Returns:

See Also:

#describe_vpc_peering_connections(options = {}) ⇒ Types::DescribeVpcPeeringConnectionsResult

Describes one or more of your VPC peering connections.

Examples:

Request syntax with placeholder values


resp = client.describe_vpc_peering_connections({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  dry_run: false,
  vpc_peering_connection_ids: ["VpcPeeringConnectionId"],
  next_token: "String",
  max_results: 1,
})

Response structure


resp.vpc_peering_connections #=> Array
resp.vpc_peering_connections[0].accepter_vpc_info.cidr_block #=> String
resp.vpc_peering_connections[0].accepter_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connections[0].accepter_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connections[0].accepter_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connections[0].accepter_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connections[0].accepter_vpc_info.owner_id #=> String
resp.vpc_peering_connections[0].accepter_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connections[0].accepter_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connections[0].accepter_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connections[0].accepter_vpc_info.vpc_id #=> String
resp.vpc_peering_connections[0].accepter_vpc_info.region #=> String
resp.vpc_peering_connections[0].expiration_time #=> Time
resp.vpc_peering_connections[0].requester_vpc_info.cidr_block #=> String
resp.vpc_peering_connections[0].requester_vpc_info.ipv_6_cidr_block_set #=> Array
resp.vpc_peering_connections[0].requester_vpc_info.ipv_6_cidr_block_set[0].ipv_6_cidr_block #=> String
resp.vpc_peering_connections[0].requester_vpc_info.cidr_block_set #=> Array
resp.vpc_peering_connections[0].requester_vpc_info.cidr_block_set[0].cidr_block #=> String
resp.vpc_peering_connections[0].requester_vpc_info.owner_id #=> String
resp.vpc_peering_connections[0].requester_vpc_info.peering_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.vpc_peering_connections[0].requester_vpc_info.peering_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.vpc_peering_connections[0].requester_vpc_info.peering_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.vpc_peering_connections[0].requester_vpc_info.vpc_id #=> String
resp.vpc_peering_connections[0].requester_vpc_info.region #=> String
resp.vpc_peering_connections[0].status.code #=> String, one of "initiating-request", "pending-acceptance", "active", "deleted", "rejected", "failed", "expired", "provisioning", "deleting"
resp.vpc_peering_connections[0].status.message #=> String
resp.vpc_peering_connections[0].tags #=> Array
resp.vpc_peering_connections[0].tags[0].key #=> String
resp.vpc_peering_connections[0].tags[0].value #=> String
resp.vpc_peering_connections[0].vpc_peering_connection_id #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.

    • accepter-vpc-info.owner-id - The AWS account ID of the owner of the accepter VPC.

    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.

    • expiration-time - The expiration date and time for the VPC peering connection.

    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester\'s VPC.

    • requester-vpc-info.owner-id - The AWS account ID of the owner of the requester VPC.

    • requester-vpc-info.vpc-id - The ID of the requester VPC.

    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected).

    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.

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

    • vpc-peering-connection-id - The ID of the VPC peering connection.

  • :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_peering_connection_ids (Array<String>)

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_vpcs(options = {}) ⇒ Types::DescribeVpcsResult

Describes one or more of your VPCs.

Examples:

Example: To describe a VPC


# This example describes the specified VPC.

resp = client.describe_vpcs({
  vpc_ids: [
    "vpc-a01106c2", 
  ], 
})

# resp.to_h outputs the following:
{
  vpcs: [
    {
      cidr_block: "10.0.0.0/16", 
      dhcp_options_id: "dopt-7a8b9c2d", 
      instance_tenancy: "default", 
      is_default: false, 
      state: "available", 
      tags: [
        {
          key: "Name", 
          value: "MyVPC", 
        }, 
      ], 
      vpc_id: "vpc-a01106c2", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_vpcs({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  vpc_ids: ["VpcId"],
  dry_run: false,
  next_token: "String",
  max_results: 1,
})

Response structure


resp.vpcs #=> Array
resp.vpcs[0].cidr_block #=> String
resp.vpcs[0].dhcp_options_id #=> String
resp.vpcs[0].state #=> String, one of "pending", "available"
resp.vpcs[0].vpc_id #=> String
resp.vpcs[0].owner_id #=> String
resp.vpcs[0].instance_tenancy #=> String, one of "default", "dedicated", "host"
resp.vpcs[0].ipv_6_cidr_block_association_set #=> Array
resp.vpcs[0].ipv_6_cidr_block_association_set[0].association_id #=> String
resp.vpcs[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block #=> String
resp.vpcs[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpcs[0].ipv_6_cidr_block_association_set[0].ipv_6_cidr_block_state.status_message #=> String
resp.vpcs[0].ipv_6_cidr_block_association_set[0].network_border_group #=> String
resp.vpcs[0].ipv_6_cidr_block_association_set[0].ipv_6_pool #=> String
resp.vpcs[0].cidr_block_association_set #=> Array
resp.vpcs[0].cidr_block_association_set[0].association_id #=> String
resp.vpcs[0].cidr_block_association_set[0].cidr_block #=> String
resp.vpcs[0].cidr_block_association_set[0].cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.vpcs[0].cidr_block_association_set[0].cidr_block_state.status_message #=> String
resp.vpcs[0].is_default #=> true/false
resp.vpcs[0].tags #=> Array
resp.vpcs[0].tags[0].key #=> String
resp.vpcs[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

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

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC\'s CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).

    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.

    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.

    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.

    • dhcp-options-id - The ID of a set of DHCP options.

    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.

    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.

    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.

    • isDefault - Indicates whether the VPC is the default VPC.

    • owner-id - The ID of the AWS account that owns the VPC.

    • state - The state of the VPC (pending | available).

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

    • vpc-id - The ID of the VPC.

  • :vpc_ids (Array<String>)

    One or more VPC IDs.

    Default: Describes all your VPCs.

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

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#describe_vpn_connections(options = {}) ⇒ Types::DescribeVpnConnectionsResult

Describes one or more of your VPN connections.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_vpn_connections({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  vpn_connection_ids: ["VpnConnectionId"],
  dry_run: false,
})

Response structure


resp.vpn_connections #=> Array
resp.vpn_connections[0].customer_gateway_configuration #=> String
resp.vpn_connections[0].customer_gateway_id #=> String
resp.vpn_connections[0].category #=> String
resp.vpn_connections[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connections[0].type #=> String, one of "ipsec.1"
resp.vpn_connections[0].vpn_connection_id #=> String
resp.vpn_connections[0].vpn_gateway_id #=> String
resp.vpn_connections[0].transit_gateway_id #=> String
resp.vpn_connections[0].options.enable_acceleration #=> true/false
resp.vpn_connections[0].options.static_routes_only #=> true/false
resp.vpn_connections[0].options.local_ipv_4_network_cidr #=> String
resp.vpn_connections[0].options.remote_ipv_4_network_cidr #=> String
resp.vpn_connections[0].options.local_ipv_6_network_cidr #=> String
resp.vpn_connections[0].options.remote_ipv_6_network_cidr #=> String
resp.vpn_connections[0].options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connections[0].options.tunnel_options #=> Array
resp.vpn_connections[0].options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connections[0].options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connections[0].options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connections[0].options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connections[0].options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connections[0].options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connections[0].options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connections[0].options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connections[0].options.tunnel_options[0].startup_action #=> String
resp.vpn_connections[0].routes #=> Array
resp.vpn_connections[0].routes[0].destination_cidr_block #=> String
resp.vpn_connections[0].routes[0].source #=> String, one of "Static"
resp.vpn_connections[0].routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connections[0].tags #=> Array
resp.vpn_connections[0].tags[0].key #=> String
resp.vpn_connections[0].tags[0].value #=> String
resp.vpn_connections[0].vgw_telemetry #=> Array
resp.vpn_connections[0].vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connections[0].vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connections[0].vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connections[0].vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connections[0].vgw_telemetry[0].status_message #=> String
resp.vpn_connections[0].vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

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

    One or more filters.

    • customer-gateway-configuration - The configuration information for the customer gateway.

    • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.

    • state - The state of the VPN connection (pending | available | deleting | deleted).

    • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).

    • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.

    • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.

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

    • type - The type of VPN connection. Currently the only supported type is ipsec.1.

    • vpn-connection-id - The ID of the VPN connection.

    • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.

    • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.

  • :vpn_connection_ids (Array<String>)

    One or more VPN connection IDs.

    Default: Describes your VPN connections.

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

See Also:

#describe_vpn_gateways(options = {}) ⇒ Types::DescribeVpnGatewaysResult

Describes one or more of your virtual private gateways.

For more information, see AWS Site-to-Site VPN in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_vpn_gateways({
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  vpn_gateway_ids: ["VpnGatewayId"],
  dry_run: false,
})

Response structure


resp.vpn_gateways #=> Array
resp.vpn_gateways[0].availability_zone #=> String
resp.vpn_gateways[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_gateways[0].type #=> String, one of "ipsec.1"
resp.vpn_gateways[0].vpc_attachments #=> Array
resp.vpn_gateways[0].vpc_attachments[0].state #=> String, one of "attaching", "attached", "detaching", "detached"
resp.vpn_gateways[0].vpc_attachments[0].vpc_id #=> String
resp.vpn_gateways[0].vpn_gateway_id #=> String
resp.vpn_gateways[0].amazon_side_asn #=> Integer
resp.vpn_gateways[0].tags #=> Array
resp.vpn_gateways[0].tags[0].key #=> String
resp.vpn_gateways[0].tags[0].value #=> String

Options Hash (options):

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

    One or more filters.

    • amazon-side-asn - The Autonomous System Number (ASN) for the Amazon side of the gateway.

    • attachment.state - The current state of the attachment between the gateway and the VPC (attaching | attached | detaching | detached).

    • attachment.vpc-id - The ID of an attached VPC.

    • availability-zone - The Availability Zone for the virtual private gateway (if applicable).

    • state - The state of the virtual private gateway (pending | available | deleting | deleted).

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

    • type - The type of virtual private gateway. Currently the only supported type is ipsec.1.

    • vpn-gateway-id - The ID of the virtual private gateway.

  • :vpn_gateway_ids (Array<String>)

    One or more virtual private gateway IDs.

    Default: Describes all your virtual private gateways.

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

See Also:

Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

Examples:

Request syntax with placeholder values


resp = client.detach_classic_link_vpc({
  dry_run: false,
  instance_id: "InstanceId", # required
  vpc_id: "VpcId", # required
})

Response structure


resp.return #=> true/false

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.

  • :instance_id (required, String)

    The ID of the instance to unlink from the VPC.

  • :vpc_id (required, String)

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

Returns:

See Also:

#detach_internet_gateway(options = {}) ⇒ Struct

Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

Examples:

Example: To detach an Internet gateway from a VPC


# This example detaches the specified Internet gateway from the specified VPC.

resp = client.detach_internet_gateway({
  internet_gateway_id: "igw-c0a643a9", 
  vpc_id: "vpc-a01106c2", 
})

Request syntax with placeholder values


resp = client.detach_internet_gateway({
  dry_run: false,
  internet_gateway_id: "InternetGatewayId", # required
  vpc_id: "VpcId", # required
})

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.

  • :internet_gateway_id (required, String)

    The ID of the internet gateway.

  • :vpc_id (required, String)

    The ID of the VPC.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#detach_network_interface(options = {}) ⇒ Struct

Detaches a network interface from an instance.

Examples:

Example: To detach a network interface from an instance


# This example detaches the specified network interface from its attached instance.

resp = client.detach_network_interface({
  attachment_id: "eni-attach-66c4350a", 
})

Request syntax with placeholder values


resp = client.detach_network_interface({
  attachment_id: "NetworkInterfaceAttachmentId", # required
  dry_run: false,
  force: false,
})

Options Hash (options):

  • :attachment_id (required, String)

    The ID of the attachment.

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

  • :force (Boolean)

    Specifies whether to force a detachment.

    * Use the Force parameter only as a last resort to detach a network interface from a failed instance.

    • If you use the Force parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.

    • If you force the detachment of a network interface, the instance metadata might not get updated. This means that the attributes associated with the detached network interface might still be visible. The instance metadata will get updated when you stop and start the instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detaching an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To detach a volume from an instance


# This example detaches the volume (``vol-049df61146c4d7901``) from the instance it is attached to.

resp = client.detach_volume({
  volume_id: "vol-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  attach_time: Time.parse("2014-02-27T19:23:06.000Z"), 
  device: "/dev/sdb", 
  instance_id: "i-1234567890abcdef0", 
  state: "detaching", 
  volume_id: "vol-049df61146c4d7901", 
}

Request syntax with placeholder values


resp = client.detach_volume({
  device: "String",
  force: false,
  instance_id: "InstanceId",
  volume_id: "VolumeId", # required
  dry_run: false,
})

Response structure


resp.attach_time #=> Time
resp.device #=> String
resp.instance_id #=> String
resp.state #=> String, one of "attaching", "attached", "detaching", "detached", "busy"
resp.volume_id #=> String
resp.delete_on_termination #=> true/false

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.

  • :instance_id (String)

    The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.

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

See Also:

#detach_vpn_gateway(options = {}) ⇒ Struct

Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).

You must wait for the attachment's state to switch to detached before you can delete the VPC or attach a different VPC to the virtual private gateway.

Examples:

Request syntax with placeholder values


resp = client.detach_vpn_gateway({
  vpc_id: "VpcId", # required
  vpn_gateway_id: "VpnGatewayId", # required
  dry_run: false,
})

Options Hash (options):

  • :vpc_id (required, String)

    The ID of the VPC.

  • :vpn_gateway_id (required, String)

    The ID of the virtual private gateway.

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

  • (Struct)

    Returns an empty response.

See Also:

#disable_ebs_encryption_by_default(options = {}) ⇒ Types::DisableEbsEncryptionByDefaultResult

Disables EBS encryption by default for your account in the current Region.

After you disable encryption by default, you can still create encrypted volumes by enabling encryption when you create each volume.

Disabling encryption by default does not change the encryption status of your existing volumes.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.disable_ebs_encryption_by_default({
  dry_run: false,
})

Response structure


resp.ebs_encryption_by_default #=> true/false

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.

Returns:

See Also:

#disable_fast_snapshot_restores(options = {}) ⇒ Types::DisableFastSnapshotRestoresResult

Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.

Examples:

Request syntax with placeholder values


resp = client.disable_fast_snapshot_restores({
  availability_zones: ["String"], # required
  source_snapshot_ids: ["SnapshotId"], # required
  dry_run: false,
})

Response structure


resp.successful #=> Array
resp.successful[0].snapshot_id #=> String
resp.successful[0].availability_zone #=> String
resp.successful[0].state #=> String, one of "enabling", "optimizing", "enabled", "disabling", "disabled"
resp.successful[0].state_transition_reason #=> String
resp.successful[0].owner_id #=> String
resp.successful[0].owner_alias #=> String
resp.successful[0].enabling_time #=> Time
resp.successful[0].optimizing_time #=> Time
resp.successful[0].enabled_time #=> Time
resp.successful[0].disabling_time #=> Time
resp.successful[0].disabled_time #=> Time
resp.unsuccessful #=> Array
resp.unsuccessful[0].snapshot_id #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors #=> Array
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].availability_zone #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].error.code #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].error.message #=> String

Options Hash (options):

  • :availability_zones (required, Array<String>)

    One or more Availability Zones. For example, us-east-2a.

  • :source_snapshot_ids (required, Array<String>)

    The IDs of one or more snapshots. For example, snap-1234567890abcdef0.

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

See Also:

#disable_transit_gateway_route_table_propagation(options = {}) ⇒ Types::DisableTransitGatewayRouteTablePropagationResult

Disables the specified resource attachment from propagating routes to the specified propagation route table.

Examples:

Request syntax with placeholder values


resp = client.disable_transit_gateway_route_table_propagation({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.propagation.transit_gateway_attachment_id #=> String
resp.propagation.resource_id #=> String
resp.propagation.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.propagation.transit_gateway_route_table_id #=> String
resp.propagation.state #=> String, one of "enabling", "enabled", "disabling", "disabled"

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the propagation route table.

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#disable_vgw_route_propagation(options = {}) ⇒ Struct

Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.

Examples:

Example: To disable route propagation


# This example disables the specified virtual private gateway from propagating static routes to the specified route table.

resp = client.disable_vgw_route_propagation({
  gateway_id: "vgw-9a4cacf3", 
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.disable_vgw_route_propagation({
  gateway_id: "VpnGatewayId", # required
  route_table_id: "RouteTableId", # required
  dry_run: false,
})

Options Hash (options):

  • :gateway_id (required, String)

    The ID of the virtual private gateway.

  • :route_table_id (required, String)

    The ID of the route table.

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

  • (Struct)

    Returns an empty response.

See Also:

Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

Examples:

Request syntax with placeholder values


resp = client.disable_vpc_classic_link({
  dry_run: false,
  vpc_id: "VpcId", # required
})

Response structure


resp.return #=> true/false

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.

Returns:

See Also:

Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

You must specify a VPC ID in the request.

Examples:

Request syntax with placeholder values


resp = client.disable_vpc_classic_link_dns_support({
  vpc_id: "VpcId",
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :vpc_id (String)

    The ID of the VPC.

Returns:

See Also:

#disassociate_address(options = {}) ⇒ Struct

Disassociates an Elastic IP address from the instance or network interface it's associated with.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

Examples:

Example: To disassociate an Elastic IP address in EC2-VPC


# This example disassociates an Elastic IP address from an instance in a VPC.

resp = client.disassociate_address({
  association_id: "eipassoc-2bebb745", 
})

Example: To disassociate an Elastic IP addresses in EC2-Classic


# This example disassociates an Elastic IP address from an instance in EC2-Classic.

resp = client.disassociate_address({
  public_ip: "198.51.100.0", 
})

Request syntax with placeholder values


resp = client.disassociate_address({
  association_id: "ElasticIpAssociationId",
  public_ip: "String",
  dry_run: false,
})

Options Hash (options):

  • :association_id (String)

    [EC2-VPC] The association ID. Required for EC2-VPC.

  • :public_ip (String)

    [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

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

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_client_vpn_target_network(options = {}) ⇒ Types::DisassociateClientVpnTargetNetworkResult

Disassociates a target network from the specified Client VPN endpoint. When you disassociate the last target network from a Client VPN, the following happens:

  • The route that was automatically added for the VPC is deleted

  • All active client connections are terminated

  • New client connections are disallowed

  • The Client VPN endpoint's status changes to pending-associate

Examples:

Request syntax with placeholder values


resp = client.disassociate_client_vpn_target_network({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  association_id: "ClientVpnAssociationId", # required
  dry_run: false,
})

Response structure


resp.association_id #=> String
resp.status.code #=> String, one of "associating", "associated", "association-failed", "disassociating", "disassociated"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint from which to disassociate the target network.

  • :association_id (required, String)

    The ID of the target network association.

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

See Also:

#disassociate_enclave_certificate_iam_role(options = {}) ⇒ Types::DisassociateEnclaveCertificateIamRoleResult

Disassociates an IAM role from an AWS Certificate Manager (ACM) certificate. Disassociating an IAM role from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the AWS Key Management Service (KMS) customer master key (CMK) used to encrypt the private key. This effectively revokes the role's permission to use the certificate.

Examples:

Request syntax with placeholder values


resp = client.disassociate_enclave_certificate_iam_role({
  certificate_arn: "ResourceArn",
  role_arn: "ResourceArn",
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :certificate_arn (String)

    The ARN of the ACM certificate from which to disassociate the IAM role.

  • :role_arn (String)

    The ARN of the IAM role to disassociate.

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

See Also:

#disassociate_iam_instance_profile(options = {}) ⇒ Types::DisassociateIamInstanceProfileResult

Disassociates an IAM instance profile from a running or stopped instance.

Use DescribeIamInstanceProfileAssociations to get the association ID.

Examples:

Example: To disassociate an IAM instance profile


# This example disassociates the specified IAM instance profile from an instance.

resp = client.disassociate_iam_instance_profile({
  association_id: "iip-assoc-05020b59952902f5f", 
})

# resp.to_h outputs the following:
{
  iam_instance_profile_association: {
    association_id: "iip-assoc-05020b59952902f5f", 
    iam_instance_profile: {
      arn: "arn:aws:iam::123456789012:instance-profile/admin-role", 
      id: "AIPAI5IVIHMFFYY2DKV5Y", 
    }, 
    instance_id: "i-123456789abcde123", 
    state: "disassociating", 
  }, 
}

Request syntax with placeholder values


resp = client.disassociate_iam_instance_profile({
  association_id: "IamInstanceProfileAssociationId", # required
})

Response structure


resp.iam_instance_profile_association.association_id #=> String
resp.iam_instance_profile_association.instance_id #=> String
resp.iam_instance_profile_association.iam_instance_profile.arn #=> String
resp.iam_instance_profile_association.iam_instance_profile.id #=> String
resp.iam_instance_profile_association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.iam_instance_profile_association.timestamp #=> Time

Options Hash (options):

  • :association_id (required, String)

    The ID of the IAM instance profile association.

Returns:

See Also:

#disassociate_route_table(options = {}) ⇒ Struct

Disassociates a subnet or gateway from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To disassociate a route table


# This example disassociates the specified route table from its associated subnet.

resp = client.disassociate_route_table({
  association_id: "rtbassoc-781d0d1a", 
})

Request syntax with placeholder values


resp = client.disassociate_route_table({
  association_id: "RouteTableAssociationId", # required
  dry_run: false,
})

Options Hash (options):

  • :association_id (required, String)

    The association ID representing the current association between the route table and subnet or gateway.

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

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_subnet_cidr_block(options = {}) ⇒ Types::DisassociateSubnetCidrBlockResult

Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

Examples:

Request syntax with placeholder values


resp = client.disassociate_subnet_cidr_block({
  association_id: "SubnetCidrAssociationId", # required
})

Response structure


resp.ipv_6_cidr_block_association.association_id #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.status_message #=> String
resp.subnet_id #=> String

Options Hash (options):

  • :association_id (required, String)

    The association ID for the CIDR block.

Returns:

See Also:

#disassociate_transit_gateway_multicast_domain(options = {}) ⇒ Types::DisassociateTransitGatewayMulticastDomainResult

Disassociates the specified subnets from the transit gateway multicast domain.

Examples:

Request syntax with placeholder values


resp = client.disassociate_transit_gateway_multicast_domain({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  subnet_ids: ["String"],
  dry_run: false,
})

Response structure


resp.associations.transit_gateway_multicast_domain_id #=> String
resp.associations.transit_gateway_attachment_id #=> String
resp.associations.resource_id #=> String
resp.associations.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.associations.subnets #=> Array
resp.associations.subnets[0].subnet_id #=> String
resp.associations.subnets[0].state #=> String, one of "associating", "associated", "disassociating", "disassociated"

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :transit_gateway_attachment_id (String)

    The ID of the attachment.

  • :subnet_ids (Array<String>)

    The IDs of the subnets;

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

See Also:

#disassociate_transit_gateway_route_table(options = {}) ⇒ Types::DisassociateTransitGatewayRouteTableResult

Disassociates a resource attachment from a transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.disassociate_transit_gateway_route_table({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.association.transit_gateway_route_table_id #=> String
resp.association.transit_gateway_attachment_id #=> String
resp.association.resource_id #=> String
resp.association.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#disassociate_vpc_cidr_block(options = {}) ⇒ Types::DisassociateVpcCidrBlockResult

Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).

Examples:

Request syntax with placeholder values


resp = client.disassociate_vpc_cidr_block({
  association_id: "VpcCidrAssociationId", # required
})

Response structure


resp.ipv_6_cidr_block_association.association_id #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block #=> String
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.ipv_6_cidr_block_association.ipv_6_cidr_block_state.status_message #=> String
resp.ipv_6_cidr_block_association.network_border_group #=> String
resp.ipv_6_cidr_block_association.ipv_6_pool #=> String
resp.cidr_block_association.association_id #=> String
resp.cidr_block_association.cidr_block #=> String
resp.cidr_block_association.cidr_block_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failing", "failed"
resp.cidr_block_association.cidr_block_state.status_message #=> String
resp.vpc_id #=> String

Options Hash (options):

  • :association_id (required, String)

    The association ID for the CIDR block.

Returns:

See Also:

#enable_ebs_encryption_by_default(options = {}) ⇒ Types::EnableEbsEncryptionByDefaultResult

Enables EBS encryption by default for your account in the current Region.

After you enable encryption by default, the EBS volumes that you create are are always encrypted, either using the default CMK or the CMK that you specified when you created each volume. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

You can specify the default CMK for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId.

Enabling encryption by default has no effect on the encryption status of your existing volumes.

After you enable encryption by default, you can no longer launch instances using instance types that do not support encryption. For more information, see Supported instance types.

Examples:

Request syntax with placeholder values


resp = client.enable_ebs_encryption_by_default({
  dry_run: false,
})

Response structure


resp.ebs_encryption_by_default #=> true/false

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.

Returns:

See Also:

#enable_fast_snapshot_restores(options = {}) ⇒ Types::EnableFastSnapshotRestoresResult

Enables fast snapshot restores for the specified snapshots in the specified Availability Zones.

You get the full benefit of fast snapshot restores after they enter the enabled state. To get the current state of fast snapshot restores, use DescribeFastSnapshotRestores. To disable fast snapshot restores, use DisableFastSnapshotRestores.

For more information, see Amazon EBS fast snapshot restore in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.enable_fast_snapshot_restores({
  availability_zones: ["String"], # required
  source_snapshot_ids: ["SnapshotId"], # required
  dry_run: false,
})

Response structure


resp.successful #=> Array
resp.successful[0].snapshot_id #=> String
resp.successful[0].availability_zone #=> String
resp.successful[0].state #=> String, one of "enabling", "optimizing", "enabled", "disabling", "disabled"
resp.successful[0].state_transition_reason #=> String
resp.successful[0].owner_id #=> String
resp.successful[0].owner_alias #=> String
resp.successful[0].enabling_time #=> Time
resp.successful[0].optimizing_time #=> Time
resp.successful[0].enabled_time #=> Time
resp.successful[0].disabling_time #=> Time
resp.successful[0].disabled_time #=> Time
resp.unsuccessful #=> Array
resp.unsuccessful[0].snapshot_id #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors #=> Array
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].availability_zone #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].error.code #=> String
resp.unsuccessful[0].fast_snapshot_restore_state_errors[0].error.message #=> String

Options Hash (options):

  • :availability_zones (required, Array<String>)

    One or more Availability Zones. For example, us-east-2a.

  • :source_snapshot_ids (required, Array<String>)

    The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You can specify a snapshot that was shared with you from another AWS account.

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

See Also:

#enable_transit_gateway_route_table_propagation(options = {}) ⇒ Types::EnableTransitGatewayRouteTablePropagationResult

Enables the specified attachment to propagate routes to the specified propagation route table.

Examples:

Request syntax with placeholder values


resp = client.enable_transit_gateway_route_table_propagation({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.propagation.transit_gateway_attachment_id #=> String
resp.propagation.resource_id #=> String
resp.propagation.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.propagation.transit_gateway_route_table_id #=> String
resp.propagation.state #=> String, one of "enabling", "enabled", "disabling", "disabled"

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the propagation route table.

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#enable_vgw_route_propagation(options = {}) ⇒ Struct

Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.

Examples:

Example: To enable route propagation


# This example enables the specified virtual private gateway to propagate static routes to the specified route table.

resp = client.enable_vgw_route_propagation({
  gateway_id: "vgw-9a4cacf3", 
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.enable_vgw_route_propagation({
  gateway_id: "VpnGatewayId", # required
  route_table_id: "RouteTableId", # required
  dry_run: false,
})

Options Hash (options):

  • :gateway_id (required, String)

    The ID of the virtual private gateway that is attached to a VPC. The virtual private gateway must be attached to the same VPC that the routing tables are associated with.

  • :route_table_id (required, String)

    The ID of the route table. The routing table must be associated with the same VPC that the virtual private gateway is attached to.

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

  • (Struct)

    Returns an empty response.

See Also:

#enable_volume_io(options = {}) ⇒ Struct

Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

Examples:

Example: To enable I/O for a volume


# This example enables I/O on volume ``vol-1234567890abcdef0``.

resp = client.enable_volume_io({
  volume_id: "vol-1234567890abcdef0", 
})

Request syntax with placeholder values


resp = client.enable_volume_io({
  dry_run: false,
  volume_id: "VolumeId", # required
})

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.

  • :volume_id (required, String)

    The ID of the volume.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.enable_vpc_classic_link({
  dry_run: false,
  vpc_id: "VpcId", # required
})

Response structure


resp.return #=> true/false

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.

Returns:

See Also:

Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.

You must specify a VPC ID in the request.

Examples:

Request syntax with placeholder values


resp = client.enable_vpc_classic_link_dns_support({
  vpc_id: "VpcId",
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :vpc_id (String)

    The ID of the VPC.

Returns:

See Also:

#export_client_vpn_client_certificate_revocation_list(options = {}) ⇒ Types::ExportClientVpnClientCertificateRevocationListResult

Downloads the client certificate revocation list for the specified Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.export_client_vpn_client_certificate_revocation_list({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  dry_run: false,
})

Response structure


resp.certificate_revocation_list #=> String
resp.status.code #=> String, one of "pending", "active"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

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

See Also:

#export_client_vpn_client_configuration(options = {}) ⇒ Types::ExportClientVpnClientConfigurationResult

Downloads the contents of the Client VPN endpoint configuration file for the specified Client VPN endpoint. The Client VPN endpoint configuration file includes the Client VPN endpoint and certificate information clients need to establish a connection with the Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.export_client_vpn_client_configuration({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  dry_run: false,
})

Response structure


resp.client_configuration #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint.

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

See Also:

#export_image(options = {}) ⇒ Types::ExportImageResult

Exports an Amazon Machine Image (AMI) to a VM file. For more information, see Exporting a VM Directory from an Amazon Machine Image (AMI) in the VM Import/Export User Guide.

Examples:

Request syntax with placeholder values


resp = client.export_image({
  client_token: "String",
  description: "String",
  disk_image_format: "VMDK", # required, accepts VMDK, RAW, VHD
  dry_run: false,
  image_id: "ImageId", # required
  s3_export_location: { # required
    s3_bucket: "String", # required
    s3_prefix: "String",
  },
  role_name: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.description #=> String
resp.disk_image_format #=> String, one of "VMDK", "RAW", "VHD"
resp.export_image_task_id #=> String
resp.image_id #=> String
resp.role_name #=> String
resp.progress #=> String
resp.s3_export_location.s3_bucket #=> String
resp.s3_export_location.s3_prefix #=> String
resp.status #=> String
resp.status_message #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Token to enable idempotency for export image requests.

  • :description (String)

    A description of the image being exported. The maximum length is 255 characters.

  • :disk_image_format (required, String)

    The disk image format.

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

  • :image_id (required, String)

    The ID of the image.

  • :s3_export_location (required, Types::ExportTaskS3LocationRequest)

    Information about the destination Amazon S3 bucket. The bucket must exist and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.

  • :role_name (String)

    The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket. If this parameter is not specified, the default role is named \'vmimport\'.

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

    The tags to apply to the image being exported.

Returns:

See Also:

#export_transit_gateway_routes(options = {}) ⇒ Types::ExportTransitGatewayRoutesResult

Exports routes from the specified transit gateway route table to the specified S3 bucket. By default, all routes are exported. Alternatively, you can filter by CIDR range.

The routes are saved to the specified bucket in a JSON file. For more information, see Export Route Tables to Amazon S3 in Transit Gateways.

Examples:

Request syntax with placeholder values


resp = client.export_transit_gateway_routes({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  s3_bucket: "String", # required
  dry_run: false,
})

Response structure


resp.s3_location #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the route table.

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

    One or more filters. The possible values are:

    • attachment.transit-gateway-attachment-id - The id of the transit gateway attachment.

    • attachment.resource-id - The resource id of the transit gateway attachment.

    • route-search.exact-match - The exact match of the specified filter.

    • route-search.longest-prefix-match - The longest prefix that matches the route.

    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.

    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.

    • state - The state of the route (active | blackhole).

    • transit-gateway-route-destination-cidr-block - The CIDR range.

    • type - The type of route (propagated | static).

  • :s3_bucket (required, String)

    The name of the S3 bucket.

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

See Also:

#get_associated_enclave_certificate_iam_roles(options = {}) ⇒ Types::GetAssociatedEnclaveCertificateIamRolesResult

Returns the IAM roles that are associated with the specified AWS Certificate Manager (ACM) certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored, and the ARN of the AWS Key Management Service (KMS) customer master key (CMK) that's used to encrypt the private key.

Examples:

Request syntax with placeholder values


resp = client.get_associated_enclave_certificate_iam_roles({
  certificate_arn: "ResourceArn",
  dry_run: false,
})

Response structure


resp.associated_roles #=> Array
resp.associated_roles[0].associated_role_arn #=> String
resp.associated_roles[0].certificate_s3_bucket_name #=> String
resp.associated_roles[0].certificate_s3_object_key #=> String
resp.associated_roles[0].encryption_kms_key_id #=> String

Options Hash (options):

  • :certificate_arn (String)

    The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon S3 object information.

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

See Also:

#get_associated_ipv_6_pool_cidrs(options = {}) ⇒ Types::GetAssociatedIpv6PoolCidrsResult

Gets information about the IPv6 CIDR block associations for a specified IPv6 address pool.

Examples:

Request syntax with placeholder values


resp = client.get_associated_ipv_6_pool_cidrs({
  pool_id: "Ipv6PoolEc2Id", # required
  next_token: "NextToken",
  max_results: 1,
  dry_run: false,
})

Response structure


resp.ipv_6_cidr_associations #=> Array
resp.ipv_6_cidr_associations[0].ipv_6_cidr #=> String
resp.ipv_6_cidr_associations[0].associated_resource #=> String
resp.next_token #=> String

Options Hash (options):

  • :pool_id (required, String)

    The ID of the IPv6 address pool.

  • :next_token (String)

    The token for the next page of results.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

See Also:

#get_capacity_reservation_usage(options = {}) ⇒ Types::GetCapacityReservationUsageResult

Gets usage information about a Capacity Reservation. If the Capacity Reservation is shared, it shows usage information for the Capacity Reservation owner and each AWS account that is currently using the shared capacity. If the Capacity Reservation is not shared, it shows only the Capacity Reservation owner's usage.

Examples:

Request syntax with placeholder values


resp = client.get_capacity_reservation_usage({
  capacity_reservation_id: "CapacityReservationId", # required
  next_token: "String",
  max_results: 1,
  dry_run: false,
})

Response structure


resp.next_token #=> String
resp.capacity_reservation_id #=> String
resp.instance_type #=> String
resp.total_instance_count #=> Integer
resp.available_instance_count #=> Integer
resp.state #=> String, one of "active", "expired", "cancelled", "pending", "failed"
resp.instance_usages #=> Array
resp.instance_usages[0]. #=> String
resp.instance_usages[0].used_instance_count #=> Integer

Options Hash (options):

  • :capacity_reservation_id (required, String)

    The ID of the Capacity Reservation.

  • :next_token (String)

    The token to use to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

    Valid range: Minimum value of 1. Maximum value of 1000.

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

See Also:

#get_coip_pool_usage(options = {}) ⇒ Types::GetCoipPoolUsageResult

Describes the allocations from the specified customer-owned address pool.

Examples:

Request syntax with placeholder values


resp = client.get_coip_pool_usage({
  pool_id: "CoipPoolId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.coip_pool_id #=> String
resp.coip_address_usages #=> Array
resp.coip_address_usages[0].allocation_id #=> String
resp.coip_address_usages[0]. #=> String
resp.coip_address_usages[0].aws_service #=> String
resp.coip_address_usages[0].co_ip #=> String
resp.local_gateway_route_table_id #=> String

Options Hash (options):

  • :pool_id (required, String)

    The ID of the address pool.

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

    The filters. The following are the possible values:

    • coip-address-usage.allocation-id

    ^ ^

    • coip-address-usage.aws-account-id

    ^ ^

    • coip-address-usage.aws-service

    ^ ^

    • coip-address-usage.co-ip

    ^

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

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

Gets the console output for the specified instance. For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. For Windows instances, the instance console output includes the last three system event log errors.

By default, the console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, or terminate). This information is available for at least one hour after the most recent post. Only the most recent 64 KB of console output is available.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is supported on instance types that use the Nitro hypervisor.

For more information, see Instance Console Output in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To get the console output


# This example gets the console output for the specified instance.

resp = client.get_console_output({
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
  instance_id: "i-1234567890abcdef0", 
  output: "...", 
  timestamp: Time.parse("2018-05-25T21:23:53.000Z"), 
}

Request syntax with placeholder values


resp = client.get_console_output({
  instance_id: "InstanceId", # required
  dry_run: false,
  latest: false,
})

Response structure


resp.instance_id #=> String
resp.output #=> String
resp.timestamp #=> Time

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance.

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

  • :latest (Boolean)

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

    Default: disabled (false)

Returns:

See Also:

#get_console_screenshot(options = {}) ⇒ Types::GetConsoleScreenshotResult

Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.

The returned content is Base64-encoded.

Examples:

Request syntax with placeholder values


resp = client.get_console_screenshot({
  dry_run: false,
  instance_id: "InstanceId", # required
  wake_up: false,
})

Response structure


resp.image_data #=> String
resp.instance_id #=> String

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.

  • :instance_id (required, String)

    The ID of the instance.

  • :wake_up (Boolean)

    When set to true, acts as keystroke input and wakes up an instance that\'s in standby or \"sleep\" mode.

Returns:

See Also:

#get_default_credit_specification(options = {}) ⇒ Types::GetDefaultCreditSpecificationResult

Describes the default credit option for CPU usage of a burstable performance instance family.

For more information, see Burstable performance instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.get_default_credit_specification({
  dry_run: false,
  instance_family: "t2", # required, accepts t2, t3, t3a, t4g
})

Response structure


resp.instance_family_credit_specification.instance_family #=> String, one of "t2", "t3", "t3a", "t4g"
resp.instance_family_credit_specification.cpu_credits #=> String

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.

  • :instance_family (required, String)

    The instance family.

Returns:

See Also:

#get_ebs_default_kms_key_id(options = {}) ⇒ Types::GetEbsDefaultKmsKeyIdResult

Describes the default customer master key (CMK) for EBS encryption by default for your account in this Region. You can change the default CMK for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.get_ebs_default_kms_key_id({
  dry_run: false,
})

Response structure


resp.kms_key_id #=> String

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.

Returns:

See Also:

#get_ebs_encryption_by_default(options = {}) ⇒ Types::GetEbsEncryptionByDefaultResult

Describes whether EBS encryption by default is enabled for your account in the current Region.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.get_ebs_encryption_by_default({
  dry_run: false,
})

Response structure


resp.ebs_encryption_by_default #=> true/false

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.

Returns:

See Also:

#get_groups_for_capacity_reservation(options = {}) ⇒ Types::GetGroupsForCapacityReservationResult

Lists the resource groups to which a Capacity Reservation has been added.

Examples:

Request syntax with placeholder values


resp = client.get_groups_for_capacity_reservation({
  capacity_reservation_id: "CapacityReservationId", # required
  next_token: "String",
  max_results: 1,
  dry_run: false,
})

Response structure


resp.next_token #=> String
resp.capacity_reservation_groups #=> Array
resp.capacity_reservation_groups[0].group_arn #=> String
resp.capacity_reservation_groups[0].owner_id #=> String

Options Hash (options):

  • :capacity_reservation_id (required, String)

    The ID of the Capacity Reservation.

  • :next_token (String)

    The token to use to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

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

See Also:

#get_host_reservation_purchase_preview(options = {}) ⇒ Types::GetHostReservationPurchasePreviewResult

Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.

This is a preview of the PurchaseHostReservation action and does not result in the offering being purchased.

Examples:

Request syntax with placeholder values


resp = client.get_host_reservation_purchase_preview({
  host_id_set: ["DedicatedHostId"], # required
  offering_id: "OfferingId", # required
})

Response structure


resp.currency_code #=> String, one of "USD"
resp.purchase #=> Array
resp.purchase[0].currency_code #=> String, one of "USD"
resp.purchase[0].duration #=> Integer
resp.purchase[0].host_id_set #=> Array
resp.purchase[0].host_id_set[0] #=> String
resp.purchase[0].host_reservation_id #=> String
resp.purchase[0].hourly_price #=> String
resp.purchase[0].instance_family #=> String
resp.purchase[0].payment_option #=> String, one of "AllUpfront", "PartialUpfront", "NoUpfront"
resp.purchase[0].upfront_price #=> String
resp.total_hourly_price #=> String
resp.total_upfront_price #=> String

Options Hash (options):

  • :host_id_set (required, Array<String>)

    The IDs of the Dedicated Hosts with which the reservation is associated.

  • :offering_id (required, String)

    The offering ID of the reservation.

Returns:

See Also:

#get_launch_template_data(options = {}) ⇒ Types::GetLaunchTemplateDataResult

Retrieves the configuration data of the specified instance. You can use this data to create a launch template.

This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow describe* depending on your instance requirements.

Examples:

Example: To get the launch template data for an instance


# This example gets the launch template data for the specified instance.

resp = client.get_launch_template_data({
  instance_id: "0123d646e8048babc", 
})

# resp.to_h outputs the following:
{
  launch_template_data: {
    block_device_mappings: [
      {
        device_name: "/dev/xvda", 
        ebs: {
          delete_on_termination: true, 
          encrypted: false, 
          iops: 100, 
          snapshot_id: "snap-02594938353ef77d3", 
          volume_size: 8, 
          volume_type: "gp2", 
        }, 
      }, 
    ], 
    ebs_optimized: false, 
    image_id: "ami-32cf7b4a", 
    instance_type: "t2.medium", 
    key_name: "my-key-pair", 
    monitoring: {
      enabled: false, 
    }, 
    network_interfaces: [
      {
        associate_public_ip_address: false, 
        delete_on_termination: true, 
        description: "", 
        device_index: 0, 
        groups: [
          "sg-d14e1bb4", 
        ], 
        ipv_6_addresses: [
        ], 
        network_interface_id: "eni-4338b5a9", 
        private_ip_address: "10.0.3.233", 
        private_ip_addresses: [
          {
            primary: true, 
            private_ip_address: "10.0.3.233", 
          }, 
        ], 
        subnet_id: "subnet-5264e837", 
      }, 
    ], 
    placement: {
      availability_zone: "us-east-2b", 
      group_name: "", 
      tenancy: "default", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.get_launch_template_data({
  dry_run: false,
  instance_id: "InstanceId", # required
})

Response structure


resp.launch_template_data.kernel_id #=> String
resp.launch_template_data.ebs_optimized #=> true/false
resp.launch_template_data.iam_instance_profile.arn #=> String
resp.launch_template_data.iam_instance_profile.name #=> String
resp.launch_template_data.block_device_mappings #=> Array
resp.launch_template_data.block_device_mappings[0].device_name #=> String
resp.launch_template_data.block_device_mappings[0].virtual_name #=> String
resp.launch_template_data.block_device_mappings[0].ebs.encrypted #=> true/false
resp.launch_template_data.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.launch_template_data.block_device_mappings[0].ebs.iops #=> Integer
resp.launch_template_data.block_device_mappings[0].ebs.kms_key_id #=> String
resp.launch_template_data.block_device_mappings[0].ebs.snapshot_id #=> String
resp.launch_template_data.block_device_mappings[0].ebs.volume_size #=> Integer
resp.launch_template_data.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.launch_template_data.block_device_mappings[0].no_device #=> String
resp.launch_template_data.network_interfaces #=> Array
resp.launch_template_data.network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.launch_template_data.network_interfaces[0].associate_public_ip_address #=> true/false
resp.launch_template_data.network_interfaces[0].delete_on_termination #=> true/false
resp.launch_template_data.network_interfaces[0].description #=> String
resp.launch_template_data.network_interfaces[0].device_index #=> Integer
resp.launch_template_data.network_interfaces[0].groups #=> Array
resp.launch_template_data.network_interfaces[0].groups[0] #=> String
resp.launch_template_data.network_interfaces[0].interface_type #=> String
resp.launch_template_data.network_interfaces[0].ipv_6_address_count #=> Integer
resp.launch_template_data.network_interfaces[0].ipv_6_addresses #=> Array
resp.launch_template_data.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.launch_template_data.network_interfaces[0].network_interface_id #=> String
resp.launch_template_data.network_interfaces[0].private_ip_address #=> String
resp.launch_template_data.network_interfaces[0].private_ip_addresses #=> Array
resp.launch_template_data.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.launch_template_data.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.launch_template_data.network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.launch_template_data.network_interfaces[0].subnet_id #=> String
resp.launch_template_data.network_interfaces[0].network_card_index #=> Integer
resp.launch_template_data.image_id #=> String
resp.launch_template_data.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.launch_template_data.key_name #=> String
resp.launch_template_data.monitoring.enabled #=> true/false
resp.launch_template_data.placement.availability_zone #=> String
resp.launch_template_data.placement.affinity #=> String
resp.launch_template_data.placement.group_name #=> String
resp.launch_template_data.placement.host_id #=> String
resp.launch_template_data.placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.launch_template_data.placement.spread_domain #=> String
resp.launch_template_data.placement.host_resource_group_arn #=> String
resp.launch_template_data.placement.partition_number #=> Integer
resp.launch_template_data.ram_disk_id #=> String
resp.launch_template_data.disable_api_termination #=> true/false
resp.launch_template_data.instance_initiated_shutdown_behavior #=> String, one of "stop", "terminate"
resp.launch_template_data.user_data #=> String
resp.launch_template_data.tag_specifications #=> Array
resp.launch_template_data.tag_specifications[0].resource_type #=> String, one of "client-vpn-endpoint", "customer-gateway", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-ip", "elastic-gpu", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "import-image-task", "import-snapshot-task", "instance", "internet-gateway", "key-pair", "launch-template", "local-gateway-route-table-vpc-association", "natgateway", "network-acl", "network-interface", "placement-group", "reserved-instances", "route-table", "security-group", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-multicast-domain", "transit-gateway-route-table", "volume", "vpc", "vpc-peering-connection", "vpn-connection", "vpn-gateway", "vpc-flow-log"
resp.launch_template_data.tag_specifications[0].tags #=> Array
resp.launch_template_data.tag_specifications[0].tags[0].key #=> String
resp.launch_template_data.tag_specifications[0].tags[0].value #=> String
resp.launch_template_data.elastic_gpu_specifications #=> Array
resp.launch_template_data.elastic_gpu_specifications[0].type #=> String
resp.launch_template_data.elastic_inference_accelerators #=> Array
resp.launch_template_data.elastic_inference_accelerators[0].type #=> String
resp.launch_template_data.elastic_inference_accelerators[0].count #=> Integer
resp.launch_template_data.security_group_ids #=> Array
resp.launch_template_data.security_group_ids[0] #=> String
resp.launch_template_data.security_groups #=> Array
resp.launch_template_data.security_groups[0] #=> String
resp.launch_template_data.instance_market_options.market_type #=> String, one of "spot"
resp.launch_template_data.instance_market_options.spot_options.max_price #=> String
resp.launch_template_data.instance_market_options.spot_options.spot_instance_type #=> String, one of "one-time", "persistent"
resp.launch_template_data.instance_market_options.spot_options.block_duration_minutes #=> Integer
resp.launch_template_data.instance_market_options.spot_options.valid_until #=> Time
resp.launch_template_data.instance_market_options.spot_options.instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"
resp.launch_template_data.credit_specification.cpu_credits #=> String
resp.launch_template_data.cpu_options.core_count #=> Integer
resp.launch_template_data.cpu_options.threads_per_core #=> Integer
resp.launch_template_data.capacity_reservation_specification.capacity_reservation_preference #=> String, one of "open", "none"
resp.launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_id #=> String
resp.launch_template_data.capacity_reservation_specification.capacity_reservation_target.capacity_reservation_resource_group_arn #=> String
resp.launch_template_data.license_specifications #=> Array
resp.launch_template_data.license_specifications[0].license_configuration_arn #=> String
resp.launch_template_data.hibernation_options.configured #=> true/false
resp.launch_template_data..state #=> String, one of "pending", "applied"
resp.launch_template_data..http_tokens #=> String, one of "optional", "required"
resp.launch_template_data..http_put_response_hop_limit #=> Integer
resp.launch_template_data..http_endpoint #=> String, one of "disabled", "enabled"
resp.launch_template_data.enclave_options.enabled #=> true/false

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.

  • :instance_id (required, String)

    The ID of the instance.

Returns:

See Also:

#get_managed_prefix_list_associations(options = {}) ⇒ Types::GetManagedPrefixListAssociationsResult

Gets information about the resources that are associated with the specified managed prefix list.

Examples:

Request syntax with placeholder values


resp = client.get_managed_prefix_list_associations({
  dry_run: false,
  prefix_list_id: "PrefixListResourceId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.prefix_list_associations #=> Array
resp.prefix_list_associations[0].resource_id #=> String
resp.prefix_list_associations[0].resource_owner #=> String
resp.next_token #=> String

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.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

#get_managed_prefix_list_entries(options = {}) ⇒ Types::GetManagedPrefixListEntriesResult

Gets information about the entries for a specified managed prefix list.

Examples:

Request syntax with placeholder values


resp = client.get_managed_prefix_list_entries({
  dry_run: false,
  prefix_list_id: "PrefixListResourceId", # required
  target_version: 1,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.entries #=> Array
resp.entries[0].cidr #=> String
resp.entries[0].description #=> String
resp.next_token #=> String

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.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

  • :target_version (Integer)

    The version of the prefix list for which to return the entries. The default is the current version.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

Returns:

See Also:

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

Retrieves the encrypted administrator password for a running Windows instance.

The Windows password is generated at boot by the EC2Config service or EC2Launch scripts (Windows Server 2016 and later). This usually only happens the first time an instance is launched. For more information, see EC2Config and EC2Launch in the Amazon Elastic Compute Cloud User Guide.

For the EC2Config service, the password is not generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling.

The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

When you launch an instance, password generation and encryption may take a few minutes. If you try to retrieve the password before it's available, the output returns an empty string. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

Examples:

Request syntax with placeholder values


resp = client.get_password_data({
  instance_id: "InstanceId", # required
  dry_run: false,
})

Response structure


resp.instance_id #=> String
resp.password_data #=> String
resp.timestamp #=> Time

Options Hash (options):

  • :instance_id (required, String)

    The ID of the Windows instance.

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

See Also:

#get_reserved_instances_exchange_quote(options = {}) ⇒ Types::GetReservedInstancesExchangeQuoteResult

Returns a quote and exchange information for exchanging one or more specified Convertible Reserved Instances for a new Convertible Reserved Instance. If the exchange cannot be performed, the reason is returned in the response. Use AcceptReservedInstancesExchangeQuote to perform the exchange.

Examples:

Request syntax with placeholder values


resp = client.get_reserved_instances_exchange_quote({
  dry_run: false,
  reserved_instance_ids: ["ReservationId"], # required
  target_configurations: [
    {
      instance_count: 1,
      offering_id: "ReservedInstancesOfferingId", # required
    },
  ],
})

Response structure


resp.currency_code #=> String
resp.is_valid_exchange #=> true/false
resp.output_reserved_instances_will_expire_at #=> Time
resp.payment_due #=> String
resp.reserved_instance_value_rollup.hourly_price #=> String
resp.reserved_instance_value_rollup.remaining_total_value #=> String
resp.reserved_instance_value_rollup.remaining_upfront_value #=> String
resp.reserved_instance_value_set #=> Array
resp.reserved_instance_value_set[0].reservation_value.hourly_price #=> String
resp.reserved_instance_value_set[0].reservation_value.remaining_total_value #=> String
resp.reserved_instance_value_set[0].reservation_value.remaining_upfront_value #=> String
resp.reserved_instance_value_set[0].reserved_instance_id #=> String
resp.target_configuration_value_rollup.hourly_price #=> String
resp.target_configuration_value_rollup.remaining_total_value #=> String
resp.target_configuration_value_rollup.remaining_upfront_value #=> String
resp.target_configuration_value_set #=> Array
resp.target_configuration_value_set[0].reservation_value.hourly_price #=> String
resp.target_configuration_value_set[0].reservation_value.remaining_total_value #=> String
resp.target_configuration_value_set[0].reservation_value.remaining_upfront_value #=> String
resp.target_configuration_value_set[0].target_configuration.instance_count #=> Integer
resp.target_configuration_value_set[0].target_configuration.offering_id #=> String
resp.validation_failure_reason #=> String

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.

  • :reserved_instance_ids (required, Array<String>)

    The IDs of the Convertible Reserved Instances to exchange.

  • :target_configurations (Array<Types::TargetConfigurationRequest>)

    The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

Returns:

See Also:

#get_transit_gateway_attachment_propagations(options = {}) ⇒ Types::GetTransitGatewayAttachmentPropagationsResult

Lists the route tables to which the specified resource attachment propagates routes.

Examples:

Request syntax with placeholder values


resp = client.get_transit_gateway_attachment_propagations({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_attachment_propagations #=> Array
resp.transit_gateway_attachment_propagations[0].transit_gateway_route_table_id #=> String
resp.transit_gateway_attachment_propagations[0].state #=> String, one of "enabling", "enabled", "disabling", "disabled"
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

    One or more filters. The possible values are:

    • transit-gateway-route-table-id - The ID of the transit gateway route table.

    ^

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#get_transit_gateway_multicast_domain_associations(options = {}) ⇒ Types::GetTransitGatewayMulticastDomainAssociationsResult

Gets information about the associations for the transit gateway multicast domain.

Examples:

Request syntax with placeholder values


resp = client.get_transit_gateway_multicast_domain_associations({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.multicast_domain_associations #=> Array
resp.multicast_domain_associations[0].transit_gateway_attachment_id #=> String
resp.multicast_domain_associations[0].resource_id #=> String
resp.multicast_domain_associations[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.multicast_domain_associations[0].subnet.subnet_id #=> String
resp.multicast_domain_associations[0].subnet.state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

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

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.

    • resource-type - The type of resource. The valid value is: vpc.

    • state - The state of the subnet association. Valid values are associated | associating | disassociated | disassociating.

    • subnet-id - The ID of the subnet.

    • transit-gateway-attachment-id - The id of the transit gateway attachment.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#get_transit_gateway_prefix_list_references(options = {}) ⇒ Types::GetTransitGatewayPrefixListReferencesResult

Gets information about the prefix list references in a specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.get_transit_gateway_prefix_list_references({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_prefix_list_references #=> Array
resp.transit_gateway_prefix_list_references[0].transit_gateway_route_table_id #=> String
resp.transit_gateway_prefix_list_references[0].prefix_list_id #=> String
resp.transit_gateway_prefix_list_references[0].prefix_list_owner_id #=> String
resp.transit_gateway_prefix_list_references[0].state #=> String, one of "pending", "available", "modifying", "deleting"
resp.transit_gateway_prefix_list_references[0].blackhole #=> true/false
resp.transit_gateway_prefix_list_references[0].transit_gateway_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_prefix_list_references[0].transit_gateway_attachment.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_prefix_list_references[0].transit_gateway_attachment.resource_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

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

    One or more filters. The possible values are:

    • attachment.resource-id - The ID of the resource for the attachment.

    • attachment.resource-type - The type of resource for the attachment. Valid values are vpc | vpn | direct-connect-gateway | peering.

    • attachment.transit-gateway-attachment-id - The ID of the attachment.

    • is-blackhole - Whether traffic matching the route is blocked (true | false).

    • prefix-list-id - The ID of the prefix list.

    • prefix-list-owner-id - The ID of the owner of the prefix list.

    • state - The state of the prefix list reference (pending | available | modifying | deleting).

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#get_transit_gateway_route_table_associations(options = {}) ⇒ Types::GetTransitGatewayRouteTableAssociationsResult

Gets information about the associations for the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.get_transit_gateway_route_table_associations({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.associations #=> Array
resp.associations[0].transit_gateway_attachment_id #=> String
resp.associations[0].resource_id #=> String
resp.associations[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.associations[0].state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

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

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.

    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering.

    • transit-gateway-attachment-id - The ID of the attachment.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#get_transit_gateway_route_table_propagations(options = {}) ⇒ Types::GetTransitGatewayRouteTablePropagationsResult

Gets information about the route table propagations for the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.get_transit_gateway_route_table_propagations({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.transit_gateway_route_table_propagations #=> Array
resp.transit_gateway_route_table_propagations[0].transit_gateway_attachment_id #=> String
resp.transit_gateway_route_table_propagations[0].resource_id #=> String
resp.transit_gateway_route_table_propagations[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_route_table_propagations[0].state #=> String, one of "enabling", "enabled", "disabling", "disabled"
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

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

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.

    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering.

    • transit-gateway-attachment-id - The ID of the attachment.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#import_client_vpn_client_certificate_revocation_list(options = {}) ⇒ Types::ImportClientVpnClientCertificateRevocationListResult

Uploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list.

Uploading a client certificate revocation list resets existing client connections.

Examples:

Request syntax with placeholder values


resp = client.import_client_vpn_client_certificate_revocation_list({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  certificate_revocation_list: "String", # required
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint to which the client certificate revocation list applies.

  • :certificate_revocation_list (required, String)

    The client certificate revocation list file. For more information, see Generate a Client Certificate Revocation List in the AWS Client VPN Administrator Guide.

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

See Also:

#import_image(options = {}) ⇒ Types::ImportImageResult

Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see Importing a VM as an Image Using VM Import/Export in the VM Import/Export User Guide.

Examples:

Request syntax with placeholder values


resp = client.import_image({
  architecture: "String",
  client_data: {
    comment: "String",
    upload_end: Time.now,
    upload_size: 1.0,
    upload_start: Time.now,
  },
  client_token: "String",
  description: "String",
  disk_containers: [
    {
      description: "String",
      device_name: "String",
      format: "String",
      snapshot_id: "SnapshotId",
      url: "String",
      user_bucket: {
        s3_bucket: "String",
        s3_key: "String",
      },
    },
  ],
  dry_run: false,
  encrypted: false,
  hypervisor: "String",
  kms_key_id: "KmsKeyId",
  license_type: "String",
  platform: "String",
  role_name: "String",
  license_specifications: [
    {
      license_configuration_arn: "String",
    },
  ],
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.architecture #=> String
resp.description #=> String
resp.encrypted #=> true/false
resp.hypervisor #=> String
resp.image_id #=> String
resp.import_task_id #=> String
resp.kms_key_id #=> String
resp.license_type #=> String
resp.platform #=> String
resp.progress #=> String
resp.snapshot_details #=> Array
resp.snapshot_details[0].description #=> String
resp.snapshot_details[0].device_name #=> String
resp.snapshot_details[0].disk_image_size #=> Float
resp.snapshot_details[0].format #=> String
resp.snapshot_details[0].progress #=> String
resp.snapshot_details[0].snapshot_id #=> String
resp.snapshot_details[0].status #=> String
resp.snapshot_details[0].status_message #=> String
resp.snapshot_details[0].url #=> String
resp.snapshot_details[0].user_bucket.s3_bucket #=> String
resp.snapshot_details[0].user_bucket.s3_key #=> String
resp.status #=> String
resp.status_message #=> String
resp.license_specifications #=> Array
resp.license_specifications[0].license_configuration_arn #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :architecture (String)

    The architecture of the virtual machine.

    Valid values: i386 | x86_64 | arm64

  • :client_data (Types::ClientData)

    The client-specific data.

  • :client_token (String)

    The token to enable idempotency for VM import requests.

  • :description (String)

    A description string for the import image task.

  • :disk_containers (Array<Types::ImageDiskContainer>)

    Information about the disk containers.

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

  • :encrypted (Boolean)

    Specifies whether the destination AMI of the imported image should be encrypted. The default CMK for EBS is used unless you specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

  • :hypervisor (String)

    The target hypervisor platform.

    Valid values: xen

  • :kms_key_id (String)

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

    The CMK identifier may be provided in any of the following formats:

    • Key ID

    • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

    • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

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

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

    Amazon EBS does not support asymmetric CMKs.

  • :license_type (String)

    The license type to be used for the Amazon Machine Image (AMI) after importing.

    By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify AWS to replace the source-system license with an AWS license, if appropriate. Specify BYOL to retain the source-system license, if appropriate.

    To use BYOL, you must have existing licenses with rights to use these licenses in a third party cloud, such as AWS. For more information, see Prerequisites in the VM Import/Export User Guide.

  • :platform (String)

    The operating system of the virtual machine.

    Valid values: Windows | Linux

  • :role_name (String)

    The name of the role to use when not using the default role, \'vmimport\'.

  • :license_specifications (Array<Types::ImportImageLicenseConfigurationRequest>)

    The ARNs of the license configurations.

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

    The tags to apply to the image being imported.

Returns:

See Also:

#import_instance(options = {}) ⇒ Types::ImportInstanceResult

Creates an import instance task using metadata from the specified disk image. ImportInstance only supports single-volume VMs. To import multi-volume VMs, use ImportImage. For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Examples:

Request syntax with placeholder values


resp = client.import_instance({
  description: "String",
  disk_images: [
    {
      description: "String",
      image: {
        bytes: 1, # required
        format: "VMDK", # required, accepts VMDK, RAW, VHD
        import_manifest_url: "String", # required
      },
      volume: {
        size: 1, # required
      },
    },
  ],
  dry_run: false,
  launch_specification: {
    additional_info: "String",
    architecture: "i386", # accepts i386, x86_64, arm64
    group_ids: ["SecurityGroupId"],
    group_names: ["SecurityGroupName"],
    instance_initiated_shutdown_behavior: "stop", # accepts stop, terminate
    instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
    monitoring: false,
    placement: {
      availability_zone: "String",
      affinity: "String",
      group_name: "String",
      partition_number: 1,
      host_id: "String",
      tenancy: "default", # accepts default, dedicated, host
      spread_domain: "String",
      host_resource_group_arn: "String",
    },
    private_ip_address: "String",
    subnet_id: "SubnetId",
    user_data: {
      data: "String",
    },
  },
  platform: "Windows", # required, accepts Windows
})

Response structure


resp.conversion_task.conversion_task_id #=> String
resp.conversion_task.expiration_time #=> String
resp.conversion_task.import_instance.description #=> String
resp.conversion_task.import_instance.instance_id #=> String
resp.conversion_task.import_instance.platform #=> String, one of "Windows"
resp.conversion_task.import_instance.volumes #=> Array
resp.conversion_task.import_instance.volumes[0].availability_zone #=> String
resp.conversion_task.import_instance.volumes[0].bytes_converted #=> Integer
resp.conversion_task.import_instance.volumes[0].description #=> String
resp.conversion_task.import_instance.volumes[0].image.checksum #=> String
resp.conversion_task.import_instance.volumes[0].image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_task.import_instance.volumes[0].image.import_manifest_url #=> String
resp.conversion_task.import_instance.volumes[0].image.size #=> Integer
resp.conversion_task.import_instance.volumes[0].status #=> String
resp.conversion_task.import_instance.volumes[0].status_message #=> String
resp.conversion_task.import_instance.volumes[0].volume.id #=> String
resp.conversion_task.import_instance.volumes[0].volume.size #=> Integer
resp.conversion_task.import_volume.availability_zone #=> String
resp.conversion_task.import_volume.bytes_converted #=> Integer
resp.conversion_task.import_volume.description #=> String
resp.conversion_task.import_volume.image.checksum #=> String
resp.conversion_task.import_volume.image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_task.import_volume.image.import_manifest_url #=> String
resp.conversion_task.import_volume.image.size #=> Integer
resp.conversion_task.import_volume.volume.id #=> String
resp.conversion_task.import_volume.volume.size #=> Integer
resp.conversion_task.state #=> String, one of "active", "cancelling", "cancelled", "completed"
resp.conversion_task.status_message #=> String
resp.conversion_task.tags #=> Array
resp.conversion_task.tags[0].key #=> String
resp.conversion_task.tags[0].value #=> String

Options Hash (options):

  • :description (String)

    A description for the instance being imported.

  • :disk_images (Array<Types::DiskImage>)

    The disk image.

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

  • :launch_specification (Types::ImportInstanceLaunchSpecification)

    The launch specification.

  • :platform (required, String)

    The instance operating system.

Returns:

See Also:

#import_key_pair(options = {}) ⇒ Types::ImportKeyPairResult

Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.

For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.import_key_pair({
  dry_run: false,
  key_name: "String", # required
  public_key_material: "data", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.key_fingerprint #=> String
resp.key_name #=> String
resp.key_pair_id #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

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.

  • :key_name (required, String)

    A unique name for the key pair.

  • :public_key_material (required, IO, String)

    The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

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

    The tags to apply to the imported key pair.

Returns:

See Also:

#import_snapshot(options = {}) ⇒ Types::ImportSnapshotResult

Imports a disk into an EBS snapshot.

Examples:

Request syntax with placeholder values


resp = client.import_snapshot({
  client_data: {
    comment: "String",
    upload_end: Time.now,
    upload_size: 1.0,
    upload_start: Time.now,
  },
  client_token: "String",
  description: "String",
  disk_container: {
    description: "String",
    format: "String",
    url: "String",
    user_bucket: {
      s3_bucket: "String",
      s3_key: "String",
    },
  },
  dry_run: false,
  encrypted: false,
  kms_key_id: "KmsKeyId",
  role_name: "String",
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.description #=> String
resp.import_task_id #=> String
resp.snapshot_task_detail.description #=> String
resp.snapshot_task_detail.disk_image_size #=> Float
resp.snapshot_task_detail.encrypted #=> true/false
resp.snapshot_task_detail.format #=> String
resp.snapshot_task_detail.kms_key_id #=> String
resp.snapshot_task_detail.progress #=> String
resp.snapshot_task_detail.snapshot_id #=> String
resp.snapshot_task_detail.status #=> String
resp.snapshot_task_detail.status_message #=> String
resp.snapshot_task_detail.url #=> String
resp.snapshot_task_detail.user_bucket.s3_bucket #=> String
resp.snapshot_task_detail.user_bucket.s3_key #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :client_data (Types::ClientData)

    The client-specific data.

  • :client_token (String)

    Token to enable idempotency for VM import requests.

  • :description (String)

    The description string for the import snapshot task.

  • :disk_container (Types::SnapshotDiskContainer)

    Information about the disk container.

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

  • :encrypted (Boolean)

    Specifies whether the destination snapshot of the imported image should be encrypted. The default CMK for EBS is used unless you specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

  • :kms_key_id (String)

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

    The CMK identifier may be provided in any of the following formats:

    • Key ID

    • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.

    • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the CMK, the AWS account ID of the CMK owner, the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

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

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

    Amazon EBS does not support asymmetric CMKs.

  • :role_name (String)

    The name of the role to use when not using the default role, \'vmimport\'.

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

    The tags to apply to the snapshot being imported.

Returns:

See Also:

#import_volume(options = {}) ⇒ Types::ImportVolumeResult

Creates an import volume task using metadata from the specified disk image.For more information, see Importing Disks to Amazon EBS.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Examples:

Request syntax with placeholder values


resp = client.import_volume({
  availability_zone: "String", # required
  description: "String",
  dry_run: false,
  image: { # required
    bytes: 1, # required
    format: "VMDK", # required, accepts VMDK, RAW, VHD
    import_manifest_url: "String", # required
  },
  volume: { # required
    size: 1, # required
  },
})

Response structure


resp.conversion_task.conversion_task_id #=> String
resp.conversion_task.expiration_time #=> String
resp.conversion_task.import_instance.description #=> String
resp.conversion_task.import_instance.instance_id #=> String
resp.conversion_task.import_instance.platform #=> String, one of "Windows"
resp.conversion_task.import_instance.volumes #=> Array
resp.conversion_task.import_instance.volumes[0].availability_zone #=> String
resp.conversion_task.import_instance.volumes[0].bytes_converted #=> Integer
resp.conversion_task.import_instance.volumes[0].description #=> String
resp.conversion_task.import_instance.volumes[0].image.checksum #=> String
resp.conversion_task.import_instance.volumes[0].image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_task.import_instance.volumes[0].image.import_manifest_url #=> String
resp.conversion_task.import_instance.volumes[0].image.size #=> Integer
resp.conversion_task.import_instance.volumes[0].status #=> String
resp.conversion_task.import_instance.volumes[0].status_message #=> String
resp.conversion_task.import_instance.volumes[0].volume.id #=> String
resp.conversion_task.import_instance.volumes[0].volume.size #=> Integer
resp.conversion_task.import_volume.availability_zone #=> String
resp.conversion_task.import_volume.bytes_converted #=> Integer
resp.conversion_task.import_volume.description #=> String
resp.conversion_task.import_volume.image.checksum #=> String
resp.conversion_task.import_volume.image.format #=> String, one of "VMDK", "RAW", "VHD"
resp.conversion_task.import_volume.image.import_manifest_url #=> String
resp.conversion_task.import_volume.image.size #=> Integer
resp.conversion_task.import_volume.volume.id #=> String
resp.conversion_task.import_volume.volume.size #=> Integer
resp.conversion_task.state #=> String, one of "active", "cancelling", "cancelled", "completed"
resp.conversion_task.status_message #=> String
resp.conversion_task.tags #=> Array
resp.conversion_task.tags[0].key #=> String
resp.conversion_task.tags[0].value #=> String

Options Hash (options):

  • :availability_zone (required, String)

    The Availability Zone for the resulting EBS volume.

  • :description (String)

    A description 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.

  • :image (required, Types::DiskImageDetail)

    The disk image.

  • :volume (required, Types::VolumeDetail)

    The volume size.

Returns:

See Also:

#modify_availability_zone_group(options = {}) ⇒ Types::ModifyAvailabilityZoneGroupResult

Changes the opt-in status of the Local Zone and Wavelength Zone group for your account.

Use DescribeAvailabilityZones to view the value for GroupName.

Examples:

Request syntax with placeholder values


resp = client.modify_availability_zone_group({
  group_name: "String", # required
  opt_in_status: "opted-in", # required, accepts opted-in, not-opted-in
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :group_name (required, String)

    The name of the Availability Zone group, Local Zone group, or Wavelength Zone group.

  • :opt_in_status (required, String)

    Indicates whether you are opted in to the Local Zone group or Wavelength Zone group. The only valid value is opted-in. You must contact AWS Support to opt out of a Local Zone group, or Wavelength Zone group.

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

See Also:

#modify_capacity_reservation(options = {}) ⇒ Types::ModifyCapacityReservationResult

Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.

Examples:

Request syntax with placeholder values


resp = client.modify_capacity_reservation({
  capacity_reservation_id: "CapacityReservationId", # required
  instance_count: 1,
  end_date: Time.now,
  end_date_type: "unlimited", # accepts unlimited, limited
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :capacity_reservation_id (required, String)

    The ID of the Capacity Reservation.

  • :instance_count (Integer)

    The number of instances for which to reserve capacity.

  • :end_date (Time)

    The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation\'s state changes to expired when it reaches its end date and time.

    The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

    You must provide an EndDate value if EndDateType is limited. Omit EndDate if EndDateType is unlimited.

  • :end_date_type (String)

    Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

    • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate value if EndDateType is unlimited.

    • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

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

See Also:

#modify_client_vpn_endpoint(options = {}) ⇒ Types::ModifyClientVpnEndpointResult

Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.

Examples:

Request syntax with placeholder values


resp = client.modify_client_vpn_endpoint({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  server_certificate_arn: "String",
  connection_log_options: {
    enabled: false,
    cloudwatch_log_group: "String",
    cloudwatch_log_stream: "String",
  },
  dns_servers: {
    custom_dns_servers: ["String"],
    enabled: false,
  },
  vpn_port: 1,
  description: "String",
  split_tunnel: false,
  dry_run: false,
  security_group_ids: ["SecurityGroupId"],
  vpc_id: "VpcId",
  self_service_portal: "enabled", # accepts enabled, disabled
  client_connect_options: {
    enabled: false,
    lambda_function_arn: "String",
  },
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint to modify.

  • :server_certificate_arn (String)

    The ARN of the server certificate to be used. The server certificate must be provisioned in AWS Certificate Manager (ACM).

  • :connection_log_options (Types::ConnectionLogOptions)

    Information about the client connection logging options.

    If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

    • Client connection requests

    • Client connection results (successful and unsuccessful)

    • Reasons for unsuccessful client connection requests

    • Client connection termination time

  • :dns_servers (Types::DnsServersOptionsModifyStructure)

    Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.

  • :vpn_port (Integer)

    The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

    Valid Values: 443 | 1194

    Default Value: 443

  • :description (String)

    A brief description of the Client VPN endpoint.

  • :split_tunnel (Boolean)

    Indicates whether the VPN is split-tunnel.

    For information about split-tunnel VPN endpoints, see Split-Tunnel AWS Client VPN Endpoint in the AWS Client VPN Administrator Guide.

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

  • :security_group_ids (Array<String>)

    The IDs of one or more security groups to apply to the target network.

  • :vpc_id (String)

    The ID of the VPC to associate with the Client VPN endpoint.

  • :self_service_portal (String)

    Specify whether to enable the self-service portal for the Client VPN endpoint.

  • :client_connect_options (Types::ClientConnectOptions)

    The options for managing connection authorization for new client connections.

Returns:

See Also:

#modify_default_credit_specification(options = {}) ⇒ Types::ModifyDefaultCreditSpecificationResult

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per AWS Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

ModifyDefaultCreditSpecification is an asynchronous operation, which works at an AWS Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call GetDefaultCreditSpecification and check DefaultCreditSpecification for updates.

For more information, see Burstable performance instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_default_credit_specification({
  dry_run: false,
  instance_family: "t2", # required, accepts t2, t3, t3a, t4g
  cpu_credits: "String", # required
})

Response structure


resp.instance_family_credit_specification.instance_family #=> String, one of "t2", "t3", "t3a", "t4g"
resp.instance_family_credit_specification.cpu_credits #=> String

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.

  • :instance_family (required, String)

    The instance family.

  • :cpu_credits (required, String)

    The credit option for CPU usage of the instance family.

    Valid Values: standard | unlimited

Returns:

See Also:

#modify_ebs_default_kms_key_id(options = {}) ⇒ Types::ModifyEbsDefaultKmsKeyIdResult

Changes the default customer master key (CMK) for EBS encryption by default for your account in this Region.

AWS creates a unique AWS managed CMK in each Region for use with encryption by default. If you change the default CMK to a symmetric customer managed CMK, it is used instead of the AWS managed CMK. To reset the default CMK to the AWS managed CMK for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does not support asymmetric CMKs.

If you delete or disable the customer managed CMK that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_ebs_default_kms_key_id({
  kms_key_id: "KmsKeyId", # required
  dry_run: false,
})

Response structure


resp.kms_key_id #=> String

Options Hash (options):

  • :kms_key_id (required, String)

    The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.

    You can specify the CMK using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.

    • Key alias. For example, alias/ExampleAlias.

    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

    Amazon EBS does not support asymmetric CMKs.

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

See Also:

#modify_fleet(options = {}) ⇒ Types::ModifyFleetResult

Modifies the specified EC2 Fleet.

You can only modify an EC2 Fleet request of type maintain.

While the EC2 Fleet is being modified, it is in the modifying state.

To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation strategy is lowest-price, the EC2 Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified, the EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacity-optimized, EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowest-price, the EC2 Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacity-optimized, the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified, the EC2 Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your EC2 Fleet for now, but will use it again later, you can set the target capacity to 0.

Examples:

Request syntax with placeholder values


resp = client.modify_fleet({
  dry_run: false,
  excess_capacity_termination_policy: "no-termination", # accepts no-termination, termination
  launch_template_configs: [
    {
      launch_template_specification: {
        launch_template_id: "LaunchTemplateId",
        launch_template_name: "LaunchTemplateName",
        version: "String",
      },
      overrides: [
        {
          instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
          max_price: "String",
          subnet_id: "SubnetId",
          availability_zone: "String",
          weighted_capacity: 1.0,
          priority: 1.0,
          placement: {
            availability_zone: "String",
            affinity: "String",
            group_name: "String",
            partition_number: 1,
            host_id: "String",
            tenancy: "default", # accepts default, dedicated, host
            spread_domain: "String",
            host_resource_group_arn: "String",
          },
        },
      ],
    },
  ],
  fleet_id: "FleetId", # required
  target_capacity_specification: {
    total_target_capacity: 1, # required
    on_demand_target_capacity: 1,
    spot_target_capacity: 1,
    default_target_capacity_type: "spot", # accepts spot, on-demand
  },
})

Response structure


resp.return #=> true/false

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.

  • :excess_capacity_termination_policy (String)

    Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

  • :launch_template_configs (Array<Types::FleetLaunchTemplateConfigRequest>)

    The launch template and overrides.

  • :fleet_id (required, String)

    The ID of the EC2 Fleet.

  • :target_capacity_specification (Types::TargetCapacitySpecificationRequest)

    The size of the EC2 Fleet.

Returns:

See Also:

#modify_fpga_image_attribute(options = {}) ⇒ Types::ModifyFpgaImageAttributeResult

Modifies the specified attribute of the specified Amazon FPGA Image (AFI).

Examples:

Request syntax with placeholder values


resp = client.modify_fpga_image_attribute({
  dry_run: false,
  fpga_image_id: "FpgaImageId", # required
  attribute: "description", # accepts description, name, loadPermission, productCodes
  operation_type: "add", # accepts add, remove
  user_ids: ["String"],
  user_groups: ["String"],
  product_codes: ["String"],
  load_permission: {
    add: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
    remove: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
  },
  description: "String",
  name: "String",
})

Response structure


resp.fpga_image_attribute.fpga_image_id #=> String
resp.fpga_image_attribute.name #=> String
resp.fpga_image_attribute.description #=> String
resp.fpga_image_attribute.load_permissions #=> Array
resp.fpga_image_attribute.load_permissions[0].user_id #=> String
resp.fpga_image_attribute.load_permissions[0].group #=> String, one of "all"
resp.fpga_image_attribute.product_codes #=> Array
resp.fpga_image_attribute.product_codes[0].product_code_id #=> String
resp.fpga_image_attribute.product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"

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.

  • :fpga_image_id (required, String)

    The ID of the AFI.

  • :attribute (String)

    The name of the attribute.

  • :operation_type (String)

    The operation type.

  • :user_ids (Array<String>)

    The AWS account IDs. This parameter is valid only when modifying the loadPermission attribute.

  • :user_groups (Array<String>)

    The user groups. This parameter is valid only when modifying the loadPermission attribute.

  • :product_codes (Array<String>)

    The product codes. After you add a product code to an AFI, it can\'t be removed. This parameter is valid only when modifying the productCodes attribute.

  • :load_permission (Types::LoadPermissionModifications)

    The load permission for the AFI.

  • :description (String)

    A description for the AFI.

  • :name (String)

    A name for the AFI.

Returns:

See Also:

#modify_hosts(options = {}) ⇒ Types::ModifyHostsResult

Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, any instances that you launch with a tenancy of host but without a specific host ID are placed onto any available Dedicated Host in your account that has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID to have the instance launch onto a specific host. If no host ID is provided, the instance is launched onto a suitable host with auto-placement enabled.

You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.

Examples:

Request syntax with placeholder values


resp = client.modify_hosts({
  auto_placement: "on", # accepts on, off
  host_ids: ["DedicatedHostId"], # required
  host_recovery: "on", # accepts on, off
  instance_type: "String",
  instance_family: "String",
})

Response structure


resp.successful #=> Array
resp.successful[0] #=> String
resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

Options Hash (options):

  • :auto_placement (String)

    Specify whether to enable or disable auto-placement.

  • :host_ids (required, Array<String>)

    The IDs of the Dedicated Hosts to modify.

  • :host_recovery (String)

    Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host Recovery in the Amazon Elastic Compute Cloud User Guide.

  • :instance_type (String)

    Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

    If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

  • :instance_family (String)

    Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

    If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

Returns:

See Also:

#modify_id_format(options = {}) ⇒ Struct

Modifies the ID format for the specified resource on a per-Region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Examples:

Request syntax with placeholder values


resp = client.modify_id_format({
  resource: "String", # required
  use_long_ids: false, # required
})

Options Hash (options):

  • :resource (required, String)

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

    Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

  • :use_long_ids (required, Boolean)

    Indicate whether the resource should use longer IDs (17-character IDs).

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_identity_id_format(options = {}) ⇒ Struct

Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide.

This setting applies to the principal specified in the request; it does not apply to the principal that makes the request.

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

Examples:

Request syntax with placeholder values


resp = client.modify_identity_id_format({
  principal_arn: "String", # required
  resource: "String", # required
  use_long_ids: false, # required
})

Options Hash (options):

  • :principal_arn (required, String)

    The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify all to modify the ID format for all IAM users, IAM roles, and the root user of the account.

  • :resource (required, String)

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway.

    Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

  • :use_long_ids (required, Boolean)

    Indicates whether the resource should use longer IDs (17-character IDs)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_image_attribute(options = {}) ⇒ Struct

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute parameter to specify the attribute or one of the following parameters: Description, LaunchPermission, or ProductCode.

AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.

To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.

Examples:

Example: To make an AMI public


# This example makes the specified AMI public.

resp = client.modify_image_attribute({
  image_id: "ami-5731123e", 
  launch_permission: {
    add: [
      {
        group: "all", 
      }, 
    ], 
  }, 
})

# resp.to_h outputs the following:
{
}

Example: To grant launch permissions


# This example grants launch permissions for the specified AMI to the specified AWS account.

resp = client.modify_image_attribute({
  image_id: "ami-5731123e", 
  launch_permission: {
    add: [
      {
        user_id: "123456789012", 
      }, 
    ], 
  }, 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.modify_image_attribute({
  attribute: "String",
  description: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  image_id: "ImageId", # required
  launch_permission: {
    add: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
    remove: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
  },
  operation_type: "add", # accepts add, remove
  product_codes: ["String"],
  user_groups: ["String"],
  user_ids: ["String"],
  value: "String",
  dry_run: false,
})

Options Hash (options):

  • :attribute (String)

    The name of the attribute to modify. The valid values are description, launchPermission, and productCodes.

  • :description (Types::AttributeValue)

    A new description for the AMI.

  • :image_id (required, String)

    The ID of the AMI.

  • :launch_permission (Types::LaunchPermissionModifications)

    A new launch permission for the AMI.

  • :operation_type (String)

    The operation type. This parameter can be used only when the Attribute parameter is launchPermission.

  • :product_codes (Array<String>)

    The DevPay product codes. After you add a product code to an AMI, it can\'t be removed.

  • :user_groups (Array<String>)

    The user groups. This parameter can be used only when the Attribute parameter is launchPermission.

  • :user_ids (Array<String>)

    The AWS account IDs. This parameter can be used only when the Attribute parameter is launchPermission.

  • :value (String)

    The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description or productCodes.

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

  • (Struct)

    Returns an empty response.

See Also:

#modify_instance_attribute(options = {}) ⇒ Struct

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance in a VPC can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action.

To modify some attributes, the instance must be stopped. For more information, see Modifying attributes of a stopped instance in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To modify the instance type


# This example modifies the instance type of the specified stopped instance.

resp = client.modify_instance_attribute({
  instance_id: "i-1234567890abcdef0", 
  instance_type: {
    value: "m5.large", 
  }, 
})

# resp.to_h outputs the following:
{
}

Example: To enable enhanced networking


# This example enables enhanced networking for the specified stopped instance.

resp = client.modify_instance_attribute({
  ena_support: {
    value: true, 
  }, 
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.modify_instance_attribute({
  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",
})

Options Hash (options):

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

  • :attribute (String)

    The name of the 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.

    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 (required, 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.

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_instance_capacity_reservation_attributes(options = {}) ⇒ Types::ModifyInstanceCapacityReservationAttributesResult

Modifies the Capacity Reservation settings for a stopped instance. Use this action to configure an instance to target a specific Capacity Reservation, run in any open Capacity Reservation with matching attributes, or run On-Demand Instance capacity.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_capacity_reservation_attributes({
  instance_id: "InstanceId", # required
  capacity_reservation_specification: { # required
    capacity_reservation_preference: "open", # accepts open, none
    capacity_reservation_target: {
      capacity_reservation_id: "CapacityReservationId",
      capacity_reservation_resource_group_arn: "String",
    },
  },
  dry_run: false,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance to be modified.

  • :capacity_reservation_specification (required, Types::CapacityReservationSpecification)

    Information about the Capacity Reservation targeting option.

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

See Also:

#modify_instance_credit_specification(options = {}) ⇒ Types::ModifyInstanceCreditSpecificationResult

Modifies the credit option for CPU usage on a running or stopped burstable performance instance. The credit options are standard and unlimited.

For more information, see Burstable performance instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_credit_specification({
  dry_run: false,
  client_token: "String",
  instance_credit_specifications: [ # required
    {
      instance_id: "InstanceId",
      cpu_credits: "String",
    },
  ],
})

Response structure


resp.successful_instance_credit_specifications #=> Array
resp.successful_instance_credit_specifications[0].instance_id #=> String
resp.unsuccessful_instance_credit_specifications #=> Array
resp.unsuccessful_instance_credit_specifications[0].instance_id #=> String
resp.unsuccessful_instance_credit_specifications[0].error.code #=> String, one of "InvalidInstanceID.Malformed", "InvalidInstanceID.NotFound", "IncorrectInstanceState", "InstanceCreditSpecification.NotSupported"
resp.unsuccessful_instance_credit_specifications[0].error.message #=> String

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.

  • :client_token (String)

    A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.

  • :instance_credit_specifications (required, Array<Types::InstanceCreditSpecificationRequest>)

    Information about the credit option for CPU usage.

Returns:

See Also:

#modify_instance_event_start_time(options = {}) ⇒ Types::ModifyInstanceEventStartTimeResult

Modifies the start time for a scheduled Amazon EC2 instance event.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_event_start_time({
  dry_run: false,
  instance_id: "InstanceId", # required
  instance_event_id: "String", # required
  not_before: Time.now, # required
})

Response structure


resp.event.instance_event_id #=> String
resp.event.code #=> String, one of "instance-reboot", "system-reboot", "system-maintenance", "instance-retirement", "instance-stop"
resp.event.description #=> String
resp.event.not_after #=> Time
resp.event.not_before #=> Time
resp.event.not_before_deadline #=> Time

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.

  • :instance_id (required, String)

    The ID of the instance with the scheduled event.

  • :instance_event_id (required, String)

    The ID of the event whose date and time you are modifying.

  • :not_before (required, Time)

    The new date and time when the event will take place.

Returns:

See Also:

#modify_instance_metadata_options(options = {}) ⇒ Types::ModifyInstanceMetadataOptionsResult

Modify the instance metadata parameters on a running or stopped instance. When you modify the parameters on a stopped instance, they are applied when the instance is started. When you modify the parameters on a running instance, the API responds with a state of “pending”. After the parameter modifications are successfully applied to the instance, the state of the modifications changes from “pending” to “applied” in subsequent describe-instances API calls. For more information, see Instance metadata and user data.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_id: "InstanceId", # required
  http_tokens: "optional", # accepts optional, required
  http_put_response_hop_limit: 1,
  http_endpoint: "disabled", # accepts disabled, enabled
  dry_run: false,
})

Response structure


resp.instance_id #=> String
resp..state #=> String, one of "pending", "applied"
resp..http_tokens #=> String, one of "optional", "required"
resp..http_put_response_hop_limit #=> Integer
resp..http_endpoint #=> String, one of "disabled", "enabled"

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance.

  • :http_tokens (String)

    The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.

    If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

    If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

  • :http_put_response_hop_limit (Integer)

    The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.

    Possible values: Integers from 1 to 64

  • :http_endpoint (String)

    This parameter enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the existing state is maintained.

    If you specify a value of disabled, you will not be able to access your instance metadata.

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

See Also:

#modify_instance_placement(options = {}) ⇒ Types::ModifyInstancePlacementResult

Modifies the placement attributes for a specified instance. You can do the following:

  • Modify the affinity between an instance and a Dedicated Host. When affinity is set to host and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists.

  • Change the Dedicated Host with which an instance is associated.

  • Change the instance tenancy of an instance from host to dedicated, or from dedicated to host.

  • Move an instance to or from a placement group.

At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.

To modify the host ID, tenancy, placement group, or partition for an instance, the instance must be in the stopped state.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_placement({
  affinity: "default", # accepts default, host
  group_name: "PlacementGroupName",
  host_id: "DedicatedHostId",
  instance_id: "InstanceId", # required
  tenancy: "dedicated", # accepts dedicated, host
  partition_number: 1,
  host_resource_group_arn: "String",
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :affinity (String)

    The affinity setting for the instance.

  • :group_name (String)

    The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default. For cluster and partition placement groups, the instance must have a tenancy of default or dedicated.

    To remove an instance from a placement group, specify an empty string (\"\").

  • :host_id (String)

    The ID of the Dedicated Host with which to associate the instance.

  • :instance_id (required, String)

    The ID of the instance that you are modifying.

  • :tenancy (String)

    The tenancy for the instance.

  • :partition_number (Integer)

    Reserved for future use.

  • :host_resource_group_arn (String)

    The ARN of the host resource group in which to place the instance.

Returns:

See Also:

#modify_launch_template(options = {}) ⇒ Types::ModifyLaunchTemplateResult

Modifies a launch template. You can specify which version of the launch template to set as the default version. When launching an instance, the default version applies when a launch template version is not specified.

Examples:

Example: To change the default version of a launch template


# This example specifies version 2 as the default version of the specified launch template.

resp = client.modify_launch_template({
  default_version: "2", 
  launch_template_id: "lt-0abcd290751193123", 
})

# resp.to_h outputs the following:
{
  launch_template: {
    create_time: Time.parse("2017-12-01T13:35:46.000Z"), 
    created_by: "arn:aws:iam::123456789012:root", 
    default_version_number: 2, 
    latest_version_number: 2, 
    launch_template_id: "lt-0abcd290751193123", 
    launch_template_name: "WebServers", 
  }, 
}

Request syntax with placeholder values


resp = client.modify_launch_template({
  dry_run: false,
  client_token: "String",
  launch_template_id: "LaunchTemplateId",
  launch_template_name: "LaunchTemplateName",
  default_version: "String",
})

Response structure


resp.launch_template.launch_template_id #=> String
resp.launch_template.launch_template_name #=> String
resp.launch_template.create_time #=> Time
resp.launch_template.created_by #=> String
resp.launch_template.default_version_number #=> Integer
resp.launch_template.latest_version_number #=> Integer
resp.launch_template.tags #=> Array
resp.launch_template.tags[0].key #=> String
resp.launch_template.tags[0].value #=> String

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.

  • :client_token (String)

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

    Constraint: Maximum 128 ASCII characters.

  • :launch_template_id (String)

    The ID of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :launch_template_name (String)

    The name of the launch template. You must specify either the launch template ID or launch template name in the request.

  • :default_version (String)

    The version number of the launch template to set as the default version.

Returns:

See Also:

#modify_managed_prefix_list(options = {}) ⇒ Types::ModifyManagedPrefixListResult

Modifies the specified managed prefix list.

Adding or removing entries in a prefix list creates a new version of the prefix list. Changing the name of the prefix list does not affect the version.

If you specify a current version number that does not match the true current version number, the request fails.

Examples:

Request syntax with placeholder values


resp = client.modify_managed_prefix_list({
  dry_run: false,
  prefix_list_id: "PrefixListResourceId", # required
  current_version: 1,
  prefix_list_name: "String",
  add_entries: [
    {
      cidr: "String", # required
      description: "String",
    },
  ],
  remove_entries: [
    {
      cidr: "String", # required
    },
  ],
})

Response structure


resp.prefix_list.prefix_list_id #=> String
resp.prefix_list.address_family #=> String
resp.prefix_list.state #=> String, one of "create-in-progress", "create-complete", "create-failed", "modify-in-progress", "modify-complete", "modify-failed", "restore-in-progress", "restore-complete", "restore-failed", "delete-in-progress", "delete-complete", "delete-failed"
resp.prefix_list.state_message #=> String
resp.prefix_list.prefix_list_arn #=> String
resp.prefix_list.prefix_list_name #=> String
resp.prefix_list.max_entries #=> Integer
resp.prefix_list.version #=> Integer
resp.prefix_list.tags #=> Array
resp.prefix_list.tags[0].key #=> String
resp.prefix_list.tags[0].value #=> String
resp.prefix_list.owner_id #=> String

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.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

  • :current_version (Integer)

    The current version of the prefix list.

  • :prefix_list_name (String)

    A name for the prefix list.

  • :add_entries (Array<Types::AddPrefixListEntry>)

    One or more entries to add to the prefix list.

  • :remove_entries (Array<Types::RemovePrefixListEntry>)

    One or more entries to remove from the prefix list.

Returns:

See Also:

#modify_network_interface_attribute(options = {}) ⇒ Struct

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

Examples:

Example: To modify the attachment attribute of a network interface


# This example modifies the attachment attribute of the specified network interface.

resp = client.modify_network_interface_attribute({
  attachment: {
    attachment_id: "eni-attach-43348162", 
    delete_on_termination: false, 
  }, 
  network_interface_id: "eni-686ea200", 
})

Example: To modify the description attribute of a network interface


# This example modifies the description attribute of the specified network interface.

resp = client.modify_network_interface_attribute({
  description: {
    value: "My description", 
  }, 
  network_interface_id: "eni-686ea200", 
})

Example: To modify the groupSet attribute of a network interface


# This example command modifies the groupSet attribute of the specified network interface.

resp = client.modify_network_interface_attribute({
  groups: [
    "sg-903004f8", 
    "sg-1a2b3c4d", 
  ], 
  network_interface_id: "eni-686ea200", 
})

Example: To modify the sourceDestCheck attribute of a network interface


# This example command modifies the sourceDestCheck attribute of the specified network interface.

resp = client.modify_network_interface_attribute({
  network_interface_id: "eni-686ea200", 
  source_dest_check: {
    value: false, 
  }, 
})

Request syntax with placeholder values


resp = client.modify_network_interface_attribute({
  attachment: {
    attachment_id: "NetworkInterfaceAttachmentId",
    delete_on_termination: false,
  },
  description: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  dry_run: false,
  groups: ["SecurityGroupId"],
  network_interface_id: "NetworkInterfaceId", # required
  source_dest_check: {
    value: false,
  },
})

Options Hash (options):

  • :attachment (Types::NetworkInterfaceAttachmentChanges)

    Information about the interface attachment. If modifying the \'delete on termination\' attribute, you must specify the ID of the interface attachment.

  • :description (Types::AttributeValue)

    A description for the network interface.

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

  • :groups (Array<String>)

    Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it\'s just the default security group in the VPC. You must specify the ID of the security group, not the name.

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :source_dest_check (Types::AttributeBooleanValue)

    Indicates whether source/destination checking is enabled. A value of true means checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_reserved_instances(options = {}) ⇒ Types::ModifyReservedInstancesResult

Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.

For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_reserved_instances({
  reserved_instances_ids: ["ReservationId"], # required
  client_token: "String",
  target_configurations: [ # required
    {
      availability_zone: "String",
      instance_count: 1,
      instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
      platform: "String",
      scope: "Availability Zone", # accepts Availability Zone, Region
    },
  ],
})

Response structure


resp.reserved_instances_modification_id #=> String

Options Hash (options):

  • :reserved_instances_ids (required, Array<String>)

    The IDs of the Reserved Instances to modify.

  • :client_token (String)

    A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.

  • :target_configurations (required, Array<Types::ReservedInstancesConfiguration>)

    The configuration settings for the Reserved Instances to modify.

Returns:

See Also:

#modify_snapshot_attribute(options = {}) ⇒ Struct

Adds or removes permission settings for the specified snapshot. You may add or remove specified AWS account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.

Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made public. Snapshots encrypted with your default CMK cannot be shared with other accounts.

For more information about modifying snapshot permissions, see Sharing snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To modify a snapshot attribute


# This example modifies snapshot ``snap-1234567890abcdef0`` to remove the create volume permission for a user with the account ID ``123456789012``. If the command succeeds, no output is returned.

resp = client.modify_snapshot_attribute({
  attribute: "createVolumePermission", 
  operation_type: "remove", 
  snapshot_id: "snap-1234567890abcdef0", 
  user_ids: [
    "123456789012", 
  ], 
})

# resp.to_h outputs the following:
{
}

Example: To make a snapshot public


# This example makes the snapshot ``snap-1234567890abcdef0`` public.

resp = client.modify_snapshot_attribute({
  attribute: "createVolumePermission", 
  group_names: [
    "all", 
  ], 
  operation_type: "add", 
  snapshot_id: "snap-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.modify_snapshot_attribute({
  attribute: "productCodes", # accepts productCodes, createVolumePermission
  create_volume_permission: {
    add: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
    remove: [
      {
        group: "all", # accepts all
        user_id: "String",
      },
    ],
  },
  group_names: ["SecurityGroupName"],
  operation_type: "add", # accepts add, remove
  snapshot_id: "SnapshotId", # required
  user_ids: ["String"],
  dry_run: false,
})

Options Hash (options):

  • :attribute (String)

    The snapshot attribute to modify. Only volume creation permissions can be modified.

  • :create_volume_permission (Types::CreateVolumePermissionModifications)

    A JSON representation of the snapshot attribute modification.

  • :group_names (Array<String>)

    The group to modify for the snapshot.

  • :operation_type (String)

    The type of operation to perform to the attribute.

  • :snapshot_id (required, String)

    The ID of the snapshot.

  • :user_ids (Array<String>)

    The account ID to modify for the snapshot.

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

  • (Struct)

    Returns an empty response.

See Also:

#modify_spot_fleet_request(options = {}) ⇒ Types::ModifySpotFleetRequestResponse

Modifies the specified Spot Fleet request.

You can only modify a Spot Fleet request of type maintain.

While the Spot Fleet request is being modified, it is in the modifying state.

To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches the additional Spot Instances according to the allocation strategy for the Spot Fleet request. If the allocation strategy is lowestPrice, the Spot Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified, the Spot Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet cancels any open requests that exceed the new target capacity. You can request that the Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowestPrice, the Spot Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacityOptimized, the Spot Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified, the Spot Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the Spot Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your Spot Fleet for now, but will use it again later, you can set the target capacity to 0.

Examples:

Example: To increase the target capacity of a Spot fleet request


# This example increases the target capacity of the specified Spot fleet request.

resp = client.modify_spot_fleet_request({
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  target_capacity: 20, 
})

# resp.to_h outputs the following:
{
  return: true, 
}

Example: To decrease the target capacity of a Spot fleet request


# This example decreases the target capacity of the specified Spot fleet request without terminating any Spot Instances as a result.

resp = client.modify_spot_fleet_request({
  excess_capacity_termination_policy: "NoTermination ", 
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
  target_capacity: 10, 
})

# resp.to_h outputs the following:
{
  return: true, 
}

Request syntax with placeholder values


resp = client.modify_spot_fleet_request({
  excess_capacity_termination_policy: "noTermination", # accepts noTermination, default
  launch_template_configs: [
    {
      launch_template_specification: {
        launch_template_id: "String",
        launch_template_name: "LaunchTemplateName",
        version: "String",
      },
      overrides: [
        {
          instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
          spot_price: "String",
          subnet_id: "String",
          availability_zone: "String",
          weighted_capacity: 1.0,
          priority: 1.0,
        },
      ],
    },
  ],
  spot_fleet_request_id: "SpotFleetRequestId", # required
  target_capacity: 1,
  on_demand_target_capacity: 1,
})

Response structure


resp.return #=> true/false

Options Hash (options):

  • :excess_capacity_termination_policy (String)

    Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is decreased below the current size of the Spot Fleet.

  • :launch_template_configs (Array<Types::LaunchTemplateConfig>)

    The launch template and overrides. You can only use this parameter if you specified a launch template (LaunchTemplateConfigs) in your Spot Fleet request. If you specified LaunchSpecifications in your Spot Fleet request, then omit this parameter.

  • :spot_fleet_request_id (required, String)

    The ID of the Spot Fleet request.

  • :target_capacity (Integer)

    The size of the fleet.

  • :on_demand_target_capacity (Integer)

    The number of On-Demand Instances in the fleet.

Returns:

See Also:

#modify_subnet_attribute(options = {}) ⇒ Struct

Modifies a subnet attribute. You can only modify one attribute at a time.

Examples:

Example: To change a subnet's public IP addressing behavior


# This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address.

resp = client.modify_subnet_attribute({
  map_public_ip_on_launch: {
    value: true, 
  }, 
  subnet_id: "subnet-1a2b3c4d", 
})

Request syntax with placeholder values


resp = client.modify_subnet_attribute({
  assign_ipv_6_address_on_creation: {
    value: false,
  },
  map_public_ip_on_launch: {
    value: false,
  },
  subnet_id: "SubnetId", # required
  map_customer_owned_ip_on_launch: {
    value: false,
  },
  customer_owned_ipv_4_pool: "CoipPoolId",
})

Options Hash (options):

  • :assign_ipv_6_address_on_creation (Types::AttributeBooleanValue)

    Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that\'s created when launching an instance into the subnet (the instance therefore receives an IPv6 address).

    If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it\'s created using version 2016-11-15 or later of the Amazon EC2 API.

  • :map_public_ip_on_launch (Types::AttributeBooleanValue)

    Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a public IPv4 address.

  • :subnet_id (required, String)

    The ID of the subnet.

  • :map_customer_owned_ip_on_launch (Types::AttributeBooleanValue)

    Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a customer-owned IPv4 address.

    When this value is true, you must specify the customer-owned IP pool using CustomerOwnedIpv4Pool.

  • :customer_owned_ipv_4_pool (String)

    The customer-owned IPv4 address pool associated with the subnet.

    You must set this value when you specify true for MapCustomerOwnedIpOnLaunch.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_traffic_mirror_filter_network_services(options = {}) ⇒ Types::ModifyTrafficMirrorFilterNetworkServicesResult

Allows or restricts mirroring network services.

By default, Amazon DNS network services are not eligible for Traffic Mirror. Use AddNetworkServices to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored. When you no longer want to mirror network services, use RemoveNetworkServices to remove the network services from the Traffic Mirror filter.

For information about filter rule properties, see Network Services in the Traffic Mirroring User Guide .

Examples:

Request syntax with placeholder values


resp = client.modify_traffic_mirror_filter_network_services({
  traffic_mirror_filter_id: "TrafficMirrorFilterId", # required
  add_network_services: ["amazon-dns"], # accepts amazon-dns
  remove_network_services: ["amazon-dns"], # accepts amazon-dns
  dry_run: false,
})

Response structure


resp.traffic_mirror_filter.traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules #=> Array
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter.ingress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter.ingress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filter.ingress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filter.ingress_filter_rules[0].description #=> String
resp.traffic_mirror_filter.egress_filter_rules #=> Array
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter.egress_filter_rules[0].rule_number #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter.egress_filter_rules[0].protocol #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].source_port_range.from_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].source_port_range.to_port #=> Integer
resp.traffic_mirror_filter.egress_filter_rules[0].destination_cidr_block #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].source_cidr_block #=> String
resp.traffic_mirror_filter.egress_filter_rules[0].description #=> String
resp.traffic_mirror_filter.network_services #=> Array
resp.traffic_mirror_filter.network_services[0] #=> String, one of "amazon-dns"
resp.traffic_mirror_filter.description #=> String
resp.traffic_mirror_filter.tags #=> Array
resp.traffic_mirror_filter.tags[0].key #=> String
resp.traffic_mirror_filter.tags[0].value #=> String

Options Hash (options):

  • :traffic_mirror_filter_id (required, String)

    The ID of the Traffic Mirror filter.

  • :add_network_services (Array<String>)

    The network service, for example Amazon DNS, that you want to mirror.

  • :remove_network_services (Array<String>)

    The network service, for example Amazon DNS, that you no longer want to mirror.

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

See Also:

#modify_traffic_mirror_filter_rule(options = {}) ⇒ Types::ModifyTrafficMirrorFilterRuleResult

Modifies the specified Traffic Mirror rule.

DestinationCidrBlock and SourceCidrBlock must both be an IPv4 range or an IPv6 range.

Examples:

Request syntax with placeholder values


resp = client.modify_traffic_mirror_filter_rule({
  traffic_mirror_filter_rule_id: "TrafficMirrorFilterRuleId", # required
  traffic_direction: "ingress", # accepts ingress, egress
  rule_number: 1,
  rule_action: "accept", # accepts accept, reject
  destination_port_range: {
    from_port: 1,
    to_port: 1,
  },
  source_port_range: {
    from_port: 1,
    to_port: 1,
  },
  protocol: 1,
  destination_cidr_block: "String",
  source_cidr_block: "String",
  description: "String",
  remove_fields: ["destination-port-range"], # accepts destination-port-range, source-port-range, protocol, description
  dry_run: false,
})

Response structure


resp.traffic_mirror_filter_rule.traffic_mirror_filter_rule_id #=> String
resp.traffic_mirror_filter_rule.traffic_mirror_filter_id #=> String
resp.traffic_mirror_filter_rule.traffic_direction #=> String, one of "ingress", "egress"
resp.traffic_mirror_filter_rule.rule_number #=> Integer
resp.traffic_mirror_filter_rule.rule_action #=> String, one of "accept", "reject"
resp.traffic_mirror_filter_rule.protocol #=> Integer
resp.traffic_mirror_filter_rule.destination_port_range.from_port #=> Integer
resp.traffic_mirror_filter_rule.destination_port_range.to_port #=> Integer
resp.traffic_mirror_filter_rule.source_port_range.from_port #=> Integer
resp.traffic_mirror_filter_rule.source_port_range.to_port #=> Integer
resp.traffic_mirror_filter_rule.destination_cidr_block #=> String
resp.traffic_mirror_filter_rule.source_cidr_block #=> String
resp.traffic_mirror_filter_rule.description #=> String

Options Hash (options):

  • :traffic_mirror_filter_rule_id (required, String)

    The ID of the Traffic Mirror rule.

  • :traffic_direction (String)

    The type of traffic (ingress | egress) to assign to the rule.

  • :rule_number (Integer)

    The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

  • :rule_action (String)

    The action to assign to the rule.

  • :destination_port_range (Types::TrafficMirrorPortRangeRequest)

    The destination ports that are associated with the Traffic Mirror rule.

  • :source_port_range (Types::TrafficMirrorPortRangeRequest)

    The port range to assign to the Traffic Mirror rule.

  • :protocol (Integer)

    The protocol, for example TCP, to assign to the Traffic Mirror rule.

  • :destination_cidr_block (String)

    The destination CIDR block to assign to the Traffic Mirror rule.

  • :source_cidr_block (String)

    The source CIDR block to assign to the Traffic Mirror rule.

  • :description (String)

    The description to assign to the Traffic Mirror rule.

  • :remove_fields (Array<String>)

    The properties that you want to remove from the Traffic Mirror filter rule.

    When you remove a property from a Traffic Mirror filter rule, the property is set to the default.

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

See Also:

#modify_traffic_mirror_session(options = {}) ⇒ Types::ModifyTrafficMirrorSessionResult

Modifies a Traffic Mirror session.

Examples:

Request syntax with placeholder values


resp = client.modify_traffic_mirror_session({
  traffic_mirror_session_id: "TrafficMirrorSessionId", # required
  traffic_mirror_target_id: "TrafficMirrorTargetId",
  traffic_mirror_filter_id: "TrafficMirrorFilterId",
  packet_length: 1,
  session_number: 1,
  virtual_network_id: 1,
  description: "String",
  remove_fields: ["packet-length"], # accepts packet-length, description, virtual-network-id
  dry_run: false,
})

Response structure


resp.traffic_mirror_session.traffic_mirror_session_id #=> String
resp.traffic_mirror_session.traffic_mirror_target_id #=> String
resp.traffic_mirror_session.traffic_mirror_filter_id #=> String
resp.traffic_mirror_session.network_interface_id #=> String
resp.traffic_mirror_session.owner_id #=> String
resp.traffic_mirror_session.packet_length #=> Integer
resp.traffic_mirror_session.session_number #=> Integer
resp.traffic_mirror_session.virtual_network_id #=> Integer
resp.traffic_mirror_session.description #=> String
resp.traffic_mirror_session.tags #=> Array
resp.traffic_mirror_session.tags[0].key #=> String
resp.traffic_mirror_session.tags[0].value #=> String

Options Hash (options):

  • :traffic_mirror_session_id (required, String)

    The ID of the Traffic Mirror session.

  • :traffic_mirror_target_id (String)

    The Traffic Mirror target. The target must be in the same VPC as the source, or have a VPC peering connection with the source.

  • :traffic_mirror_filter_id (String)

    The ID of the Traffic Mirror filter.

  • :packet_length (Integer)

    The number of bytes in each packet to mirror. These are bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet.

  • :session_number (Integer)

    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

    Valid values are 1-32766.

  • :virtual_network_id (Integer)

    The virtual network ID of the Traffic Mirror session.

  • :description (String)

    The description to assign to the Traffic Mirror session.

  • :remove_fields (Array<String>)

    The properties that you want to remove from the Traffic Mirror session.

    When you remove a property from a Traffic Mirror session, the property is set to the default.

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

See Also:

#modify_transit_gateway(options = {}) ⇒ Types::ModifyTransitGatewayResult

Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.

Examples:

Request syntax with placeholder values


resp = client.modify_transit_gateway({
  transit_gateway_id: "TransitGatewayId", # required
  description: "String",
  options: {
    vpn_ecmp_support: "enable", # accepts enable, disable
    dns_support: "enable", # accepts enable, disable
    auto_accept_shared_attachments: "enable", # accepts enable, disable
    default_route_table_association: "enable", # accepts enable, disable
    association_default_route_table_id: "TransitGatewayRouteTableId",
    default_route_table_propagation: "enable", # accepts enable, disable
    propagation_default_route_table_id: "TransitGatewayRouteTableId",
  },
  dry_run: false,
})

Response structure


resp.transit_gateway.transit_gateway_id #=> String
resp.transit_gateway.transit_gateway_arn #=> String
resp.transit_gateway.state #=> String, one of "pending", "available", "modifying", "deleting", "deleted"
resp.transit_gateway.owner_id #=> String
resp.transit_gateway.description #=> String
resp.transit_gateway.creation_time #=> Time
resp.transit_gateway.options.amazon_side_asn #=> Integer
resp.transit_gateway.options.auto_accept_shared_attachments #=> String, one of "enable", "disable"
resp.transit_gateway.options.default_route_table_association #=> String, one of "enable", "disable"
resp.transit_gateway.options.association_default_route_table_id #=> String
resp.transit_gateway.options.default_route_table_propagation #=> String, one of "enable", "disable"
resp.transit_gateway.options.propagation_default_route_table_id #=> String
resp.transit_gateway.options.vpn_ecmp_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway.options.multicast_support #=> String, one of "enable", "disable"
resp.transit_gateway.tags #=> Array
resp.transit_gateway.tags[0].key #=> String
resp.transit_gateway.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_id (required, String)

    The ID of the transit gateway.

  • :description (String)

    The description for the transit gateway.

  • :options (Types::ModifyTransitGatewayOptions)

    The options to modify.

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

See Also:

#modify_transit_gateway_prefix_list_reference(options = {}) ⇒ Types::ModifyTransitGatewayPrefixListReferenceResult

Modifies a reference (route) to a prefix list in a specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.modify_transit_gateway_prefix_list_reference({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  prefix_list_id: "PrefixListResourceId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  blackhole: false,
  dry_run: false,
})

Response structure


resp.transit_gateway_prefix_list_reference.transit_gateway_route_table_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_id #=> String
resp.transit_gateway_prefix_list_reference.prefix_list_owner_id #=> String
resp.transit_gateway_prefix_list_reference.state #=> String, one of "pending", "available", "modifying", "deleting"
resp.transit_gateway_prefix_list_reference.blackhole #=> true/false
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.transit_gateway_prefix_list_reference.transit_gateway_attachment.resource_id #=> String

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

  • :transit_gateway_attachment_id (String)

    The ID of the attachment to which traffic is routed.

  • :blackhole (Boolean)

    Indicates whether to drop traffic that matches this route.

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

See Also:

#modify_transit_gateway_vpc_attachment(options = {}) ⇒ Types::ModifyTransitGatewayVpcAttachmentResult

Modifies the specified VPC attachment.

Examples:

Request syntax with placeholder values


resp = client.modify_transit_gateway_vpc_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  add_subnet_ids: ["SubnetId"],
  remove_subnet_ids: ["SubnetId"],
  options: {
    dns_support: "enable", # accepts enable, disable
    ipv_6_support: "enable", # accepts enable, disable
    appliance_mode_support: "enable", # accepts enable, disable
  },
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachment.transit_gateway_id #=> String
resp.transit_gateway_vpc_attachment.vpc_id #=> String
resp.transit_gateway_vpc_attachment.vpc_owner_id #=> String
resp.transit_gateway_vpc_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachment.subnet_ids #=> Array
resp.transit_gateway_vpc_attachment.subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachment.creation_time #=> Time
resp.transit_gateway_vpc_attachment.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.tags #=> Array
resp.transit_gateway_vpc_attachment.tags[0].key #=> String
resp.transit_gateway_vpc_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

  • :add_subnet_ids (Array<String>)

    The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone.

  • :remove_subnet_ids (Array<String>)

    The IDs of one or more subnets to remove.

  • :options (Types::ModifyTransitGatewayVpcAttachmentRequestOptions)

    The new VPC attachment options.

    You cannot modify the IPv6 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.

Returns:

See Also:

#modify_volume(options = {}) ⇒ Types::ModifyVolumeResult

You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you may be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying an EBS volume running Linux, see Modifying the size, IOPS, or type of an EBS volume on Linux. For more information about modifying an EBS volume running Windows, see Modifying the size, IOPS, or type of an EBS volume on Windows.

When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For information about extending a Linux file system, see Extending a Linux file system. For information about extending a Windows file system, see Extending a Windows file system.

You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide. You can also track the status of a modification using DescribeVolumesModifications. For information about tracking status changes using either method, see Monitoring volume modifications.

With previous-generation instance types, resizing an EBS volume may require detaching and reattaching the volume or stopping and restarting the instance. For more information, see Modifying the size, IOPS, or type of an EBS volume on Linux and Modifying the size, IOPS, or type of an EBS volume on Windows.

If you reach the maximum volume modification rate per volume limit, you will need to wait at least six hours before applying further modifications to the affected EBS volume.

Examples:

Request syntax with placeholder values


resp = client.modify_volume({
  dry_run: false,
  volume_id: "VolumeId", # required
  size: 1,
  volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
  iops: 1,
})

Response structure


resp.volume_modification.volume_id #=> String
resp.volume_modification.modification_state #=> String, one of "modifying", "optimizing", "completed", "failed"
resp.volume_modification.status_message #=> String
resp.volume_modification.target_size #=> Integer
resp.volume_modification.target_iops #=> Integer
resp.volume_modification.target_volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.volume_modification.original_size #=> Integer
resp.volume_modification.original_iops #=> Integer
resp.volume_modification.original_volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.volume_modification.progress #=> Integer
resp.volume_modification.start_time #=> Time
resp.volume_modification.end_time #=> Time

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.

  • :volume_id (required, String)

    The ID of the volume.

  • :size (Integer)

    The target size of the volume, in GiB. The target volume size must be greater than or equal to than the existing size of the volume. For information about available EBS volume sizes, see Amazon EBS Volume Types.

    Default: If no size is specified, the existing size is retained.

  • :volume_type (String)

    The target EBS volume type of the volume.

    Default: If no type is specified, the existing type is retained.

  • :iops (Integer)

    The target IOPS rate of the volume.

    This is only valid for Provisioned IOPS SSD (io1 and io2) volumes. For moreinformation, see Provisioned IOPS SSD (io1 and io2) volumes.

    Default: If no IOPS value is specified, the existing value is retained.

Returns:

See Also:

#modify_volume_attribute(options = {}) ⇒ Struct

Modifies a volume attribute.

By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

Examples:

Example: To modify a volume attribute


# This example sets the ``autoEnableIo`` attribute of the volume with the ID ``vol-1234567890abcdef0`` to ``true``. If the command succeeds, no output is returned.

resp = client.modify_volume_attribute({
  auto_enable_io: {
    value: true, 
  }, 
  dry_run: true, 
  volume_id: "vol-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.modify_volume_attribute({
  auto_enable_io: {
    value: false,
  },
  volume_id: "VolumeId", # required
  dry_run: false,
})

Options Hash (options):

  • :auto_enable_io (Types::AttributeBooleanValue)

    Indicates whether the volume should be auto-enabled for I/O operations.

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

  • (Struct)

    Returns an empty response.

See Also:

#modify_vpc_attribute(options = {}) ⇒ Struct

Modifies the specified attribute of the specified VPC.

Examples:

Example: To modify the enableDnsSupport attribute


# This example modifies the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for instances in the VPC to their corresponding IP addresses; otherwise, it does not.

resp = client.modify_vpc_attribute({
  enable_dns_support: {
    value: false, 
  }, 
  vpc_id: "vpc-a01106c2", 
})

Example: To modify the enableDnsHostnames attribute


# This example modifies the enableDnsHostnames attribute. This attribute indicates whether instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.

resp = client.modify_vpc_attribute({
  enable_dns_hostnames: {
    value: false, 
  }, 
  vpc_id: "vpc-a01106c2", 
})

Request syntax with placeholder values


resp = client.modify_vpc_attribute({
  enable_dns_hostnames: {
    value: false,
  },
  enable_dns_support: {
    value: false,
  },
  vpc_id: "VpcId", # required
})

Options Hash (options):

  • :enable_dns_hostnames (Types::AttributeBooleanValue)

    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you\'ve enabled DNS support.

  • :enable_dns_support (Types::AttributeBooleanValue)

    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range \"plus two\" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

  • :vpc_id (required, String)

    The ID of the VPC.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#modify_vpc_endpoint(options = {}) ⇒ Types::ModifyVpcEndpointResult

Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see VPC Endpoints in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_endpoint({
  dry_run: false,
  vpc_endpoint_id: "VpcEndpointId", # required
  reset_policy: false,
  policy_document: "String",
  add_route_table_ids: ["RouteTableId"],
  remove_route_table_ids: ["RouteTableId"],
  add_subnet_ids: ["SubnetId"],
  remove_subnet_ids: ["SubnetId"],
  add_security_group_ids: ["SecurityGroupId"],
  remove_security_group_ids: ["SecurityGroupId"],
  private_dns_enabled: false,
})

Response structure


resp.return #=> true/false

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_endpoint_id (required, String)

    The ID of the endpoint.

  • :reset_policy (Boolean) — default: Gateway endpoint

    Specify true to reset the policy document to the default policy. The default policy allows full access to the service.

  • :policy_document (String) — default: Interface and gateway endpoints

    A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.

  • :add_route_table_ids (Array<String>) — default: Gateway endpoint

    One or more route tables IDs to associate with the endpoint.

  • :remove_route_table_ids (Array<String>) — default: Gateway endpoint

    One or more route table IDs to disassociate from the endpoint.

  • :add_subnet_ids (Array<String>) — default: Interface and Gateway Load Balancer endpoints

    One or more subnet IDs in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.

  • :remove_subnet_ids (Array<String>) — default: Interface endpoint

    One or more subnets IDs in which to remove the endpoint.

  • :add_security_group_ids (Array<String>) — default: Interface endpoint

    One or more security group IDs to associate with the network interface.

  • :remove_security_group_ids (Array<String>) — default: Interface endpoint

    One or more security group IDs to disassociate from the network interface.

  • :private_dns_enabled (Boolean) — default: Interface endpoint

    Indicates whether a private hosted zone is associated with the VPC.

Returns:

See Also:

#modify_vpc_endpoint_connection_notification(options = {}) ⇒ Types::ModifyVpcEndpointConnectionNotificationResult

Modifies a connection notification for VPC endpoint or VPC endpoint service. You can change the SNS topic for the notification, or the events for which to be notified.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_endpoint_connection_notification({
  dry_run: false,
  connection_notification_id: "ConnectionNotificationId", # required
  connection_notification_arn: "String",
  connection_events: ["String"],
})

Response structure


resp.return_value #=> true/false

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.

  • :connection_notification_id (required, String)

    The ID of the notification.

  • :connection_notification_arn (String)

    The ARN for the SNS topic for the notification.

  • :connection_events (Array<String>)

    One or more events for the endpoint. Valid values are Accept, Connect, Delete, and Reject.

Returns:

See Also:

#modify_vpc_endpoint_service_configuration(options = {}) ⇒ Types::ModifyVpcEndpointServiceConfigurationResult

Modifies the attributes of your VPC endpoint service configuration. You can change the Network Load Balancers or Gateway Load Balancers for your service, and you can specify whether acceptance is required for requests to connect to your endpoint service through an interface VPC endpoint.

If you set or modify the private DNS name, you must prove that you own the private DNS domain name. For more information, see VPC Endpoint Service Private DNS Name Verification in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_endpoint_service_configuration({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
  private_dns_name: "String",
  remove_private_dns_name: false,
  acceptance_required: false,
  add_network_load_balancer_arns: ["String"],
  remove_network_load_balancer_arns: ["String"],
  add_gateway_load_balancer_arns: ["String"],
  remove_gateway_load_balancer_arns: ["String"],
})

Response structure


resp.return #=> true/false

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.

  • :service_id (required, String)

    The ID of the service.

  • :private_dns_name (String) — default: Interface endpoint configuration

    The private DNS name to assign to the endpoint service.

  • :remove_private_dns_name (Boolean) — default: Interface endpoint configuration

    Removes the private DNS name of the endpoint service.

  • :acceptance_required (Boolean)

    Indicates whether requests to create an endpoint to your service must be accepted.

  • :add_network_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service configuration.

  • :remove_network_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your service configuration.

  • :add_gateway_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your service configuration.

  • :remove_gateway_load_balancer_arns (Array<String>)

    The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your service configuration.

Returns:

See Also:

#modify_vpc_endpoint_service_permissions(options = {}) ⇒ Types::ModifyVpcEndpointServicePermissionsResult

Modifies the permissions for your VPC endpoint service. You can add or remove permissions for service consumers (IAM users, IAM roles, and AWS accounts) to connect to your endpoint service.

If you grant permissions to all principals, the service is public. Any users who know the name of a public service can send a request to attach an endpoint. If the service does not require manual approval, attachments are automatically approved.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_endpoint_service_permissions({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
  add_allowed_principals: ["String"],
  remove_allowed_principals: ["String"],
})

Response structure


resp.return_value #=> true/false

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.

  • :service_id (required, String)

    The ID of the service.

  • :add_allowed_principals (Array<String>)

    The Amazon Resource Names (ARN) of one or more principals. Permissions are granted to the principals in this list. To grant permissions to all principals, specify an asterisk (*).

  • :remove_allowed_principals (Array<String>)

    The Amazon Resource Names (ARN) of one or more principals. Permissions are revoked for principals in this list.

Returns:

See Also:

#modify_vpc_peering_connection_options(options = {}) ⇒ Types::ModifyVpcPeeringConnectionOptionsResult

Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:

  • Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.

  • Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.

  • Enable/disable the ability to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

If the peered VPCs are in the same AWS account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different AWS accounts or different Regions. For peered VPCs in different AWS accounts, each AWS account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_peering_connection_options({
  accepter_peering_connection_options: {
    allow_dns_resolution_from_remote_vpc: false,
    allow_egress_from_local_classic_link_to_remote_vpc: false,
    allow_egress_from_local_vpc_to_remote_classic_link: false,
  },
  dry_run: false,
  requester_peering_connection_options: {
    allow_dns_resolution_from_remote_vpc: false,
    allow_egress_from_local_classic_link_to_remote_vpc: false,
    allow_egress_from_local_vpc_to_remote_classic_link: false,
  },
  vpc_peering_connection_id: "VpcPeeringConnectionId", # required
})

Response structure


resp.accepter_peering_connection_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.accepter_peering_connection_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.accepter_peering_connection_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false
resp.requester_peering_connection_options.allow_dns_resolution_from_remote_vpc #=> true/false
resp.requester_peering_connection_options.allow_egress_from_local_classic_link_to_remote_vpc #=> true/false
resp.requester_peering_connection_options.allow_egress_from_local_vpc_to_remote_classic_link #=> true/false

Options Hash (options):

  • :accepter_peering_connection_options (Types::PeeringConnectionOptionsRequest)

    The VPC peering connection options for the accepter VPC.

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

  • :requester_peering_connection_options (Types::PeeringConnectionOptionsRequest)

    The VPC peering connection options for the requester VPC.

  • :vpc_peering_connection_id (required, String)

    The ID of the VPC peering connection.

Returns:

See Also:

#modify_vpc_tenancy(options = {}) ⇒ Types::ModifyVpcTenancyResult

Modifies the instance tenancy attribute of the specified VPC. You can change the instance tenancy attribute of a VPC to default only. You cannot change the instance tenancy attribute to dedicated.

After you modify the tenancy of the VPC, any new instances that you launch into the VPC have a tenancy of default, unless you specify otherwise during launch. The tenancy of any existing instances in the VPC is not affected.

For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_vpc_tenancy({
  vpc_id: "VpcId", # required
  instance_tenancy: "default", # required, accepts default
  dry_run: false,
})

Response structure


resp.return_value #=> true/false

Options Hash (options):

  • :vpc_id (required, String)

    The ID of the VPC.

  • :instance_tenancy (required, String)

    The instance tenancy attribute for the VPC.

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

See Also:

#modify_vpn_connection(options = {}) ⇒ Types::ModifyVpnConnectionResult

Modifies the customer gateway or the target gateway of an AWS Site-to-Site VPN connection. To modify the target gateway, the following migration options are available:

  • An existing virtual private gateway to a new virtual private gateway

  • An existing virtual private gateway to a transit gateway

  • An existing transit gateway to a new transit gateway

  • An existing transit gateway to a virtual private gateway

Before you perform the migration to the new gateway, you must configure the new gateway. Use CreateVpnGateway to create a virtual private gateway, or CreateTransitGateway to create a transit gateway.

This step is required when you migrate from a virtual private gateway with static routes to a transit gateway.

You must delete the static routes before you migrate to the new gateway.

Keep a copy of the static route before you delete it. You will need to add back these routes to the transit gateway after the VPN connection migration is complete.

After you migrate to the new gateway, you might need to modify your VPC route table. Use CreateRoute and DeleteRoute to make the changes described in VPN Gateway Target Modification Required VPC Route Table Updates in the AWS Site-to-Site VPN User Guide.

When the new gateway is a transit gateway, modify the transit gateway route table to allow traffic between the VPC and the AWS Site-to-Site VPN connection. Use CreateTransitGatewayRoute to add the routes.

If you deleted VPN static routes, you must add the static routes to the transit gateway route table.

After you perform this operation, the AWS VPN endpoint's IP addresses on the AWS side and the tunnel options remain intact. Your AWS Site-to-Site VPN connection will be temporarily unavailable for a brief period while we provision the new endpoints.

Examples:

Request syntax with placeholder values


resp = client.modify_vpn_connection({
  vpn_connection_id: "VpnConnectionId", # required
  transit_gateway_id: "TransitGatewayId",
  customer_gateway_id: "CustomerGatewayId",
  vpn_gateway_id: "VpnGatewayId",
  dry_run: false,
})

Response structure


resp.vpn_connection.customer_gateway_configuration #=> String
resp.vpn_connection.customer_gateway_id #=> String
resp.vpn_connection.category #=> String
resp.vpn_connection.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.type #=> String, one of "ipsec.1"
resp.vpn_connection.vpn_connection_id #=> String
resp.vpn_connection.vpn_gateway_id #=> String
resp.vpn_connection.transit_gateway_id #=> String
resp.vpn_connection.options.enable_acceleration #=> true/false
resp.vpn_connection.options.static_routes_only #=> true/false
resp.vpn_connection.options.local_ipv_4_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_4_network_cidr #=> String
resp.vpn_connection.options.local_ipv_6_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_6_network_cidr #=> String
resp.vpn_connection.options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connection.options.tunnel_options #=> Array
resp.vpn_connection.options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connection.options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connection.options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].startup_action #=> String
resp.vpn_connection.routes #=> Array
resp.vpn_connection.routes[0].destination_cidr_block #=> String
resp.vpn_connection.routes[0].source #=> String, one of "Static"
resp.vpn_connection.routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.tags #=> Array
resp.vpn_connection.tags[0].key #=> String
resp.vpn_connection.tags[0].value #=> String
resp.vpn_connection.vgw_telemetry #=> Array
resp.vpn_connection.vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connection.vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connection.vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connection.vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connection.vgw_telemetry[0].status_message #=> String
resp.vpn_connection.vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

  • :vpn_connection_id (required, String)

    The ID of the VPN connection.

  • :transit_gateway_id (String)

    The ID of the transit gateway.

  • :customer_gateway_id (String)

    The ID of the customer gateway at your end of the VPN connection.

  • :vpn_gateway_id (String)

    The ID of the virtual private gateway at the AWS side of the VPN connection.

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

See Also:

#modify_vpn_connection_options(options = {}) ⇒ Types::ModifyVpnConnectionOptionsResult

Modifies the connection options for your Site-to-Site VPN connection.

When you modify the VPN connection options, the VPN endpoint IP addresses on the AWS side do not change, and the tunnel options do not change. Your VPN connection will be temporarily unavailable for a brief period while the VPN connection is updated.

Examples:

Request syntax with placeholder values


resp = client.modify_vpn_connection_options({
  vpn_connection_id: "VpnConnectionId", # required
  local_ipv_4_network_cidr: "String",
  remote_ipv_4_network_cidr: "String",
  local_ipv_6_network_cidr: "String",
  remote_ipv_6_network_cidr: "String",
  dry_run: false,
})

Response structure


resp.vpn_connection.customer_gateway_configuration #=> String
resp.vpn_connection.customer_gateway_id #=> String
resp.vpn_connection.category #=> String
resp.vpn_connection.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.type #=> String, one of "ipsec.1"
resp.vpn_connection.vpn_connection_id #=> String
resp.vpn_connection.vpn_gateway_id #=> String
resp.vpn_connection.transit_gateway_id #=> String
resp.vpn_connection.options.enable_acceleration #=> true/false
resp.vpn_connection.options.static_routes_only #=> true/false
resp.vpn_connection.options.local_ipv_4_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_4_network_cidr #=> String
resp.vpn_connection.options.local_ipv_6_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_6_network_cidr #=> String
resp.vpn_connection.options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connection.options.tunnel_options #=> Array
resp.vpn_connection.options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connection.options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connection.options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].startup_action #=> String
resp.vpn_connection.routes #=> Array
resp.vpn_connection.routes[0].destination_cidr_block #=> String
resp.vpn_connection.routes[0].source #=> String, one of "Static"
resp.vpn_connection.routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.tags #=> Array
resp.vpn_connection.tags[0].key #=> String
resp.vpn_connection.tags[0].value #=> String
resp.vpn_connection.vgw_telemetry #=> Array
resp.vpn_connection.vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connection.vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connection.vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connection.vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connection.vgw_telemetry[0].status_message #=> String
resp.vpn_connection.vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

  • :vpn_connection_id (required, String)

    The ID of the Site-to-Site VPN connection.

  • :local_ipv_4_network_cidr (String)

    The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

    Default: 0.0.0.0/0

  • :remote_ipv_4_network_cidr (String)

    The IPv4 CIDR on the AWS side of the VPN connection.

    Default: 0.0.0.0/0

  • :local_ipv_6_network_cidr (String)

    The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

    Default: ::/0

  • :remote_ipv_6_network_cidr (String)

    The IPv6 CIDR on the AWS side of the VPN connection.

    Default: ::/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:

See Also:

#modify_vpn_tunnel_certificate(options = {}) ⇒ Types::ModifyVpnTunnelCertificateResult

Modifies the VPN tunnel endpoint certificate.

Examples:

Request syntax with placeholder values


resp = client.modify_vpn_tunnel_certificate({
  vpn_connection_id: "VpnConnectionId", # required
  vpn_tunnel_outside_ip_address: "String", # required
  dry_run: false,
})

Response structure


resp.vpn_connection.customer_gateway_configuration #=> String
resp.vpn_connection.customer_gateway_id #=> String
resp.vpn_connection.category #=> String
resp.vpn_connection.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.type #=> String, one of "ipsec.1"
resp.vpn_connection.vpn_connection_id #=> String
resp.vpn_connection.vpn_gateway_id #=> String
resp.vpn_connection.transit_gateway_id #=> String
resp.vpn_connection.options.enable_acceleration #=> true/false
resp.vpn_connection.options.static_routes_only #=> true/false
resp.vpn_connection.options.local_ipv_4_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_4_network_cidr #=> String
resp.vpn_connection.options.local_ipv_6_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_6_network_cidr #=> String
resp.vpn_connection.options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connection.options.tunnel_options #=> Array
resp.vpn_connection.options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connection.options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connection.options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].startup_action #=> String
resp.vpn_connection.routes #=> Array
resp.vpn_connection.routes[0].destination_cidr_block #=> String
resp.vpn_connection.routes[0].source #=> String, one of "Static"
resp.vpn_connection.routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.tags #=> Array
resp.vpn_connection.tags[0].key #=> String
resp.vpn_connection.tags[0].value #=> String
resp.vpn_connection.vgw_telemetry #=> Array
resp.vpn_connection.vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connection.vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connection.vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connection.vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connection.vgw_telemetry[0].status_message #=> String
resp.vpn_connection.vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

  • :vpn_connection_id (required, String)

    The ID of the AWS Site-to-Site VPN connection.

  • :vpn_tunnel_outside_ip_address (required, String)

    The external IP address of the VPN tunnel.

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

See Also:

#modify_vpn_tunnel_options(options = {}) ⇒ Types::ModifyVpnTunnelOptionsResult

Modifies the options for a VPN tunnel in an AWS Site-to-Site VPN connection. You can modify multiple options for a tunnel in a single request, but you can only modify one tunnel at a time. For more information, see Site-to-Site VPN Tunnel Options for Your Site-to-Site VPN Connection in the AWS Site-to-Site VPN User Guide.

Examples:

Request syntax with placeholder values


resp = client.modify_vpn_tunnel_options({
  vpn_connection_id: "VpnConnectionId", # required
  vpn_tunnel_outside_ip_address: "String", # required
  tunnel_options: { # required
    tunnel_inside_cidr: "String",
    tunnel_inside_ipv_6_cidr: "String",
    pre_shared_key: "String",
    phase_1_lifetime_seconds: 1,
    phase_2_lifetime_seconds: 1,
    rekey_margin_time_seconds: 1,
    rekey_fuzz_percentage: 1,
    replay_window_size: 1,
    dpd_timeout_seconds: 1,
    dpd_timeout_action: "String",
    phase_1_encryption_algorithms: [
      {
        value: "String",
      },
    ],
    phase_2_encryption_algorithms: [
      {
        value: "String",
      },
    ],
    phase_1_integrity_algorithms: [
      {
        value: "String",
      },
    ],
    phase_2_integrity_algorithms: [
      {
        value: "String",
      },
    ],
    phase_1_dh_group_numbers: [
      {
        value: 1,
      },
    ],
    phase_2_dh_group_numbers: [
      {
        value: 1,
      },
    ],
    ike_versions: [
      {
        value: "String",
      },
    ],
    startup_action: "String",
  },
  dry_run: false,
})

Response structure


resp.vpn_connection.customer_gateway_configuration #=> String
resp.vpn_connection.customer_gateway_id #=> String
resp.vpn_connection.category #=> String
resp.vpn_connection.state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.type #=> String, one of "ipsec.1"
resp.vpn_connection.vpn_connection_id #=> String
resp.vpn_connection.vpn_gateway_id #=> String
resp.vpn_connection.transit_gateway_id #=> String
resp.vpn_connection.options.enable_acceleration #=> true/false
resp.vpn_connection.options.static_routes_only #=> true/false
resp.vpn_connection.options.local_ipv_4_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_4_network_cidr #=> String
resp.vpn_connection.options.local_ipv_6_network_cidr #=> String
resp.vpn_connection.options.remote_ipv_6_network_cidr #=> String
resp.vpn_connection.options.tunnel_inside_ip_version #=> String, one of "ipv4", "ipv6"
resp.vpn_connection.options.tunnel_options #=> Array
resp.vpn_connection.options.tunnel_options[0].outside_ip_address #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].tunnel_inside_ipv_6_cidr #=> String
resp.vpn_connection.options.tunnel_options[0].pre_shared_key #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_lifetime_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_margin_time_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].rekey_fuzz_percentage #=> Integer
resp.vpn_connection.options.tunnel_options[0].replay_window_size #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_seconds #=> Integer
resp.vpn_connection.options.tunnel_options[0].dpd_timeout_action #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_encryption_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_integrity_algorithms[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_1_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers #=> Array
resp.vpn_connection.options.tunnel_options[0].phase_2_dh_group_numbers[0].value #=> Integer
resp.vpn_connection.options.tunnel_options[0].ike_versions #=> Array
resp.vpn_connection.options.tunnel_options[0].ike_versions[0].value #=> String
resp.vpn_connection.options.tunnel_options[0].startup_action #=> String
resp.vpn_connection.routes #=> Array
resp.vpn_connection.routes[0].destination_cidr_block #=> String
resp.vpn_connection.routes[0].source #=> String, one of "Static"
resp.vpn_connection.routes[0].state #=> String, one of "pending", "available", "deleting", "deleted"
resp.vpn_connection.tags #=> Array
resp.vpn_connection.tags[0].key #=> String
resp.vpn_connection.tags[0].value #=> String
resp.vpn_connection.vgw_telemetry #=> Array
resp.vpn_connection.vgw_telemetry[0].accepted_route_count #=> Integer
resp.vpn_connection.vgw_telemetry[0].last_status_change #=> Time
resp.vpn_connection.vgw_telemetry[0].outside_ip_address #=> String
resp.vpn_connection.vgw_telemetry[0].status #=> String, one of "UP", "DOWN"
resp.vpn_connection.vgw_telemetry[0].status_message #=> String
resp.vpn_connection.vgw_telemetry[0].certificate_arn #=> String

Options Hash (options):

  • :vpn_connection_id (required, String)

    The ID of the AWS Site-to-Site VPN connection.

  • :vpn_tunnel_outside_ip_address (required, String)

    The external IP address of the VPN tunnel.

  • :tunnel_options (required, Types::ModifyVpnTunnelOptionsSpecification)

    The tunnel options to modify.

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

See Also:

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

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitoring your instances and volumes in the Amazon Elastic Compute Cloud User Guide.

To disable detailed monitoring, see .

Examples:

Request syntax with placeholder values


resp = client.monitor_instances({
  instance_ids: ["InstanceId"], # required
  dry_run: false,
})

Response structure


resp.instance_monitorings #=> Array
resp.instance_monitorings[0].instance_id #=> String
resp.instance_monitorings[0].monitoring.state #=> String, one of "disabled", "disabling", "enabled", "pending"

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The IDs of the 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.

Returns:

See Also:

#move_address_to_vpc(options = {}) ⇒ Types::MoveAddressToVpcResult

Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform.

Examples:

Example: To move an address to EC2-VPC


# This example moves the specified Elastic IP address to the EC2-VPC platform.

resp = client.move_address_to_vpc({
  public_ip: "54.123.4.56", 
})

# resp.to_h outputs the following:
{
  status: "MoveInProgress", 
}

Request syntax with placeholder values


resp = client.move_address_to_vpc({
  dry_run: false,
  public_ip: "String", # required
})

Response structure


resp.allocation_id #=> String
resp.status #=> String, one of "MoveInProgress", "InVpc", "InClassic"

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.

  • :public_ip (required, String)

    The Elastic IP address.

Returns:

See Also:

#provision_byoip_cidr(options = {}) ⇒ Types::ProvisionByoipCidrResult

Provisions an IPv4 or IPv6 address range for use with your AWS resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr.

AWS verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide.

Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned. To monitor the status of an address range, use DescribeByoipCidrs. To allocate an Elastic IP address from your IPv4 address pool, use AllocateAddress with either the specific address from the address pool or the ID of the address pool.

Examples:

Request syntax with placeholder values


resp = client.provision_byoip_cidr({
  cidr: "String", # required
  cidr_authorization_context: {
    message: "String", # required
    signature: "String", # required
  },
  publicly_advertisable: false,
  description: "String",
  dry_run: false,
  pool_tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.byoip_cidr.cidr #=> String
resp.byoip_cidr.description #=> String
resp.byoip_cidr.status_message #=> String
resp.byoip_cidr.state #=> String, one of "advertised", "deprovisioned", "failed-deprovision", "failed-provision", "pending-deprovision", "pending-provision", "provisioned", "provisioned-not-publicly-advertisable"

Options Hash (options):

  • :cidr (required, String)

    The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 prefix you can specify is /56. The address range cannot overlap with another address range that you\'ve brought to this or another Region.

  • :cidr_authorization_context (Types::CidrAuthorizationContext)

    A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

  • :publicly_advertisable (Boolean) — default: IPv6 only

    Indicate whether the address range will be publicly advertised to the internet.

    Default: true

  • :description (String)

    A description for the address range and the address pool.

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

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

    The tags to apply to the address pool.

Returns:

See Also:

#purchase_host_reservation(options = {}) ⇒ Types::PurchaseHostReservationResult

Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.

Examples:

Request syntax with placeholder values


resp = client.purchase_host_reservation({
  client_token: "String",
  currency_code: "USD", # accepts USD
  host_id_set: ["DedicatedHostId"], # required
  limit_price: "String",
  offering_id: "OfferingId", # required
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
})

Response structure


resp.client_token #=> String
resp.currency_code #=> String, one of "USD"
resp.purchase #=> Array
resp.purchase[0].currency_code #=> String, one of "USD"
resp.purchase[0].duration #=> Integer
resp.purchase[0].host_id_set #=> Array
resp.purchase[0].host_id_set[0] #=> String
resp.purchase[0].host_reservation_id #=> String
resp.purchase[0].hourly_price #=> String
resp.purchase[0].instance_family #=> String
resp.purchase[0].payment_option #=> String, one of "AllUpfront", "PartialUpfront", "NoUpfront"
resp.purchase[0].upfront_price #=> String
resp.total_hourly_price #=> String
resp.total_upfront_price #=> String

Options Hash (options):

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

  • :currency_code (String)

    The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.

  • :host_id_set (required, Array<String>)

    The IDs of the Dedicated Hosts with which the reservation will be associated.

  • :limit_price (String)

    The specified limit is checked against the total upfront cost of the reservation (calculated as the offering\'s upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD. For example, to indicate a limit price of USD 100, specify 100.00.

  • :offering_id (required, String)

    The ID of the offering.

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

    The tags to apply to the Dedicated Host Reservation during purchase.

Returns:

See Also:

#purchase_reserved_instances_offering(options = {}) ⇒ Types::PurchaseReservedInstancesOfferingResult

Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.

To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.

For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.purchase_reserved_instances_offering({
  instance_count: 1, # required
  reserved_instances_offering_id: "ReservedInstancesOfferingId", # required
  dry_run: false,
  limit_price: {
    amount: 1.0,
    currency_code: "USD", # accepts USD
  },
  purchase_time: Time.now,
})

Response structure


resp.reserved_instances_id #=> String

Options Hash (options):

  • :instance_count (required, Integer)

    The number of Reserved Instances to purchase.

  • :reserved_instances_offering_id (required, String)

    The ID of the Reserved Instance offering to purchase.

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

  • :limit_price (Types::ReservedInstanceLimitPrice)

    Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

  • :purchase_time (Time)

    The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Returns:

See Also:

#purchase_scheduled_instances(options = {}) ⇒ Types::PurchaseScheduledInstancesResult

Purchases the Scheduled Instances with the specified schedule.

Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.

After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

Examples:

Example: To purchase a Scheduled Instance


# This example purchases a Scheduled Instance.

resp = client.purchase_scheduled_instances({
  purchase_requests: [
    {
      instance_count: 1, 
      purchase_token: "eyJ2IjoiMSIsInMiOjEsImMiOi...", 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  scheduled_instance_set: [
    {
      availability_zone: "us-west-2b", 
      create_date: Time.parse("2016-01-25T21:43:38.612Z"), 
      hourly_price: "0.095", 
      instance_count: 1, 
      instance_type: "c4.large", 
      network_platform: "EC2-VPC", 
      next_slot_start_time: Time.parse("2016-01-31T09:00:00Z"), 
      platform: "Linux/UNIX", 
      recurrence: {
        frequency: "Weekly", 
        interval: 1, 
        occurrence_day_set: [
          1, 
        ], 
        occurrence_relative_to_end: false, 
        occurrence_unit: "", 
      }, 
      scheduled_instance_id: "sci-1234-1234-1234-1234-123456789012", 
      slot_duration_in_hours: 32, 
      term_end_date: Time.parse("2017-01-31T09:00:00Z"), 
      term_start_date: Time.parse("2016-01-31T09:00:00Z"), 
      total_scheduled_instance_hours: 1696, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.purchase_scheduled_instances({
  client_token: "String",
  dry_run: false,
  purchase_requests: [ # required
    {
      instance_count: 1, # required
      purchase_token: "String", # required
    },
  ],
})

Response structure


resp.scheduled_instance_set #=> Array
resp.scheduled_instance_set[0].availability_zone #=> String
resp.scheduled_instance_set[0].create_date #=> Time
resp.scheduled_instance_set[0].hourly_price #=> String
resp.scheduled_instance_set[0].instance_count #=> Integer
resp.scheduled_instance_set[0].instance_type #=> String
resp.scheduled_instance_set[0].network_platform #=> String
resp.scheduled_instance_set[0].next_slot_start_time #=> Time
resp.scheduled_instance_set[0].platform #=> String
resp.scheduled_instance_set[0].previous_slot_end_time #=> Time
resp.scheduled_instance_set[0].recurrence.frequency #=> String
resp.scheduled_instance_set[0].recurrence.interval #=> Integer
resp.scheduled_instance_set[0].recurrence.occurrence_day_set #=> Array
resp.scheduled_instance_set[0].recurrence.occurrence_day_set[0] #=> Integer
resp.scheduled_instance_set[0].recurrence.occurrence_relative_to_end #=> true/false
resp.scheduled_instance_set[0].recurrence.occurrence_unit #=> String
resp.scheduled_instance_set[0].scheduled_instance_id #=> String
resp.scheduled_instance_set[0].slot_duration_in_hours #=> Integer
resp.scheduled_instance_set[0].term_end_date #=> Time
resp.scheduled_instance_set[0].term_start_date #=> Time
resp.scheduled_instance_set[0].total_scheduled_instance_hours #=> Integer

Options Hash (options):

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

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

  • :purchase_requests (required, Array<Types::PurchaseRequest>)

    The purchase requests.

Returns:

See Also:

#reboot_instances(options = {}) ⇒ Struct

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Getting console output and rebooting instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To reboot an EC2 instance


# This example reboots the specified EC2 instance.

resp = client.reboot_instances({
  instance_ids: [
    "i-1234567890abcdef5", 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.reboot_instances({
  instance_ids: ["InstanceId"], # required
  dry_run: false,
})

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The instance IDs.

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

  • (Struct)

    Returns an empty response.

See Also:

#register_image(options = {}) ⇒ Types::RegisterImageResult

Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating your own AMIs in the Amazon Elastic Compute Cloud User Guide.

For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.

You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see Launching a Linux instance from a backup in the Amazon Elastic Compute Cloud User Guide.

If any snapshots have AWS Marketplace product codes, they are copied to the new AMI.

Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. To create a new AMI for operating systems that require a billing product code, instead of registering the AMI, do the following to preserve the billing product code association:

  1. Launch an instance from an existing AMI with that billing product code.

  2. Customize the instance.

  3. Create an AMI from the instance using CreateImage.

If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched from an AMI with a billing product code, make sure that the Reserved Instance has the matching billing product code. If you purchase a Reserved Instance without the matching billing product code, the Reserved Instance will not be applied to the On-Demand Instance. For information about how to obtain the platform details and billing information of an AMI, see Obtaining billing information in the Amazon Elastic Compute Cloud User Guide.

If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

Examples:

Request syntax with placeholder values


resp = client.register_image({
  image_location: "String",
  architecture: "i386", # accepts i386, x86_64, arm64
  block_device_mappings: [
    {
      device_name: "String",
      virtual_name: "String",
      ebs: {
        delete_on_termination: false,
        iops: 1,
        snapshot_id: "String",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
        kms_key_id: "String",
        encrypted: false,
      },
      no_device: "String",
    },
  ],
  description: "String",
  dry_run: false,
  ena_support: false,
  kernel_id: "KernelId",
  name: "String", # required
  billing_products: ["String"],
  ramdisk_id: "RamdiskId",
  root_device_name: "String",
  sriov_net_support: "String",
  virtualization_type: "String",
})

Response structure


resp.image_id #=> String

Options Hash (options):

  • :image_location (String)

    The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACLs in the Amazon S3 Service Developer Guide.

  • :architecture (String)

    The architecture of the AMI.

    Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.

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

    The block device mapping entries.

  • :description (String)

    A description for your AMI.

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

  • :ena_support (Boolean)

    Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • :kernel_id (String)

    The ID of the kernel.

  • :name (required, String)

    A name for your AMI.

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

  • :billing_products (Array<String>)

    The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.

  • :ramdisk_id (String)

    The ID of the RAM disk.

  • :root_device_name (String)

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

  • :sriov_net_support (String)

    Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

    There is no way to disable sriovNetSupport at this time.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • :virtualization_type (String)

    The type of virtualization (hvm | paravirtual).

    Default: paravirtual

Returns:

See Also:

#register_instance_event_notification_attributes(options = {}) ⇒ Types::RegisterInstanceEventNotificationAttributesResult

Registers a set of tag keys to include in scheduled event notifications for your resources.

To remove tags, use .

Examples:

Request syntax with placeholder values


resp = client.register_instance_event_notification_attributes({
  dry_run: false,
  instance_tag_attribute: {
    include_all_tags_of_instance: false,
    instance_tag_keys: ["String"],
  },
})

Response structure


resp.instance_tag_attribute.instance_tag_keys #=> Array
resp.instance_tag_attribute.instance_tag_keys[0] #=> String
resp.instance_tag_attribute.include_all_tags_of_instance #=> true/false

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.

  • :instance_tag_attribute (Types::RegisterInstanceTagAttributeRequest)

    Information about the tag keys to register.

Returns:

See Also:

#register_transit_gateway_multicast_group_members(options = {}) ⇒ Types::RegisterTransitGatewayMulticastGroupMembersResult

Registers members (network interfaces) with the transit gateway multicast group. A member is a network interface associated with a supported EC2 instance that receives multicast traffic. For information about supported instances, see Multicast Consideration in Amazon VPC Transit Gateways.

After you add the members, use SearchTransitGatewayMulticastGroups to verify that the members were added to the transit gateway multicast group.

Examples:

Request syntax with placeholder values


resp = client.register_transit_gateway_multicast_group_members({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  group_ip_address: "String",
  network_interface_ids: ["NetworkInterfaceId"],
  dry_run: false,
})

Response structure


resp.registered_multicast_group_members.transit_gateway_multicast_domain_id #=> String
resp.registered_multicast_group_members.registered_network_interface_ids #=> Array
resp.registered_multicast_group_members.registered_network_interface_ids[0] #=> String
resp.registered_multicast_group_members.group_ip_address #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :group_ip_address (String)

    The IP address assigned to the transit gateway multicast group.

  • :network_interface_ids (Array<String>)

    The group members\' network interface IDs to register with the transit gateway multicast group.

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

See Also:

#register_transit_gateway_multicast_group_sources(options = {}) ⇒ Types::RegisterTransitGatewayMulticastGroupSourcesResult

Registers sources (network interfaces) with the specified transit gateway multicast group.

A multicast source is a network interface attached to a supported instance that sends multicast traffic. For information about supported instances, see Multicast Considerations in Amazon VPC Transit Gateways.

After you add the source, use SearchTransitGatewayMulticastGroups to verify that the source was added to the multicast group.

Examples:

Request syntax with placeholder values


resp = client.register_transit_gateway_multicast_group_sources({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  group_ip_address: "String",
  network_interface_ids: ["NetworkInterfaceId"],
  dry_run: false,
})

Response structure


resp.registered_multicast_group_sources.transit_gateway_multicast_domain_id #=> String
resp.registered_multicast_group_sources.registered_network_interface_ids #=> Array
resp.registered_multicast_group_sources.registered_network_interface_ids[0] #=> String
resp.registered_multicast_group_sources.group_ip_address #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

  • :group_ip_address (String)

    The IP address assigned to the transit gateway multicast group.

  • :network_interface_ids (Array<String>)

    The group sources\' network interface IDs to register with the transit gateway multicast group.

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

See Also:

#reject_transit_gateway_peering_attachment(options = {}) ⇒ Types::RejectTransitGatewayPeeringAttachmentResult

Rejects a transit gateway peering attachment request.

Examples:

Request syntax with placeholder values


resp = client.reject_transit_gateway_peering_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_peering_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.requester_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.transit_gateway_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.owner_id #=> String
resp.transit_gateway_peering_attachment.accepter_tgw_info.region #=> String
resp.transit_gateway_peering_attachment.status.code #=> String
resp.transit_gateway_peering_attachment.status.message #=> String
resp.transit_gateway_peering_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_peering_attachment.creation_time #=> Time
resp.transit_gateway_peering_attachment.tags #=> Array
resp.transit_gateway_peering_attachment.tags[0].key #=> String
resp.transit_gateway_peering_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the transit gateway peering attachment.

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

See Also:

#reject_transit_gateway_vpc_attachment(options = {}) ⇒ Types::RejectTransitGatewayVpcAttachmentResult

Rejects a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment to accept a VPC attachment request.

Examples:

Request syntax with placeholder values


resp = client.reject_transit_gateway_vpc_attachment({
  transit_gateway_attachment_id: "TransitGatewayAttachmentId", # required
  dry_run: false,
})

Response structure


resp.transit_gateway_vpc_attachment.transit_gateway_attachment_id #=> String
resp.transit_gateway_vpc_attachment.transit_gateway_id #=> String
resp.transit_gateway_vpc_attachment.vpc_id #=> String
resp.transit_gateway_vpc_attachment.vpc_owner_id #=> String
resp.transit_gateway_vpc_attachment.state #=> String, one of "initiating", "initiatingRequest", "pendingAcceptance", "rollingBack", "pending", "available", "modifying", "deleting", "deleted", "failed", "rejected", "rejecting", "failing"
resp.transit_gateway_vpc_attachment.subnet_ids #=> Array
resp.transit_gateway_vpc_attachment.subnet_ids[0] #=> String
resp.transit_gateway_vpc_attachment.creation_time #=> Time
resp.transit_gateway_vpc_attachment.options.dns_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.ipv_6_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.options.appliance_mode_support #=> String, one of "enable", "disable"
resp.transit_gateway_vpc_attachment.tags #=> Array
resp.transit_gateway_vpc_attachment.tags[0].key #=> String
resp.transit_gateway_vpc_attachment.tags[0].value #=> String

Options Hash (options):

  • :transit_gateway_attachment_id (required, String)

    The ID of the attachment.

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

See Also:

#reject_vpc_endpoint_connections(options = {}) ⇒ Types::RejectVpcEndpointConnectionsResult

Rejects one or more VPC endpoint connection requests to your VPC endpoint service.

Examples:

Request syntax with placeholder values


resp = client.reject_vpc_endpoint_connections({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
  vpc_endpoint_ids: ["VpcEndpointId"], # required
})

Response structure


resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

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.

  • :service_id (required, String)

    The ID of the service.

  • :vpc_endpoint_ids (required, Array<String>)

    The IDs of one or more VPC endpoints.

Returns:

See Also:

#reject_vpc_peering_connection(options = {}) ⇒ Types::RejectVpcPeeringConnectionResult

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection.

Examples:

Request syntax with placeholder values


resp = client.reject_vpc_peering_connection({
  dry_run: false,
  vpc_peering_connection_id: "VpcPeeringConnectionId", # required
})

Response structure


resp.return #=> true/false

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_peering_connection_id (required, String)

    The ID of the VPC peering connection.

Returns:

See Also:

#release_address(options = {}) ⇒ Struct

Releases the specified Elastic IP address.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress.

[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse).

After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another AWS account.

[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see AllocateAddress.

Examples:

Example: To release an Elastic IP address for EC2-VPC


# This example releases an Elastic IP address for use with instances in a VPC.

resp = client.release_address({
  allocation_id: "eipalloc-64d5890a", 
})

Example: To release an Elastic IP addresses for EC2-Classic


# This example releases an Elastic IP address for use with instances in EC2-Classic.

resp = client.release_address({
  public_ip: "198.51.100.0", 
})

Request syntax with placeholder values


resp = client.release_address({
  allocation_id: "AllocationId",
  public_ip: "String",
  network_border_group: "String",
  dry_run: false,
})

Options Hash (options):

  • :allocation_id (String)

    [EC2-VPC] The allocation ID. Required for EC2-VPC.

  • :public_ip (String)

    [EC2-Classic] The Elastic IP address. Required for EC2-Classic.

  • :network_border_group (String)

    The set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses.

    If you provide an incorrect network border group, you will receive an InvalidAddress.NotFound error. For more information, see Error Codes.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you will receive an InvalidParameterCombination error. For more information, see Error Codes.

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

  • (Struct)

    Returns an empty response.

See Also:

#release_hosts(options = {}) ⇒ Types::ReleaseHostsResult

When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into released state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, for example, to modify the host. You must stop or terminate all instances on a host before it can be released.

When Dedicated Hosts are released, it may take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated Hosts. Wait a few minutes and then try again.

Released hosts still appear in a DescribeHosts response.

Examples:

Request syntax with placeholder values


resp = client.release_hosts({
  host_ids: ["DedicatedHostId"], # required
})

Response structure


resp.successful #=> Array
resp.successful[0] #=> String
resp.unsuccessful #=> Array
resp.unsuccessful[0].error.code #=> String
resp.unsuccessful[0].error.message #=> String
resp.unsuccessful[0].resource_id #=> String

Options Hash (options):

  • :host_ids (required, Array<String>)

    The IDs of the Dedicated Hosts to release.

Returns:

See Also:

#replace_iam_instance_profile_association(options = {}) ⇒ Types::ReplaceIamInstanceProfileAssociationResult

Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.

Use DescribeIamInstanceProfileAssociations to get the association ID.

Examples:

Request syntax with placeholder values


resp = client.replace_iam_instance_profile_association({
  iam_instance_profile: { # required
    arn: "String",
    name: "String",
  },
  association_id: "IamInstanceProfileAssociationId", # required
})

Response structure


resp.iam_instance_profile_association.association_id #=> String
resp.iam_instance_profile_association.instance_id #=> String
resp.iam_instance_profile_association.iam_instance_profile.arn #=> String
resp.iam_instance_profile_association.iam_instance_profile.id #=> String
resp.iam_instance_profile_association.state #=> String, one of "associating", "associated", "disassociating", "disassociated"
resp.iam_instance_profile_association.timestamp #=> Time

Options Hash (options):

  • :iam_instance_profile (required, Types::IamInstanceProfileSpecification)

    The IAM instance profile.

  • :association_id (required, String)

    The ID of the existing IAM instance profile association.

Returns:

See Also:

#replace_network_acl_association(options = {}) ⇒ Types::ReplaceNetworkAclAssociationResult

Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

This is an idempotent operation.

Examples:

Example: To replace the network ACL associated with a subnet


# This example associates the specified network ACL with the subnet for the specified network ACL association.

resp = client.replace_network_acl_association({
  association_id: "aclassoc-e5b95c8c", 
  network_acl_id: "acl-5fb85d36", 
})

# resp.to_h outputs the following:
{
  new_association_id: "aclassoc-3999875b", 
}

Request syntax with placeholder values


resp = client.replace_network_acl_association({
  association_id: "NetworkAclAssociationId", # required
  dry_run: false,
  network_acl_id: "NetworkAclId", # required
})

Response structure


resp.new_association_id #=> String

Options Hash (options):

  • :association_id (required, String)

    The ID of the current association between the original network ACL and the subnet.

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

  • :network_acl_id (required, String)

    The ID of the new network ACL to associate with the subnet.

Returns:

See Also:

#replace_network_acl_entry(options = {}) ⇒ Struct

Replaces an entry (rule) in a network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To replace a network ACL entry


# This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.

resp = client.replace_network_acl_entry({
  cidr_block: "203.0.113.12/24", 
  egress: false, 
  network_acl_id: "acl-5fb85d36", 
  port_range: {
    from: 53, 
    to: 53, 
  }, 
  protocol: "17", 
  rule_action: "allow", 
  rule_number: 100, 
})

Request syntax with placeholder values


resp = client.replace_network_acl_entry({
  cidr_block: "String",
  dry_run: false,
  egress: false, # required
  icmp_type_code: {
    code: 1,
    type: 1,
  },
  ipv_6_cidr_block: "String",
  network_acl_id: "NetworkAclId", # required
  port_range: {
    from: 1,
    to: 1,
  },
  protocol: "String", # required
  rule_action: "allow", # required, accepts allow, deny
  rule_number: 1, # required
})

Options Hash (options):

  • :cidr_block (String)

    The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24).

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

  • :egress (required, Boolean)

    Indicates whether to replace the egress rule.

    Default: If no value is specified, we replace the ingress rule.

  • :icmp_type_code (Types::IcmpTypeCode)

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

  • :ipv_6_cidr_block (String)

    The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64).

  • :network_acl_id (required, String)

    The ID of the ACL.

  • :port_range (Types::PortRange)

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

  • :protocol (required, String)

    The protocol number. A value of \"-1\" means all protocols. If you specify \"-1\" or a protocol number other than \"6\" (TCP), \"17\" (UDP), or \"1\" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol \"58\" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol \"58\" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • :rule_action (required, String)

    Indicates whether to allow or deny the traffic that matches the rule.

  • :rule_number (required, Integer)

    The rule number of the entry to replace.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#replace_route(options = {}) ⇒ Struct

Replaces an existing route within a route table in a VPC. You must provide only one of the following: internet gateway, virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.

For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To replace a route


# This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.

resp = client.replace_route({
  destination_cidr_block: "10.0.0.0/16", 
  gateway_id: "vgw-9a4cacf3", 
  route_table_id: "rtb-22574640", 
})

Request syntax with placeholder values


resp = client.replace_route({
  destination_cidr_block: "String",
  destination_ipv_6_cidr_block: "String",
  destination_prefix_list_id: "PrefixListResourceId",
  dry_run: false,
  vpc_endpoint_id: "VpcEndpointId",
  egress_only_internet_gateway_id: "EgressOnlyInternetGatewayId",
  gateway_id: "RouteGatewayId",
  instance_id: "InstanceId",
  local_target: false,
  nat_gateway_id: "NatGatewayId",
  transit_gateway_id: "TransitGatewayId",
  local_gateway_id: "LocalGatewayId",
  carrier_gateway_id: "CarrierGatewayId",
  network_interface_id: "NetworkInterfaceId",
  route_table_id: "RouteTableId", # required
  vpc_peering_connection_id: "VpcPeeringConnectionId",
})

Options Hash (options):

  • :destination_cidr_block (String)

    The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

  • :destination_ipv_6_cidr_block (String)

    The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

  • :destination_prefix_list_id (String)

    The ID of the prefix list for the route.

  • :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_endpoint_id (String)

    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

  • :egress_only_internet_gateway_id (String)

    [IPv6 traffic only] The ID of an egress-only internet gateway.

  • :gateway_id (String)

    The ID of an internet gateway or virtual private gateway.

  • :instance_id (String)

    The ID of a NAT instance in your VPC.

  • :local_target (Boolean)

    Specifies whether to reset the local route to its default target (local).

  • :nat_gateway_id (String)

    [IPv4 traffic only] The ID of a NAT gateway.

  • :transit_gateway_id (String)

    The ID of a transit gateway.

  • :local_gateway_id (String)

    The ID of the local gateway.

  • :carrier_gateway_id (String)

    [IPv4 traffic only] The ID of a carrier gateway.

  • :network_interface_id (String)

    The ID of a network interface.

  • :route_table_id (required, String)

    The ID of the route table.

  • :vpc_peering_connection_id (String)

    The ID of a VPC peering connection.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#replace_route_table_association(options = {}) ⇒ Types::ReplaceRouteTableAssociationResult

Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation completes, the subnet or gateway uses the routes in the new route table. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.

Examples:

Example: To replace the route table associated with a subnet


# This example associates the specified route table with the subnet for the specified route table association.

resp = client.replace_route_table_association({
  association_id: "rtbassoc-781d0d1a", 
  route_table_id: "rtb-22574640", 
})

# resp.to_h outputs the following:
{
  new_association_id: "rtbassoc-3a1f0f58", 
}

Request syntax with placeholder values


resp = client.replace_route_table_association({
  association_id: "RouteTableAssociationId", # required
  dry_run: false,
  route_table_id: "RouteTableId", # required
})

Response structure


resp.new_association_id #=> String
resp.association_state.state #=> String, one of "associating", "associated", "disassociating", "disassociated", "failed"
resp.association_state.status_message #=> String

Options Hash (options):

  • :association_id (required, String)

    The association ID.

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

  • :route_table_id (required, String)

    The ID of the new route table to associate with the subnet.

Returns:

See Also:

#replace_transit_gateway_route(options = {}) ⇒ Types::ReplaceTransitGatewayRouteResult

Replaces the specified route in the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.replace_transit_gateway_route({
  destination_cidr_block: "String", # required
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  transit_gateway_attachment_id: "TransitGatewayAttachmentId",
  blackhole: false,
  dry_run: false,
})

Response structure


resp.route.destination_cidr_block #=> String
resp.route.prefix_list_id #=> String
resp.route.transit_gateway_attachments #=> Array
resp.route.transit_gateway_attachments[0].resource_id #=> String
resp.route.transit_gateway_attachments[0].transit_gateway_attachment_id #=> String
resp.route.transit_gateway_attachments[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.route.type #=> String, one of "static", "propagated"
resp.route.state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"

Options Hash (options):

  • :destination_cidr_block (required, String)

    The CIDR range used for the destination match. Routing decisions are based on the most specific match.

  • :transit_gateway_route_table_id (required, String)

    The ID of the route table.

  • :transit_gateway_attachment_id (String)

    The ID of the attachment.

  • :blackhole (Boolean)

    Indicates whether traffic matching this route is to be dropped.

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

See Also:

#report_instance_status(options = {}) ⇒ Struct

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus, use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus.

Examples:

Request syntax with placeholder values


resp = client.report_instance_status({
  description: "String",
  dry_run: false,
  end_time: Time.now,
  instances: ["InstanceId"], # required
  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
  start_time: Time.now,
  status: "ok", # required, accepts ok, impaired
})

Options Hash (options):

  • :description (String)

    Descriptive text about the health state of your instance.

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

  • :end_time (Time)

    The time at which the reported instance health state ended.

  • :instances (required, Array<String>)

    The instances.

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

  • :start_time (Time)

    The time at which the reported instance health state began.

  • :status (required, String)

    The status of all instances listed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#request_spot_fleet(options = {}) ⇒ Types::RequestSpotFleetResponse

Creates a Spot Fleet request.

The Spot Fleet request specifies the total target capacity and the On-Demand target capacity. Amazon EC2 calculates the difference between the total capacity and On-Demand capacity, and launches the difference as Spot capacity.

You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

By default, the Spot Fleet requests Spot Instances in the Spot Instance pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.

Alternatively, you can specify that the Spot Fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot Instances in your Spot Fleet are in different Spot pools, you can improve the availability of your fleet.

You can specify tags for the Spot Fleet request and instances launched by the fleet. You cannot tag other resource types in a Spot Fleet request because only the spot-fleet-request and instance resource types are supported.

For more information, see Spot Fleet requests in the Amazon EC2 User Guide for Linux Instances.

Examples:

Example: To request a Spot fleet in the subnet with the lowest price


# This example creates a Spot fleet request with two launch specifications that differ only by subnet. The Spot fleet launches the instances in the specified subnet with the lowest price. If the instances are launched in a default VPC, they receive a public IP address by default. If the instances are launched in a nondefault VPC, they do not receive a public IP address by default. Note that you can't specify different subnets from the same Availability Zone in a Spot fleet request.

resp = client.request_spot_fleet({
  spot_fleet_request_config: {
    iam_fleet_role: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
    launch_specifications: [
      {
        iam_instance_profile: {
          arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role", 
        }, 
        image_id: "ami-1a2b3c4d", 
        instance_type: "m3.medium", 
        key_name: "my-key-pair", 
        security_groups: [
          {
            group_id: "sg-1a2b3c4d", 
          }, 
        ], 
        subnet_id: "subnet-1a2b3c4d, subnet-3c4d5e6f", 
      }, 
    ], 
    spot_price: "0.04", 
    target_capacity: 2, 
  }, 
})

# resp.to_h outputs the following:
{
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
}

Example: To request a Spot fleet in the Availability Zone with the lowest price


# This example creates a Spot fleet request with two launch specifications that differ only by Availability Zone. The Spot fleet launches the instances in the specified Availability Zone with the lowest price. If your account supports EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of the Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the Availability Zone.

resp = client.request_spot_fleet({
  spot_fleet_request_config: {
    iam_fleet_role: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
    launch_specifications: [
      {
        iam_instance_profile: {
          arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role", 
        }, 
        image_id: "ami-1a2b3c4d", 
        instance_type: "m3.medium", 
        key_name: "my-key-pair", 
        placement: {
          availability_zone: "us-west-2a, us-west-2b", 
        }, 
        security_groups: [
          {
            group_id: "sg-1a2b3c4d", 
          }, 
        ], 
      }, 
    ], 
    spot_price: "0.04", 
    target_capacity: 2, 
  }, 
})

# resp.to_h outputs the following:
{
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
}

Example: To launch Spot instances in a subnet and assign them public IP addresses


# This example assigns public addresses to instances launched in a nondefault VPC. Note that when you specify a network interface, you must include the subnet ID and security group ID using the network interface.

resp = client.request_spot_fleet({
  spot_fleet_request_config: {
    iam_fleet_role: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
    launch_specifications: [
      {
        iam_instance_profile: {
          arn: "arn:aws:iam::880185128111:instance-profile/my-iam-role", 
        }, 
        image_id: "ami-1a2b3c4d", 
        instance_type: "m3.medium", 
        key_name: "my-key-pair", 
        network_interfaces: [
          {
            associate_public_ip_address: true, 
            device_index: 0, 
            groups: [
              "sg-1a2b3c4d", 
            ], 
            subnet_id: "subnet-1a2b3c4d", 
          }, 
        ], 
      }, 
    ], 
    spot_price: "0.04", 
    target_capacity: 2, 
  }, 
})

# resp.to_h outputs the following:
{
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
}

Example: To request a Spot fleet using the diversified allocation strategy


# This example creates a Spot fleet request that launches 30 instances using the diversified allocation strategy. The launch specifications differ by instance type. The Spot fleet distributes the instances across the launch specifications such that there are 10 instances of each type.

resp = client.request_spot_fleet({
  spot_fleet_request_config: {
    allocation_strategy: "diversified", 
    iam_fleet_role: "arn:aws:iam::123456789012:role/my-spot-fleet-role", 
    launch_specifications: [
      {
        image_id: "ami-1a2b3c4d", 
        instance_type: "c4.2xlarge", 
        subnet_id: "subnet-1a2b3c4d", 
      }, 
      {
        image_id: "ami-1a2b3c4d", 
        instance_type: "m3.2xlarge", 
        subnet_id: "subnet-1a2b3c4d", 
      }, 
      {
        image_id: "ami-1a2b3c4d", 
        instance_type: "r3.2xlarge", 
        subnet_id: "subnet-1a2b3c4d", 
      }, 
    ], 
    spot_price: "0.70", 
    target_capacity: 30, 
  }, 
})

# resp.to_h outputs the following:
{
  spot_fleet_request_id: "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE", 
}

Request syntax with placeholder values


resp = client.request_spot_fleet({
  dry_run: false,
  spot_fleet_request_config: { # required
    allocation_strategy: "lowestPrice", # accepts lowestPrice, diversified, capacityOptimized
    on_demand_allocation_strategy: "lowestPrice", # accepts lowestPrice, prioritized
    spot_maintenance_strategies: {
      capacity_rebalance: {
        replacement_strategy: "launch", # accepts launch
      },
    },
    client_token: "String",
    excess_capacity_termination_policy: "noTermination", # accepts noTermination, default
    fulfilled_capacity: 1.0,
    on_demand_fulfilled_capacity: 1.0,
    iam_fleet_role: "String", # required
    launch_specifications: [
      {
        security_groups: [
          {
            group_name: "String",
            group_id: "String",
          },
        ],
        addressing_type: "String",
        block_device_mappings: [
          {
            device_name: "String",
            virtual_name: "String",
            ebs: {
              delete_on_termination: false,
              iops: 1,
              snapshot_id: "String",
              volume_size: 1,
              volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
              kms_key_id: "String",
              encrypted: false,
            },
            no_device: "String",
          },
        ],
        ebs_optimized: false,
        iam_instance_profile: {
          arn: "String",
          name: "String",
        },
        image_id: "String",
        instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
        kernel_id: "String",
        key_name: "String",
        monitoring: {
          enabled: false,
        },
        network_interfaces: [
          {
            associate_public_ip_address: false,
            delete_on_termination: false,
            description: "String",
            device_index: 1,
            groups: ["SecurityGroupId"],
            ipv_6_address_count: 1,
            ipv_6_addresses: [
              {
                ipv_6_address: "String",
              },
            ],
            network_interface_id: "String",
            private_ip_address: "String",
            private_ip_addresses: [
              {
                primary: false,
                private_ip_address: "String",
              },
            ],
            secondary_private_ip_address_count: 1,
            subnet_id: "String",
            associate_carrier_ip_address: false,
            interface_type: "String",
            network_card_index: 1,
          },
        ],
        placement: {
          availability_zone: "String",
          group_name: "String",
          tenancy: "default", # accepts default, dedicated, host
        },
        ramdisk_id: "String",
        spot_price: "String",
        subnet_id: "String",
        user_data: "String",
        weighted_capacity: 1.0,
        tag_specifications: [
          {
            resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
            tags: [
              {
                key: "String",
                value: "String",
              },
            ],
          },
        ],
      },
    ],
    launch_template_configs: [
      {
        launch_template_specification: {
          launch_template_id: "String",
          launch_template_name: "LaunchTemplateName",
          version: "String",
        },
        overrides: [
          {
            instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
            spot_price: "String",
            subnet_id: "String",
            availability_zone: "String",
            weighted_capacity: 1.0,
            priority: 1.0,
          },
        ],
      },
    ],
    spot_price: "String",
    target_capacity: 1, # required
    on_demand_target_capacity: 1,
    on_demand_max_total_price: "String",
    spot_max_total_price: "String",
    terminate_instances_with_expiration: false,
    type: "request", # accepts request, maintain, instant
    valid_from: Time.now,
    valid_until: Time.now,
    replace_unhealthy_instances: false,
    instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
    load_balancers_config: {
      classic_load_balancers_config: {
        classic_load_balancers: [
          {
            name: "String",
          },
        ],
      },
      target_groups_config: {
        target_groups: [
          {
            arn: "String",
          },
        ],
      },
    },
    instance_pools_to_use_count: 1,
    tag_specifications: [
      {
        resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
        tags: [
          {
            key: "String",
            value: "String",
          },
        ],
      },
    ],
  },
})

Response structure


resp.spot_fleet_request_id #=> String

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.

  • :spot_fleet_request_config (required, Types::SpotFleetRequestConfigData)

    The configuration for the Spot Fleet request.

Returns:

See Also:

#request_spot_instances(options = {}) ⇒ Types::RequestSpotInstancesResult

Creates a Spot Instance request.

For more information, see Spot Instance requests in the Amazon EC2 User Guide for Linux Instances.

Examples:

Example: To create a one-time Spot Instance request


# This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.

resp = client.request_spot_instances({
  instance_count: 5, 
  launch_specification: {
    iam_instance_profile: {
      arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role", 
    }, 
    image_id: "ami-1a2b3c4d", 
    instance_type: "m3.medium", 
    key_name: "my-key-pair", 
    placement: {
      availability_zone: "us-west-2a", 
    }, 
    security_group_ids: [
      "sg-1a2b3c4d", 
    ], 
  }, 
  spot_price: "0.03", 
  type: "one-time", 
})

Example: To create a one-time Spot Instance request


# This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.

resp = client.request_spot_instances({
  instance_count: 5, 
  launch_specification: {
    iam_instance_profile: {
      arn: "arn:aws:iam::123456789012:instance-profile/my-iam-role", 
    }, 
    image_id: "ami-1a2b3c4d", 
    instance_type: "m3.medium", 
    security_group_ids: [
      "sg-1a2b3c4d", 
    ], 
    subnet_id: "subnet-1a2b3c4d", 
  }, 
  spot_price: "0.050", 
  type: "one-time", 
})

Request syntax with placeholder values


resp = client.request_spot_instances({
  availability_zone_group: "String",
  block_duration_minutes: 1,
  client_token: "String",
  dry_run: false,
  instance_count: 1,
  launch_group: "String",
  launch_specification: {
    security_group_ids: ["SecurityGroupId"],
    security_groups: ["SecurityGroupName"],
    addressing_type: "String",
    block_device_mappings: [
      {
        device_name: "String",
        virtual_name: "String",
        ebs: {
          delete_on_termination: false,
          iops: 1,
          snapshot_id: "String",
          volume_size: 1,
          volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
          kms_key_id: "String",
          encrypted: false,
        },
        no_device: "String",
      },
    ],
    ebs_optimized: false,
    iam_instance_profile: {
      arn: "String",
      name: "String",
    },
    image_id: "ImageId",
    instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
    kernel_id: "KernelId",
    key_name: "KeyPairName",
    monitoring: {
      enabled: false, # required
    },
    network_interfaces: [
      {
        associate_public_ip_address: false,
        delete_on_termination: false,
        description: "String",
        device_index: 1,
        groups: ["SecurityGroupId"],
        ipv_6_address_count: 1,
        ipv_6_addresses: [
          {
            ipv_6_address: "String",
          },
        ],
        network_interface_id: "String",
        private_ip_address: "String",
        private_ip_addresses: [
          {
            primary: false,
            private_ip_address: "String",
          },
        ],
        secondary_private_ip_address_count: 1,
        subnet_id: "String",
        associate_carrier_ip_address: false,
        interface_type: "String",
        network_card_index: 1,
      },
    ],
    placement: {
      availability_zone: "String",
      group_name: "String",
      tenancy: "default", # accepts default, dedicated, host
    },
    ramdisk_id: "RamdiskId",
    subnet_id: "SubnetId",
    user_data: "String",
  },
  spot_price: "String",
  type: "one-time", # accepts one-time, persistent
  valid_from: Time.now,
  valid_until: Time.now,
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
})

Response structure


resp.spot_instance_requests #=> Array
resp.spot_instance_requests[0].actual_block_hourly_price #=> String
resp.spot_instance_requests[0].availability_zone_group #=> String
resp.spot_instance_requests[0].block_duration_minutes #=> Integer
resp.spot_instance_requests[0].create_time #=> Time
resp.spot_instance_requests[0].fault.code #=> String
resp.spot_instance_requests[0].fault.message #=> String
resp.spot_instance_requests[0].instance_id #=> String
resp.spot_instance_requests[0].launch_group #=> String
resp.spot_instance_requests[0].launch_specification.user_data #=> String
resp.spot_instance_requests[0].launch_specification.security_groups #=> Array
resp.spot_instance_requests[0].launch_specification.security_groups[0].group_name #=> String
resp.spot_instance_requests[0].launch_specification.security_groups[0].group_id #=> String
resp.spot_instance_requests[0].launch_specification.addressing_type #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings #=> Array
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].device_name #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].virtual_name #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.iops #=> Integer
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.snapshot_id #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.volume_size #=> Integer
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.volume_type #=> String, one of "standard", "io1", "io2", "gp2", "sc1", "st1"
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.kms_key_id #=> String
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].ebs.encrypted #=> true/false
resp.spot_instance_requests[0].launch_specification.block_device_mappings[0].no_device #=> String
resp.spot_instance_requests[0].launch_specification.ebs_optimized #=> true/false
resp.spot_instance_requests[0].launch_specification.iam_instance_profile.arn #=> String
resp.spot_instance_requests[0].launch_specification.iam_instance_profile.name #=> String
resp.spot_instance_requests[0].launch_specification.image_id #=> String
resp.spot_instance_requests[0].launch_specification.instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.spot_instance_requests[0].launch_specification.kernel_id #=> String
resp.spot_instance_requests[0].launch_specification.key_name #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].associate_public_ip_address #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].delete_on_termination #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].description #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].device_index #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].groups #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].groups[0] #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_address_count #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_addresses #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].network_interface_id #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses #=> Array
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].secondary_private_ip_address_count #=> Integer
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].subnet_id #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].associate_carrier_ip_address #=> true/false
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].interface_type #=> String
resp.spot_instance_requests[0].launch_specification.network_interfaces[0].network_card_index #=> Integer
resp.spot_instance_requests[0].launch_specification.placement.availability_zone #=> String
resp.spot_instance_requests[0].launch_specification.placement.group_name #=> String
resp.spot_instance_requests[0].launch_specification.placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.spot_instance_requests[0].launch_specification.ramdisk_id #=> String
resp.spot_instance_requests[0].launch_specification.subnet_id #=> String
resp.spot_instance_requests[0].launch_specification.monitoring.enabled #=> true/false
resp.spot_instance_requests[0].launched_availability_zone #=> String
resp.spot_instance_requests[0].product_description #=> String, one of "Linux/UNIX", "Linux/UNIX (Amazon VPC)", "Windows", "Windows (Amazon VPC)"
resp.spot_instance_requests[0].spot_instance_request_id #=> String
resp.spot_instance_requests[0].spot_price #=> String
resp.spot_instance_requests[0].state #=> String, one of "open", "active", "closed", "cancelled", "failed"
resp.spot_instance_requests[0].status.code #=> String
resp.spot_instance_requests[0].status.message #=> String
resp.spot_instance_requests[0].status.update_time #=> Time
resp.spot_instance_requests[0].tags #=> Array
resp.spot_instance_requests[0].tags[0].key #=> String
resp.spot_instance_requests[0].tags[0].value #=> String
resp.spot_instance_requests[0].type #=> String, one of "one-time", "persistent"
resp.spot_instance_requests[0].valid_from #=> Time
resp.spot_instance_requests[0].valid_until #=> Time
resp.spot_instance_requests[0].instance_interruption_behavior #=> String, one of "hibernate", "stop", "terminate"

Options Hash (options):

  • :availability_zone_group (String)

    The user-specified name for a logical grouping of requests.

    When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.

    If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.

    Default: Instances are launched in any available Availability Zone.

  • :block_duration_minutes (Integer)

    The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

    The duration period starts as soon as your Spot Instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.

    You can\'t specify an Availability Zone group or a launch group if you specify a duration.

    New accounts or accounts with no previous billing history with AWS are not eligible for Spot Instances with a defined duration (also known as Spot blocks).

  • :client_token (String)

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon EC2 User Guide for Linux 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.

  • :instance_count (Integer)

    The maximum number of Spot Instances to launch.

    Default: 1

  • :launch_group (String)

    The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

    Default: Instances are launched and terminated individually

  • :launch_specification (Types::RequestSpotLaunchSpecification)

    The launch specification.

  • :spot_price (String)

    The maximum price per hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.

  • :type (String)

    The Spot Instance request type.

    Default: one-time

  • :valid_from (Time)

    The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

    The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.

  • :valid_until (Time)

    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

    • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.

    • For a one-time request, the request remains active until all instances launch, the request is canceled, or the ValidUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

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

    The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType must be spot-instances-request, otherwise the Spot Instance request fails. To tag the Spot Instance request after it has been created, see CreateTags.

  • :instance_interruption_behavior (String)

    The behavior when a Spot Instance is interrupted. The default is terminate.

Returns:

See Also:

#reset_ebs_default_kms_key_id(options = {}) ⇒ Types::ResetEbsDefaultKmsKeyIdResult

Resets the default customer master key (CMK) for EBS encryption for your account in this Region to the AWS managed CMK for EBS.

After resetting the default CMK to the AWS managed CMK, you can continue to encrypt by a customer managed CMK by specifying it when you create the volume. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.reset_ebs_default_kms_key_id({
  dry_run: false,
})

Response structure


resp.kms_key_id #=> String

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.

Returns:

See Also:

#reset_fpga_image_attribute(options = {}) ⇒ Types::ResetFpgaImageAttributeResult

Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default value. You can only reset the load permission attribute.

Examples:

Request syntax with placeholder values


resp = client.reset_fpga_image_attribute({
  dry_run: false,
  fpga_image_id: "FpgaImageId", # required
  attribute: "loadPermission", # accepts loadPermission
})

Response structure


resp.return #=> true/false

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.

  • :fpga_image_id (required, String)

    The ID of the AFI.

  • :attribute (String)

    The attribute.

Returns:

See Also:

#reset_image_attribute(options = {}) ⇒ Struct

Resets an attribute of an AMI to its default value.

The productCodes attribute can't be reset.

Examples:

Example: To reset the launchPermission attribute


# This example resets the launchPermission attribute for the specified AMI. By default, AMIs are private.

resp = client.reset_image_attribute({
  attribute: "launchPermission", 
  image_id: "ami-5731123e", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.reset_image_attribute({
  attribute: "launchPermission", # required, accepts launchPermission
  image_id: "ImageId", # required
  dry_run: false,
})

Options Hash (options):

  • :attribute (required, String)

    The attribute to reset (currently you can only reset the launch permission attribute).

  • :image_id (required, String)

    The ID of the AMI.

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

  • (Struct)

    Returns an empty response.

See Also:

#reset_instance_attribute(options = {}) ⇒ Struct

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true, which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

Examples:

Example: To reset the sourceDestCheck attribute


# This example resets the sourceDestCheck attribute for the specified instance.

resp = client.reset_instance_attribute({
  attribute: "sourceDestCheck", 
  instance_id: "i-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.reset_instance_attribute({
  attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions
  dry_run: false,
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :attribute (required, String)

    The attribute to reset.

    You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. To change an instance attribute, use ModifyInstanceAttribute.

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

  • :instance_id (required, String)

    The ID of the instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#reset_network_interface_attribute(options = {}) ⇒ Struct

Resets a network interface attribute. You can specify only one attribute at a time.

Examples:

Request syntax with placeholder values


resp = client.reset_network_interface_attribute({
  dry_run: false,
  network_interface_id: "NetworkInterfaceId", # required
  source_dest_check: "String",
})

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.

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :source_dest_check (String)

    The source/destination checking attribute. Resets the value to true.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#reset_snapshot_attribute(options = {}) ⇒ Struct

Resets permission settings for the specified snapshot.

For more information about modifying snapshot permissions, see Sharing snapshots in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To reset a snapshot attribute


# This example resets the create volume permissions for snapshot ``snap-1234567890abcdef0``. If the command succeeds, no output is returned.

resp = client.reset_snapshot_attribute({
  attribute: "createVolumePermission", 
  snapshot_id: "snap-1234567890abcdef0", 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.reset_snapshot_attribute({
  attribute: "productCodes", # required, accepts productCodes, createVolumePermission
  snapshot_id: "SnapshotId", # required
  dry_run: false,
})

Options Hash (options):

  • :attribute (required, String)

    The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

  • :snapshot_id (required, String)

    The ID of the snapshot.

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

  • (Struct)

    Returns an empty response.

See Also:

#restore_address_to_classic(options = {}) ⇒ Types::RestoreAddressToClassicResult

Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.

Examples:

Example: To restore an address to EC2-Classic


# This example restores the specified Elastic IP address to the EC2-Classic platform.

resp = client.restore_address_to_classic({
  public_ip: "198.51.100.0", 
})

# resp.to_h outputs the following:
{
  public_ip: "198.51.100.0", 
  status: "MoveInProgress", 
}

Request syntax with placeholder values


resp = client.restore_address_to_classic({
  dry_run: false,
  public_ip: "String", # required
})

Response structure


resp.public_ip #=> String
resp.status #=> String, one of "MoveInProgress", "InVpc", "InClassic"

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.

  • :public_ip (required, String)

    The Elastic IP address.

Returns:

See Also:

#restore_managed_prefix_list_version(options = {}) ⇒ Types::RestoreManagedPrefixListVersionResult

Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.

Examples:

Request syntax with placeholder values


resp = client.restore_managed_prefix_list_version({
  dry_run: false,
  prefix_list_id: "PrefixListResourceId", # required
  previous_version: 1, # required
  current_version: 1, # required
})

Response structure


resp.prefix_list.prefix_list_id #=> String
resp.prefix_list.address_family #=> String
resp.prefix_list.state #=> String, one of "create-in-progress", "create-complete", "create-failed", "modify-in-progress", "modify-complete", "modify-failed", "restore-in-progress", "restore-complete", "restore-failed", "delete-in-progress", "delete-complete", "delete-failed"
resp.prefix_list.state_message #=> String
resp.prefix_list.prefix_list_arn #=> String
resp.prefix_list.prefix_list_name #=> String
resp.prefix_list.max_entries #=> Integer
resp.prefix_list.version #=> Integer
resp.prefix_list.tags #=> Array
resp.prefix_list.tags[0].key #=> String
resp.prefix_list.tags[0].value #=> String
resp.prefix_list.owner_id #=> String

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.

  • :prefix_list_id (required, String)

    The ID of the prefix list.

  • :previous_version (required, Integer)

    The version to restore.

  • :current_version (required, Integer)

    The current version number for the prefix list.

Returns:

See Also:

#revoke_client_vpn_ingress(options = {}) ⇒ Types::RevokeClientVpnIngressResult

Removes an ingress authorization rule from a Client VPN endpoint.

Examples:

Request syntax with placeholder values


resp = client.revoke_client_vpn_ingress({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  target_network_cidr: "String", # required
  access_group_id: "String",
  revoke_all_groups: false,
  dry_run: false,
})

Response structure


resp.status.code #=> String, one of "authorizing", "active", "failed", "revoking"
resp.status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint with which the authorization rule is associated.

  • :target_network_cidr (required, String)

    The IPv4 address range, in CIDR notation, of the network for which access is being removed.

  • :access_group_id (String)

    The ID of the Active Directory group for which to revoke access.

  • :revoke_all_groups (Boolean)

    Indicates whether access should be revoked for all clients.

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

See Also:

#revoke_security_group_egress(options = {}) ⇒ Types::RevokeSecurityGroupEgressResult

[VPC only] Removes the specified egress rules from a security group for EC2-VPC. This action does not apply to security groups for use in EC2-Classic. To remove a rule, the values that you specify (for example, ports) must match the existing rule's values exactly.

[Default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

AWS recommends that you use DescribeSecurityGroups to verify that the rule has been removed.

Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not have to specify the description to revoke the rule.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Examples:

Request syntax with placeholder values


resp = client.revoke_security_group_egress({
  dry_run: false,
  group_id: "SecurityGroupId", # required
  ip_permissions: [
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
  cidr_ip: "String",
  from_port: 1,
  ip_protocol: "String",
  to_port: 1,
  source_security_group_name: "String",
  source_security_group_owner_id: "String",
})

Response structure


resp.return #=> true/false
resp.unknown_ip_permissions #=> Array
resp.unknown_ip_permissions[0].from_port #=> Integer
resp.unknown_ip_permissions[0].ip_protocol #=> String
resp.unknown_ip_permissions[0].ip_ranges #=> Array
resp.unknown_ip_permissions[0].ip_ranges[0].cidr_ip #=> String
resp.unknown_ip_permissions[0].ip_ranges[0].description #=> String
resp.unknown_ip_permissions[0].ipv_6_ranges #=> Array
resp.unknown_ip_permissions[0].ipv_6_ranges[0].cidr_ipv_6 #=> String
resp.unknown_ip_permissions[0].ipv_6_ranges[0].description #=> String
resp.unknown_ip_permissions[0].prefix_list_ids #=> Array
resp.unknown_ip_permissions[0].prefix_list_ids[0].description #=> String
resp.unknown_ip_permissions[0].prefix_list_ids[0].prefix_list_id #=> String
resp.unknown_ip_permissions[0].to_port #=> Integer
resp.unknown_ip_permissions[0].user_id_group_pairs #=> Array
resp.unknown_ip_permissions[0].user_id_group_pairs[0].description #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].group_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].group_name #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].peering_status #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].user_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].vpc_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String

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.

  • :group_id (required, String)

    The ID of the security group.

  • :ip_permissions (Array<Types::IpPermission>)

    The sets of IP permissions. You can\'t specify a destination security group and a CIDR IP address range in the same set of permissions.

  • :cidr_ip (String)

    Not supported. Use a set of IP permissions to specify the CIDR.

  • :from_port (Integer)

    Not supported. Use a set of IP permissions to specify the port.

  • :ip_protocol (String)

    Not supported. Use a set of IP permissions to specify the protocol name or number.

  • :to_port (Integer)

    Not supported. Use a set of IP permissions to specify the port.

  • :source_security_group_name (String)

    Not supported. Use a set of IP permissions to specify a destination security group.

  • :source_security_group_owner_id (String)

    Not supported. Use a set of IP permissions to specify a destination security group.

Returns:

See Also:

#revoke_security_group_ingress(options = {}) ⇒ Types::RevokeSecurityGroupIngressResult

Removes the specified ingress rules from a security group. To remove a rule, the values that you specify (for example, ports) must match the existing rule's values exactly.

[EC2-Classic , default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

AWS recommends that you use DescribeSecurityGroups to verify that the rule has been removed.

Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code. If the security group rule has a description, you do not have to specify the description to revoke the rule.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Examples:

Request syntax with placeholder values


resp = client.revoke_security_group_ingress({
  cidr_ip: "String",
  from_port: 1,
  group_id: "SecurityGroupId",
  group_name: "SecurityGroupName",
  ip_permissions: [
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
  ip_protocol: "String",
  source_security_group_name: "String",
  source_security_group_owner_id: "String",
  to_port: 1,
  dry_run: false,
})

Response structure


resp.return #=> true/false
resp.unknown_ip_permissions #=> Array
resp.unknown_ip_permissions[0].from_port #=> Integer
resp.unknown_ip_permissions[0].ip_protocol #=> String
resp.unknown_ip_permissions[0].ip_ranges #=> Array
resp.unknown_ip_permissions[0].ip_ranges[0].cidr_ip #=> String
resp.unknown_ip_permissions[0].ip_ranges[0].description #=> String
resp.unknown_ip_permissions[0].ipv_6_ranges #=> Array
resp.unknown_ip_permissions[0].ipv_6_ranges[0].cidr_ipv_6 #=> String
resp.unknown_ip_permissions[0].ipv_6_ranges[0].description #=> String
resp.unknown_ip_permissions[0].prefix_list_ids #=> Array
resp.unknown_ip_permissions[0].prefix_list_ids[0].description #=> String
resp.unknown_ip_permissions[0].prefix_list_ids[0].prefix_list_id #=> String
resp.unknown_ip_permissions[0].to_port #=> Integer
resp.unknown_ip_permissions[0].user_id_group_pairs #=> Array
resp.unknown_ip_permissions[0].user_id_group_pairs[0].description #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].group_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].group_name #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].peering_status #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].user_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].vpc_id #=> String
resp.unknown_ip_permissions[0].user_id_group_pairs[0].vpc_peering_connection_id #=> String

Options Hash (options):

  • :cidr_ip (String)

    The CIDR IP address range. You can\'t specify this parameter when specifying a source security group.

  • :from_port (Integer)

    The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

  • :group_id (String)

    The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

  • :group_name (String)

    [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

  • :ip_permissions (Array<Types::IpPermission>)

    The sets of IP permissions. You can\'t specify a source security group and a CIDR IP address range in the same set of permissions.

  • :ip_protocol (String)

    The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all.

  • :source_security_group_name (String)

    [EC2-Classic, default VPC] The name of the source security group. You can\'t specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

  • :source_security_group_owner_id (String)

    [EC2-Classic] The AWS account ID of the source security group, if the source security group is in a different account. You can\'t specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

  • :to_port (Integer)

    The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

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

See Also:

#run_instances(options = {}) ⇒ Types::Reservation

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

  • [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.

  • [EC2-Classic] If don't specify an Availability Zone, we choose one for you.

  • Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see Instance types available only in a VPC.

  • [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.

  • Not all instance types support IPv6 addresses. For more information, see Instance types.

  • If you don't specify a security group ID, we use the default security group. For more information, see Security groups.

  • If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.

You can create a launch template, which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify the launch template instead of specifying the launch parameters.

To ensure faster instance launches, break up large requests into smaller batches. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances. You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources.

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key pairs in the Amazon Elastic Compute Cloud User Guide.

For troubleshooting, see What to do if an instance immediately terminates, and Troubleshooting connecting to your instance in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To launch an instance


# This example launches an instance using the specified AMI, instance type, security group, subnet, block device mapping, and tags.

resp = client.run_instances({
  block_device_mappings: [
    {
      device_name: "/dev/sdh", 
      ebs: {
        volume_size: 100, 
      }, 
    }, 
  ], 
  image_id: "ami-abc12345", 
  instance_type: "t2.micro", 
  key_name: "my-key-pair", 
  max_count: 1, 
  min_count: 1, 
  security_group_ids: [
    "sg-1a2b3c4d", 
  ], 
  subnet_id: "subnet-6e7f829e", 
  tag_specifications: [
    {
      resource_type: "instance", 
      tags: [
        {
          key: "Purpose", 
          value: "test", 
        }, 
      ], 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.run_instances({
  block_device_mappings: [
    {
      device_name: "String",
      virtual_name: "String",
      ebs: {
        delete_on_termination: false,
        iops: 1,
        snapshot_id: "String",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1
        kms_key_id: "String",
        encrypted: false,
      },
      no_device: "String",
    },
  ],
  image_id: "ImageId",
  instance_type: "t1.micro", # accepts 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, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m4.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m4.10xlarge, m4.16xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, 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, r5d.large, r5d.xlarge, r5d.2xlarge, r5d.4xlarge, r5d.8xlarge, r5d.12xlarge, r5d.16xlarge, r5d.24xlarge, r5d.metal, r5ad.large, r5ad.xlarge, r5ad.2xlarge, r5ad.4xlarge, r5ad.8xlarge, r5ad.12xlarge, r5ad.16xlarge, r5ad.24xlarge, r6g.metal, r6g.medium, r6g.large, r6g.xlarge, r6g.2xlarge, r6g.4xlarge, r6g.8xlarge, r6g.12xlarge, r6g.16xlarge, r6gd.metal, r6gd.medium, r6gd.large, r6gd.xlarge, r6gd.2xlarge, r6gd.4xlarge, r6gd.8xlarge, r6gd.12xlarge, r6gd.16xlarge, x1.16xlarge, x1.32xlarge, x1e.xlarge, x1e.2xlarge, x1e.4xlarge, x1e.8xlarge, x1e.16xlarge, x1e.32xlarge, 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, hi1.4xlarge, hs1.8xlarge, 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, c6g.metal, c6g.medium, c6g.large, c6g.xlarge, c6g.2xlarge, c6g.4xlarge, c6g.8xlarge, c6g.12xlarge, c6g.16xlarge, c6gd.metal, c6gd.medium, c6gd.large, c6gd.xlarge, c6gd.2xlarge, c6gd.4xlarge, c6gd.8xlarge, c6gd.12xlarge, c6gd.16xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, g2.8xlarge, g3.4xlarge, g3.8xlarge, g3.16xlarge, g3s.xlarge, g4dn.xlarge, g4dn.2xlarge, g4dn.4xlarge, g4dn.8xlarge, g4dn.12xlarge, g4dn.16xlarge, g4dn.metal, cg1.4xlarge, p2.xlarge, p2.8xlarge, p2.16xlarge, p3.2xlarge, p3.8xlarge, p3.16xlarge, p3dn.24xlarge, p4d.24xlarge, d2.xlarge, d2.2xlarge, d2.4xlarge, d2.8xlarge, f1.2xlarge, f1.4xlarge, f1.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, m5d.large, m5d.xlarge, m5d.2xlarge, m5d.4xlarge, m5d.8xlarge, m5d.12xlarge, m5d.16xlarge, m5d.24xlarge, m5d.metal, m5ad.large, m5ad.xlarge, m5ad.2xlarge, m5ad.4xlarge, m5ad.8xlarge, m5ad.12xlarge, m5ad.16xlarge, m5ad.24xlarge, h1.2xlarge, h1.4xlarge, h1.8xlarge, h1.16xlarge, z1d.large, z1d.xlarge, z1d.2xlarge, z1d.3xlarge, z1d.6xlarge, z1d.12xlarge, z1d.metal, u-6tb1.metal, u-9tb1.metal, u-12tb1.metal, u-18tb1.metal, u-24tb1.metal, a1.medium, a1.large, a1.xlarge, a1.2xlarge, a1.4xlarge, a1.metal, m5dn.large, m5dn.xlarge, m5dn.2xlarge, m5dn.4xlarge, m5dn.8xlarge, m5dn.12xlarge, m5dn.16xlarge, m5dn.24xlarge, m5n.large, m5n.xlarge, m5n.2xlarge, m5n.4xlarge, m5n.8xlarge, m5n.12xlarge, m5n.16xlarge, m5n.24xlarge, r5dn.large, r5dn.xlarge, r5dn.2xlarge, r5dn.4xlarge, r5dn.8xlarge, r5dn.12xlarge, r5dn.16xlarge, r5dn.24xlarge, r5n.large, r5n.xlarge, r5n.2xlarge, r5n.4xlarge, r5n.8xlarge, r5n.12xlarge, r5n.16xlarge, r5n.24xlarge, inf1.xlarge, inf1.2xlarge, inf1.6xlarge, inf1.24xlarge, 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
  ipv_6_address_count: 1,
  ipv_6_addresses: [
    {
      ipv_6_address: "String",
    },
  ],
  kernel_id: "KernelId",
  key_name: "KeyPairName",
  max_count: 1, # required
  min_count: 1, # required
  monitoring: {
    enabled: false, # required
  },
  placement: {
    availability_zone: "String",
    affinity: "String",
    group_name: "String",
    partition_number: 1,
    host_id: "String",
    tenancy: "default", # accepts default, dedicated, host
    spread_domain: "String",
    host_resource_group_arn: "String",
  },
  ramdisk_id: "RamdiskId",
  security_group_ids: ["SecurityGroupId"],
  security_groups: ["SecurityGroupName"],
  subnet_id: "SubnetId",
  user_data: "String",
  additional_info: "String",
  client_token: "String",
  disable_api_termination: false,
  dry_run: false,
  ebs_optimized: false,
  iam_instance_profile: {
    arn: "String",
    name: "String",
  },
  instance_initiated_shutdown_behavior: "stop", # accepts stop, terminate
  network_interfaces: [
    {
      associate_public_ip_address: false,
      delete_on_termination: false,
      description: "String",
      device_index: 1,
      groups: ["SecurityGroupId"],
      ipv_6_address_count: 1,
      ipv_6_addresses: [
        {
          ipv_6_address: "String",
        },
      ],
      network_interface_id: "String",
      private_ip_address: "String",
      private_ip_addresses: [
        {
          primary: false,
          private_ip_address: "String",
        },
      ],
      secondary_private_ip_address_count: 1,
      subnet_id: "String",
      associate_carrier_ip_address: false,
      interface_type: "String",
      network_card_index: 1,
    },
  ],
  private_ip_address: "String",
  elastic_gpu_specification: [
    {
      type: "String", # required
    },
  ],
  elastic_inference_accelerators: [
    {
      type: "String", # required
      count: 1,
    },
  ],
  tag_specifications: [
    {
      resource_type: "client-vpn-endpoint", # accepts client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  launch_template: {
    launch_template_id: "LaunchTemplateId",
    launch_template_name: "String",
    version: "String",
  },
  instance_market_options: {
    market_type: "spot", # accepts spot
    spot_options: {
      max_price: "String",
      spot_instance_type: "one-time", # accepts one-time, persistent
      block_duration_minutes: 1,
      valid_until: Time.now,
      instance_interruption_behavior: "hibernate", # accepts hibernate, stop, terminate
    },
  },
  credit_specification: {
    cpu_credits: "String", # required
  },
  cpu_options: {
    core_count: 1,
    threads_per_core: 1,
  },
  capacity_reservation_specification: {
    capacity_reservation_preference: "open", # accepts open, none
    capacity_reservation_target: {
      capacity_reservation_id: "CapacityReservationId",
      capacity_reservation_resource_group_arn: "String",
    },
  },
  hibernation_options: {
    configured: false,
  },
  license_specifications: [
    {
      license_configuration_arn: "String",
    },
  ],
  metadata_options: {
    http_tokens: "optional", # accepts optional, required
    http_put_response_hop_limit: 1,
    http_endpoint: "disabled", # accepts disabled, enabled
  },
  enclave_options: {
    enabled: false,
  },
})

Response structure


resp.groups #=> Array
resp.groups[0].group_name #=> String
resp.groups[0].group_id #=> String
resp.instances #=> Array
resp.instances[0].ami_launch_index #=> Integer
resp.instances[0].image_id #=> String
resp.instances[0].instance_id #=> String
resp.instances[0].instance_type #=> String, one of "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", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "m4.16xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "cr1.8xlarge", "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", "r5d.large", "r5d.xlarge", "r5d.2xlarge", "r5d.4xlarge", "r5d.8xlarge", "r5d.12xlarge", "r5d.16xlarge", "r5d.24xlarge", "r5d.metal", "r5ad.large", "r5ad.xlarge", "r5ad.2xlarge", "r5ad.4xlarge", "r5ad.8xlarge", "r5ad.12xlarge", "r5ad.16xlarge", "r5ad.24xlarge", "r6g.metal", "r6g.medium", "r6g.large", "r6g.xlarge", "r6g.2xlarge", "r6g.4xlarge", "r6g.8xlarge", "r6g.12xlarge", "r6g.16xlarge", "r6gd.metal", "r6gd.medium", "r6gd.large", "r6gd.xlarge", "r6gd.2xlarge", "r6gd.4xlarge", "r6gd.8xlarge", "r6gd.12xlarge", "r6gd.16xlarge", "x1.16xlarge", "x1.32xlarge", "x1e.xlarge", "x1e.2xlarge", "x1e.4xlarge", "x1e.8xlarge", "x1e.16xlarge", "x1e.32xlarge", "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", "hi1.4xlarge", "hs1.8xlarge", "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", "c6g.metal", "c6g.medium", "c6g.large", "c6g.xlarge", "c6g.2xlarge", "c6g.4xlarge", "c6g.8xlarge", "c6g.12xlarge", "c6g.16xlarge", "c6gd.metal", "c6gd.medium", "c6gd.large", "c6gd.xlarge", "c6gd.2xlarge", "c6gd.4xlarge", "c6gd.8xlarge", "c6gd.12xlarge", "c6gd.16xlarge", "cc1.4xlarge", "cc2.8xlarge", "g2.2xlarge", "g2.8xlarge", "g3.4xlarge", "g3.8xlarge", "g3.16xlarge", "g3s.xlarge", "g4dn.xlarge", "g4dn.2xlarge", "g4dn.4xlarge", "g4dn.8xlarge", "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", "cg1.4xlarge", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", "p3dn.24xlarge", "p4d.24xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "f1.2xlarge", "f1.4xlarge", "f1.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", "m5d.large", "m5d.xlarge", "m5d.2xlarge", "m5d.4xlarge", "m5d.8xlarge", "m5d.12xlarge", "m5d.16xlarge", "m5d.24xlarge", "m5d.metal", "m5ad.large", "m5ad.xlarge", "m5ad.2xlarge", "m5ad.4xlarge", "m5ad.8xlarge", "m5ad.12xlarge", "m5ad.16xlarge", "m5ad.24xlarge", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", "h1.16xlarge", "z1d.large", "z1d.xlarge", "z1d.2xlarge", "z1d.3xlarge", "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", "u-18tb1.metal", "u-24tb1.metal", "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "m5dn.large", "m5dn.xlarge", "m5dn.2xlarge", "m5dn.4xlarge", "m5dn.8xlarge", "m5dn.12xlarge", "m5dn.16xlarge", "m5dn.24xlarge", "m5n.large", "m5n.xlarge", "m5n.2xlarge", "m5n.4xlarge", "m5n.8xlarge", "m5n.12xlarge", "m5n.16xlarge", "m5n.24xlarge", "r5dn.large", "r5dn.xlarge", "r5dn.2xlarge", "r5dn.4xlarge", "r5dn.8xlarge", "r5dn.12xlarge", "r5dn.16xlarge", "r5dn.24xlarge", "r5n.large", "r5n.xlarge", "r5n.2xlarge", "r5n.4xlarge", "r5n.8xlarge", "r5n.12xlarge", "r5n.16xlarge", "r5n.24xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", "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"
resp.instances[0].kernel_id #=> String
resp.instances[0].key_name #=> String
resp.instances[0].launch_time #=> Time
resp.instances[0].monitoring.state #=> String, one of "disabled", "disabling", "enabled", "pending"
resp.instances[0].placement.availability_zone #=> String
resp.instances[0].placement.affinity #=> String
resp.instances[0].placement.group_name #=> String
resp.instances[0].placement.partition_number #=> Integer
resp.instances[0].placement.host_id #=> String
resp.instances[0].placement.tenancy #=> String, one of "default", "dedicated", "host"
resp.instances[0].placement.spread_domain #=> String
resp.instances[0].placement.host_resource_group_arn #=> String
resp.instances[0].platform #=> String, one of "Windows"
resp.instances[0].private_dns_name #=> String
resp.instances[0].private_ip_address #=> String
resp.instances[0].product_codes #=> Array
resp.instances[0].product_codes[0].product_code_id #=> String
resp.instances[0].product_codes[0].product_code_type #=> String, one of "devpay", "marketplace"
resp.instances[0].public_dns_name #=> String
resp.instances[0].public_ip_address #=> String
resp.instances[0].ramdisk_id #=> String
resp.instances[0].state.code #=> Integer
resp.instances[0].state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.instances[0].state_transition_reason #=> String
resp.instances[0].subnet_id #=> String
resp.instances[0].vpc_id #=> String
resp.instances[0].architecture #=> String, one of "i386", "x86_64", "arm64"
resp.instances[0].block_device_mappings #=> Array
resp.instances[0].block_device_mappings[0].device_name #=> String
resp.instances[0].block_device_mappings[0].ebs.attach_time #=> Time
resp.instances[0].block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.instances[0].block_device_mappings[0].ebs.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.instances[0].block_device_mappings[0].ebs.volume_id #=> String
resp.instances[0].client_token #=> String
resp.instances[0].ebs_optimized #=> true/false
resp.instances[0].ena_support #=> true/false
resp.instances[0].hypervisor #=> String, one of "ovm", "xen"
resp.instances[0].iam_instance_profile.arn #=> String
resp.instances[0].iam_instance_profile.id #=> String
resp.instances[0].instance_lifecycle #=> String, one of "spot", "scheduled"
resp.instances[0].elastic_gpu_associations #=> Array
resp.instances[0].elastic_gpu_associations[0].elastic_gpu_id #=> String
resp.instances[0].elastic_gpu_associations[0].elastic_gpu_association_id #=> String
resp.instances[0].elastic_gpu_associations[0].elastic_gpu_association_state #=> String
resp.instances[0].elastic_gpu_associations[0].elastic_gpu_association_time #=> String
resp.instances[0].elastic_inference_accelerator_associations #=> Array
resp.instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_arn #=> String
resp.instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_id #=> String
resp.instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_state #=> String
resp.instances[0].elastic_inference_accelerator_associations[0].elastic_inference_accelerator_association_time #=> Time
resp.instances[0].network_interfaces #=> Array
resp.instances[0].network_interfaces[0].association.carrier_ip #=> String
resp.instances[0].network_interfaces[0].association.ip_owner_id #=> String
resp.instances[0].network_interfaces[0].association.public_dns_name #=> String
resp.instances[0].network_interfaces[0].association.public_ip #=> String
resp.instances[0].network_interfaces[0].attachment.attach_time #=> Time
resp.instances[0].network_interfaces[0].attachment.attachment_id #=> String
resp.instances[0].network_interfaces[0].attachment.delete_on_termination #=> true/false
resp.instances[0].network_interfaces[0].attachment.device_index #=> Integer
resp.instances[0].network_interfaces[0].attachment.status #=> String, one of "attaching", "attached", "detaching", "detached"
resp.instances[0].network_interfaces[0].attachment.network_card_index #=> Integer
resp.instances[0].network_interfaces[0].description #=> String
resp.instances[0].network_interfaces[0].groups #=> Array
resp.instances[0].network_interfaces[0].groups[0].group_name #=> String
resp.instances[0].network_interfaces[0].groups[0].group_id #=> String
resp.instances[0].network_interfaces[0].ipv_6_addresses #=> Array
resp.instances[0].network_interfaces[0].ipv_6_addresses[0].ipv_6_address #=> String
resp.instances[0].network_interfaces[0].mac_address #=> String
resp.instances[0].network_interfaces[0].network_interface_id #=> String
resp.instances[0].network_interfaces[0].owner_id #=> String
resp.instances[0].network_interfaces[0].private_dns_name #=> String
resp.instances[0].network_interfaces[0].private_ip_address #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses #=> Array
resp.instances[0].network_interfaces[0].private_ip_addresses[0].association.carrier_ip #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses[0].association.ip_owner_id #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses[0].association.public_dns_name #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses[0].association.public_ip #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses[0].primary #=> true/false
resp.instances[0].network_interfaces[0].private_ip_addresses[0].private_dns_name #=> String
resp.instances[0].network_interfaces[0].private_ip_addresses[0].private_ip_address #=> String
resp.instances[0].network_interfaces[0].source_dest_check #=> true/false
resp.instances[0].network_interfaces[0].status #=> String, one of "available", "associated", "attaching", "in-use", "detaching"
resp.instances[0].network_interfaces[0].subnet_id #=> String
resp.instances[0].network_interfaces[0].vpc_id #=> String
resp.instances[0].network_interfaces[0].interface_type #=> String
resp.instances[0].outpost_arn #=> String
resp.instances[0].root_device_name #=> String
resp.instances[0].root_device_type #=> String, one of "ebs", "instance-store"
resp.instances[0].security_groups #=> Array
resp.instances[0].security_groups[0].group_name #=> String
resp.instances[0].security_groups[0].group_id #=> String
resp.instances[0].source_dest_check #=> true/false
resp.instances[0].spot_instance_request_id #=> String
resp.instances[0].sriov_net_support #=> String
resp.instances[0].state_reason.code #=> String
resp.instances[0].state_reason.message #=> String
resp.instances[0].tags #=> Array
resp.instances[0].tags[0].key #=> String
resp.instances[0].tags[0].value #=> String
resp.instances[0].virtualization_type #=> String, one of "hvm", "paravirtual"
resp.instances[0].cpu_options.core_count #=> Integer
resp.instances[0].cpu_options.threads_per_core #=> Integer
resp.instances[0].capacity_reservation_id #=> String
resp.instances[0].capacity_reservation_specification.capacity_reservation_preference #=> String, one of "open", "none"
resp.instances[0].capacity_reservation_specification.capacity_reservation_target.capacity_reservation_id #=> String
resp.instances[0].capacity_reservation_specification.capacity_reservation_target.capacity_reservation_resource_group_arn #=> String
resp.instances[0].hibernation_options.configured #=> true/false
resp.instances[0].licenses #=> Array
resp.instances[0].licenses[0].license_configuration_arn #=> String
resp.instances[0]..state #=> String, one of "pending", "applied"
resp.instances[0]..http_tokens #=> String, one of "optional", "required"
resp.instances[0]..http_put_response_hop_limit #=> Integer
resp.instances[0]..http_endpoint #=> String, one of "disabled", "enabled"
resp.instances[0].enclave_options.enabled #=> true/false
resp.owner_id #=> String
resp.requester_id #=> String
resp.reservation_id #=> String

Options Hash (options):

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

    The block device mapping entries.

  • :image_id (String)

    The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.

  • :instance_type (String)

    The instance type. For more information, see Instance types in the Amazon Elastic Compute Cloud User Guide.

    Default: m1.small

  • :ipv_6_address_count (Integer)

    [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you\'ve specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

  • :ipv_6_addresses (Array<Types::InstanceIpv6Address>)

    [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you\'ve specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

  • :kernel_id (String)

    The ID of the kernel.

    We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.

  • :key_name (String)

    The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

    If you do not specify a key pair, you can\'t connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

  • :max_count (required, Integer)

    The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount.

    Constraints: Between 1 and the maximum number you\'re allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

  • :min_count (required, Integer)

    The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

    Constraints: Between 1 and the maximum number you\'re allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

  • :monitoring (Types::RunInstancesMonitoringEnabled)

    Specifies whether detailed monitoring is enabled for the instance.

  • :placement (Types::Placement)

    The placement for the instance.

  • :ramdisk_id (String)

    The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the AWS Resource Center and search for the kernel ID.

    We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.

  • :security_group_ids (Array<String>)

    The IDs of the security groups. You can create a security group using CreateSecurityGroup.

    If you specify a network interface, you must specify any security groups as part of the network interface.

  • :security_groups (Array<String>)

    [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.

    If you specify a network interface, you must specify any security groups as part of the network interface.

    Default: Amazon EC2 uses the default security group.

  • :subnet_id (String)

    [EC2-VPC] The ID of the subnet to launch the instance into.

    If you specify a network interface, you must specify any subnets as part of the network interface.

  • :user_data (String)

    The user data to make available to the instance. For more information, see Running commands on your Linux instance at launch (Linux) and Adding User Data (Windows). If you are using a 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. User data is limited to 16 KB.

  • :additional_info (String)

    Reserved.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    For more information, see Ensuring Idempotency.

    Constraints: Maximum 64 ASCII characters

  • :disable_api_termination (Boolean)

    If you set this parameter to true, you can\'t terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.

    Default: false

  • :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 (Boolean)

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

    Default: false

  • :iam_instance_profile (Types::IamInstanceProfileSpecification)

    The IAM instance profile.

  • :instance_initiated_shutdown_behavior (String)

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

    Default: stop

  • :network_interfaces (Array<Types::InstanceNetworkInterfaceSpecification>)

    The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

  • :private_ip_address (String)

    [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

    Only one private IP address can be designated as primary. You can\'t specify this option if you\'ve specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you\'re launching more than one instance in the request.

    You cannot specify this option and the network interfaces option in the same request.

  • :elastic_gpu_specification (Array<Types::ElasticGpuSpecification>)

    An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.

  • :elastic_inference_accelerators (Array<Types::ElasticInferenceAccelerator>)

    An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

    You cannot specify accelerators from different generations in the same request.

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

    The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.

  • :launch_template (Types::LaunchTemplateSpecification)

    The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

  • :instance_market_options (Types::InstanceMarketOptionsRequest)

    The market (purchasing) option for the instances.

    For RunInstances, persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop.

  • :credit_specification (Types::CreditSpecificationRequest)

    The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. For more information, see Burstable performance instances in the Amazon Elastic Compute Cloud User Guide.

    Default: standard (T2 instances) or unlimited (T3/T3a instances)

  • :cpu_options (Types::CpuOptionsRequest)

    The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide.

  • :capacity_reservation_specification (Types::CapacityReservationSpecification)

    Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance\'s Capacity Reservation preference defaults to open, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

  • :hibernation_options (Types::HibernationOptionsRequest)

    Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

    You can\'t enable hibernation and AWS Nitro Enclaves on the same instance.

  • :license_specifications (Array<Types::LicenseConfigurationRequest>)

    The license configurations.

  • :metadata_options (Types::InstanceMetadataOptionsRequest)

    The metadata options for the instance. For more information, see Instance metadata and user data.

  • :enclave_options (Types::EnclaveOptionsRequest)

    Indicates whether the instance is enabled for AWS Nitro Enclaves. For more information, see What is AWS Nitro Enclaves? in the AWS Nitro Enclaves User Guide.

    You can\'t enable AWS Nitro Enclaves and hibernation on the same instance.

Returns:

See Also:

#run_scheduled_instances(options = {}) ⇒ Types::RunScheduledInstancesResult

Launches the specified Scheduled Instances.

Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using PurchaseScheduledInstances.

You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see Scheduled Instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To launch a Scheduled Instance in a VPC


# This example launches the specified Scheduled Instance in a VPC.

resp = client.run_scheduled_instances({
  instance_count: 1, 
  launch_specification: {
    iam_instance_profile: {
      name: "my-iam-role", 
    }, 
    image_id: "ami-12345678", 
    instance_type: "c4.large", 
    key_name: "my-key-pair", 
    network_interfaces: [
      {
        associate_public_ip_address: true, 
        device_index: 0, 
        groups: [
          "sg-12345678", 
        ], 
        subnet_id: "subnet-12345678", 
      }, 
    ], 
  }, 
  scheduled_instance_id: "sci-1234-1234-1234-1234-123456789012", 
})

# resp.to_h outputs the following:
{
  instance_id_set: [
    "i-1234567890abcdef0", 
  ], 
}

Example: To launch a Scheduled Instance in EC2-Classic


# This example launches the specified Scheduled Instance in EC2-Classic.

resp = client.run_scheduled_instances({
  instance_count: 1, 
  launch_specification: {
    iam_instance_profile: {
      name: "my-iam-role", 
    }, 
    image_id: "ami-12345678", 
    instance_type: "c4.large", 
    key_name: "my-key-pair", 
    placement: {
      availability_zone: "us-west-2b", 
    }, 
    security_group_ids: [
      "sg-12345678", 
    ], 
  }, 
  scheduled_instance_id: "sci-1234-1234-1234-1234-123456789012", 
})

# resp.to_h outputs the following:
{
  instance_id_set: [
    "i-1234567890abcdef0", 
  ], 
}

Request syntax with placeholder values


resp = client.run_scheduled_instances({
  client_token: "String",
  dry_run: false,
  instance_count: 1,
  launch_specification: { # required
    block_device_mappings: [
      {
        device_name: "String",
        ebs: {
          delete_on_termination: false,
          encrypted: false,
          iops: 1,
          snapshot_id: "SnapshotId",
          volume_size: 1,
          volume_type: "String",
        },
        no_device: "String",
        virtual_name: "String",
      },
    ],
    ebs_optimized: false,
    iam_instance_profile: {
      arn: "String",
      name: "String",
    },
    image_id: "ImageId", # required
    instance_type: "String",
    kernel_id: "KernelId",
    key_name: "KeyPairName",
    monitoring: {
      enabled: false,
    },
    network_interfaces: [
      {
        associate_public_ip_address: false,
        delete_on_termination: false,
        description: "String",
        device_index: 1,
        groups: ["SecurityGroupId"],
        ipv_6_address_count: 1,
        ipv_6_addresses: [
          {
            ipv_6_address: "Ipv6Address",
          },
        ],
        network_interface_id: "NetworkInterfaceId",
        private_ip_address: "String",
        private_ip_address_configs: [
          {
            primary: false,
            private_ip_address: "String",
          },
        ],
        secondary_private_ip_address_count: 1,
        subnet_id: "SubnetId",
      },
    ],
    placement: {
      availability_zone: "String",
      group_name: "PlacementGroupName",
    },
    ramdisk_id: "RamdiskId",
    security_group_ids: ["SecurityGroupId"],
    subnet_id: "SubnetId",
    user_data: "String",
  },
  scheduled_instance_id: "ScheduledInstanceId", # required
})

Response structure


resp.instance_id_set #=> Array
resp.instance_id_set[0] #=> String

Options Hash (options):

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

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

  • :instance_count (Integer)

    The number of instances.

    Default: 1

  • :launch_specification (required, Types::ScheduledInstancesLaunchSpecification)

    The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

  • :scheduled_instance_id (required, String)

    The Scheduled Instance ID.

Returns:

See Also:

#search_local_gateway_routes(options = {}) ⇒ Types::SearchLocalGatewayRoutesResult

Searches for routes in the specified local gateway route table.

Examples:

Request syntax with placeholder values


resp = client.search_local_gateway_routes({
  local_gateway_route_table_id: "LocalGatewayRoutetableId", # required
  filters: [ # required
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.routes #=> Array
resp.routes[0].destination_cidr_block #=> String
resp.routes[0].local_gateway_virtual_interface_group_id #=> String
resp.routes[0].type #=> String, one of "static", "propagated"
resp.routes[0].state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"
resp.routes[0].local_gateway_route_table_id #=> String
resp.routes[0].local_gateway_route_table_arn #=> String
resp.routes[0].owner_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :local_gateway_route_table_id (required, String)

    The ID of the local gateway route table.

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

    One or more filters.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#search_transit_gateway_multicast_groups(options = {}) ⇒ Types::SearchTransitGatewayMulticastGroupsResult

Searches one or more transit gateway multicast groups and returns the group membership information.

Examples:

Request syntax with placeholder values


resp = client.search_transit_gateway_multicast_groups({
  transit_gateway_multicast_domain_id: "TransitGatewayMulticastDomainId",
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  next_token: "String",
  dry_run: false,
})

Response structure


resp.multicast_groups #=> Array
resp.multicast_groups[0].group_ip_address #=> String
resp.multicast_groups[0].transit_gateway_attachment_id #=> String
resp.multicast_groups[0].subnet_id #=> String
resp.multicast_groups[0].resource_id #=> String
resp.multicast_groups[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.multicast_groups[0].network_interface_id #=> String
resp.multicast_groups[0].group_member #=> true/false
resp.multicast_groups[0].group_source #=> true/false
resp.multicast_groups[0].member_type #=> String, one of "static", "igmp"
resp.multicast_groups[0].source_type #=> String, one of "static", "igmp"
resp.next_token #=> String

Options Hash (options):

  • :transit_gateway_multicast_domain_id (String)

    The ID of the transit gateway multicast domain.

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

    One or more filters. The possible values are:

    • group-ip-address - The IP address of the transit gateway multicast group.

    • is-group-member - The resource is a group member. Valid values are true | false.

    • is-group-source - The resource is a group source. Valid values are true | false.

    • member-type - The member type. Valid values are igmp | static.

    • resource-id - The ID of the resource.

    • resource-type - The type of resource. Valid values are vpc | vpn | direct-connect-gateway | tgw-peering.

    • source-type - The source type. Valid values are igmp | static.

    • state - The state of the subnet association. Valid values are associated | associated | disassociated | disassociating.

    • subnet-id - The ID of the subnet.

    • transit-gateway-attachment-id - The id of the transit gateway attachment.

  • :max_results (Integer)

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • :next_token (String)

    The token for the next page of results.

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

See Also:

#search_transit_gateway_routes(options = {}) ⇒ Types::SearchTransitGatewayRoutesResult

Searches for routes in the specified transit gateway route table.

Examples:

Request syntax with placeholder values


resp = client.search_transit_gateway_routes({
  transit_gateway_route_table_id: "TransitGatewayRouteTableId", # required
  filters: [ # required
    {
      name: "String",
      values: ["String"],
    },
  ],
  max_results: 1,
  dry_run: false,
})

Response structure


resp.routes #=> Array
resp.routes[0].destination_cidr_block #=> String
resp.routes[0].prefix_list_id #=> String
resp.routes[0].transit_gateway_attachments #=> Array
resp.routes[0].transit_gateway_attachments[0].resource_id #=> String
resp.routes[0].transit_gateway_attachments[0].transit_gateway_attachment_id #=> String
resp.routes[0].transit_gateway_attachments[0].resource_type #=> String, one of "vpc", "vpn", "direct-connect-gateway", "peering", "tgw-peering"
resp.routes[0].type #=> String, one of "static", "propagated"
resp.routes[0].state #=> String, one of "pending", "active", "blackhole", "deleting", "deleted"
resp.additional_routes_available #=> true/false

Options Hash (options):

  • :transit_gateway_route_table_id (required, String)

    The ID of the transit gateway route table.

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

    One or more filters. The possible values are:

    • attachment.transit-gateway-attachment-id- The id of the transit gateway attachment.

    • attachment.resource-id - The resource id of the transit gateway attachment.

    • attachment.resource-type - The attachment resource type. Valid values are vpc | vpn | direct-connect-gateway | peering.

    • prefix-list-id - The ID of the prefix list.

    • route-search.exact-match - The exact match of the specified filter.

    • route-search.longest-prefix-match - The longest prefix that matches the route.

    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.

    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.

    • state - The state of the route (active | blackhole).

    • type - The type of route (propagated | static).

  • :max_results (Integer)

    The maximum number of routes to return.

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

See Also:

#send_diagnostic_interrupt(options = {}) ⇒ Struct

Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a kernel panic (on Linux instances), or a blue screen/stop error (on Windows instances). For instances based on Intel and AMD processors, the interrupt is received as a non-maskable interrupt (NMI).

In general, the operating system crashes and reboots when a kernel panic or stop error is triggered. The operating system can also be configured to perform diagnostic tasks, such as generating a memory dump file, loading a secondary kernel, or obtaining a call trace.

Before sending a diagnostic interrupt to your instance, ensure that its operating system is configured to perform the required diagnostic tasks.

For more information about configuring your operating system to generate a crash dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt (Linux instances) or Send a Diagnostic Interrupt (Windows instances).

Examples:

Request syntax with placeholder values


resp = client.send_diagnostic_interrupt({
  instance_id: "InstanceId", # required
  dry_run: false,
})

Options Hash (options):

  • :instance_id (required, String)

    The ID of the instance.

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

  • (Struct)

    Returns an empty response.

See Also:

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

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your Windows instance, Amazon EC2 charges you for a full instance hour. If you stop and restart your Windows instance, a new instance hour begins and Amazon EC2 charges you for another full instance hour even if you are still within the same 60-minute period when it was stopped. Every time you start your Linux instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

For more information, see Stopping instances in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To start a stopped EC2 instance


# This example starts the specified EC2 instance.

resp = client.start_instances({
  instance_ids: [
    "i-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  starting_instances: [
    {
      current_state: {
        code: 0, 
        name: "pending", 
      }, 
      instance_id: "i-1234567890abcdef0", 
      previous_state: {
        code: 80, 
        name: "stopped", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.start_instances({
  instance_ids: ["InstanceId"], # required
  additional_info: "String",
  dry_run: false,
})

Response structure


resp.starting_instances #=> Array
resp.starting_instances[0].current_state.code #=> Integer
resp.starting_instances[0].current_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.starting_instances[0].instance_id #=> String
resp.starting_instances[0].previous_state.code #=> Integer
resp.starting_instances[0].previous_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The IDs of the instances.

  • :additional_info (String)

    Reserved.

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

See Also:

#start_vpc_endpoint_service_private_dns_verification(options = {}) ⇒ Types::StartVpcEndpointServicePrivateDnsVerificationResult

Initiates the verification process to prove that the service provider owns the private DNS name domain for the endpoint service.

The service provider must successfully perform the verification before the consumer can use the name to access the service.

Before the service provider runs this command, they must add a record to the DNS server. For more information, see Adding a TXT Record to Your Domain's DNS Server in the Amazon VPC User Guide.

Examples:

Request syntax with placeholder values


resp = client.start_vpc_endpoint_service_private_dns_verification({
  dry_run: false,
  service_id: "VpcEndpointServiceId", # required
})

Response structure


resp.return_value #=> true/false

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.

  • :service_id (required, String)

    The ID of the endpoint service.

Returns:

See Also:

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

Stops an Amazon EBS-backed instance.

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your Windows instance, Amazon EC2 charges you for a full instance hour. If you stop and restart your Windows instance, a new instance hour begins and Amazon EC2 charges you for another full instance hour even if you are still within the same 60-minute period when it was stopped. Every time you start your Linux instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon Elastic Compute Cloud User Guide.

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon Elastic Compute Cloud User Guide.

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshooting stopping your instance in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To stop a running EC2 instance


# This example stops the specified EC2 instance.

resp = client.stop_instances({
  instance_ids: [
    "i-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  stopping_instances: [
    {
      current_state: {
        code: 64, 
        name: "stopping", 
      }, 
      instance_id: "i-1234567890abcdef0", 
      previous_state: {
        code: 16, 
        name: "running", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.stop_instances({
  instance_ids: ["InstanceId"], # required
  hibernate: false,
  dry_run: false,
  force: false,
})

Response structure


resp.stopping_instances #=> Array
resp.stopping_instances[0].current_state.code #=> Integer
resp.stopping_instances[0].current_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.stopping_instances[0].instance_id #=> String
resp.stopping_instances[0].previous_state.code #=> Integer
resp.stopping_instances[0].previous_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The IDs of the instances.

  • :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 instance in the Amazon Elastic Compute Cloud User Guide.

    Default: false

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

  • :force (Boolean)

    Forces the instances to stop. The instances do not 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. This option is not recommended for Windows instances.

    Default: false

Returns:

See Also:

#terminate_client_vpn_connections(options = {}) ⇒ Types::TerminateClientVpnConnectionsResult

Terminates active Client VPN endpoint connections. This action can be used to terminate a specific client connection, or up to five connections established by a specific user.

Examples:

Request syntax with placeholder values


resp = client.terminate_client_vpn_connections({
  client_vpn_endpoint_id: "ClientVpnEndpointId", # required
  connection_id: "VpnConnectionId",
  username: "String",
  dry_run: false,
})

Response structure


resp.client_vpn_endpoint_id #=> String
resp.username #=> String
resp.connection_statuses #=> Array
resp.connection_statuses[0].connection_id #=> String
resp.connection_statuses[0].previous_status.code #=> String, one of "active", "failed-to-terminate", "terminating", "terminated"
resp.connection_statuses[0].previous_status.message #=> String
resp.connection_statuses[0].current_status.code #=> String, one of "active", "failed-to-terminate", "terminating", "terminated"
resp.connection_statuses[0].current_status.message #=> String

Options Hash (options):

  • :client_vpn_endpoint_id (required, String)

    The ID of the Client VPN endpoint to which the client is connected.

  • :connection_id (String)

    The ID of the client connection to be terminated.

  • :username (String)

    The name of the user who initiated the connection. Use this option to terminate all active connections for the specified user. This option can only be used if the user has established up to five connections.

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

See Also:

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

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon Elastic Compute Cloud User Guide.

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon Elastic Compute Cloud User Guide.

Examples:

Example: To terminate an EC2 instance


# This example terminates the specified EC2 instance.

resp = client.terminate_instances({
  instance_ids: [
    "i-1234567890abcdef0", 
  ], 
})

# resp.to_h outputs the following:
{
  terminating_instances: [
    {
      current_state: {
        code: 32, 
        name: "shutting-down", 
      }, 
      instance_id: "i-1234567890abcdef0", 
      previous_state: {
        code: 16, 
        name: "running", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.terminate_instances({
  instance_ids: ["InstanceId"], # required
  dry_run: false,
})

Response structure


resp.terminating_instances #=> Array
resp.terminating_instances[0].current_state.code #=> Integer
resp.terminating_instances[0].current_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"
resp.terminating_instances[0].instance_id #=> String
resp.terminating_instances[0].previous_state.code #=> Integer
resp.terminating_instances[0].previous_state.name #=> String, one of "pending", "running", "shutting-down", "terminated", "stopping", "stopped"

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The IDs of the instances.

    Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

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

See Also:

#unassign_ipv_6_addresses(options = {}) ⇒ Types::UnassignIpv6AddressesResult

Unassigns one or more IPv6 addresses from a network interface.

Examples:

Request syntax with placeholder values


resp = client.unassign_ipv_6_addresses({
  ipv_6_addresses: ["String"], # required
  network_interface_id: "NetworkInterfaceId", # required
})

Response structure


resp.network_interface_id #=> String
resp.unassigned_ipv_6_addresses #=> Array
resp.unassigned_ipv_6_addresses[0] #=> String

Options Hash (options):

  • :ipv_6_addresses (required, Array<String>)

    The IPv6 addresses to unassign from the network interface.

  • :network_interface_id (required, String)

    The ID of the network interface.

Returns:

See Also:

#unassign_private_ip_addresses(options = {}) ⇒ Struct

Unassigns one or more secondary private IP addresses from a network interface.

Examples:

Example: To unassign a secondary private IP address from a network interface


# This example unassigns the specified private IP address from the specified network interface.

resp = client.unassign_private_ip_addresses({
  network_interface_id: "eni-e5aa89a3", 
  private_ip_addresses: [
    "10.0.0.82", 
  ], 
})

Request syntax with placeholder values


resp = client.unassign_private_ip_addresses({
  network_interface_id: "NetworkInterfaceId", # required
  private_ip_addresses: ["String"], # required
})

Options Hash (options):

  • :network_interface_id (required, String)

    The ID of the network interface.

  • :private_ip_addresses (required, Array<String>)

    The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

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

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon Elastic Compute Cloud User Guide.

Examples:

Request syntax with placeholder values


resp = client.unmonitor_instances({
  instance_ids: ["InstanceId"], # required
  dry_run: false,
})

Response structure


resp.instance_monitorings #=> Array
resp.instance_monitorings[0].instance_id #=> String
resp.instance_monitorings[0].monitoring.state #=> String, one of "disabled", "disabling", "enabled", "pending"

Options Hash (options):

  • :instance_ids (required, Array<String>)

    The IDs of the 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.

Returns:

See Also:

#update_security_group_rule_descriptions_egress(options = {}) ⇒ Types::UpdateSecurityGroupRuleDescriptionsEgressResult

[VPC only] Updates the description of an egress (outbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously.

You specify the description as part of the IP permissions structure. You can remove a description for a security group rule by omitting the description parameter in the request.

Examples:

Example: To update an outbound security group rule description


# This example updates the description for the specified security group rule.

resp = client.update_security_group_rule_descriptions_egress({
  group_id: "sg-123abc12", 
  ip_permissions: [
    {
      from_port: 80, 
      ip_protocol: "tcp", 
      ip_ranges: [
        {
          cidr_ip: "203.0.113.0/24", 
          description: "Outbound HTTP access to server 2", 
        }, 
      ], 
      to_port: 80, 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_security_group_rule_descriptions_egress({
  dry_run: false,
  group_id: "SecurityGroupId",
  group_name: "SecurityGroupName",
  ip_permissions: [ # required
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
})

Response structure


resp.return #=> true/false

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.

  • :group_id (String)

    The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

  • :group_name (String)

    [Default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

  • :ip_permissions (required, Array<Types::IpPermission>)

    The IP permissions for the security group rule.

Returns:

See Also:

#update_security_group_rule_descriptions_ingress(options = {}) ⇒ Types::UpdateSecurityGroupRuleDescriptionsIngressResult

Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously.

You specify the description as part of the IP permissions structure. You can remove a description for a security group rule by omitting the description parameter in the request.

Examples:

Example: To update an inbound security group rule description


# This example updates the description for the specified security group rule.

resp = client.update_security_group_rule_descriptions_ingress({
  group_id: "sg-123abc12", 
  ip_permissions: [
    {
      from_port: 22, 
      ip_protocol: "tcp", 
      ip_ranges: [
        {
          cidr_ip: "203.0.113.0/16", 
          description: "SSH access from the LA office", 
        }, 
      ], 
      to_port: 22, 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_security_group_rule_descriptions_ingress({
  dry_run: false,
  group_id: "SecurityGroupId",
  group_name: "SecurityGroupName",
  ip_permissions: [ # required
    {
      from_port: 1,
      ip_protocol: "String",
      ip_ranges: [
        {
          cidr_ip: "String",
          description: "String",
        },
      ],
      ipv_6_ranges: [
        {
          cidr_ipv_6: "String",
          description: "String",
        },
      ],
      prefix_list_ids: [
        {
          description: "String",
          prefix_list_id: "String",
        },
      ],
      to_port: 1,
      user_id_group_pairs: [
        {
          description: "String",
          group_id: "String",
          group_name: "String",
          peering_status: "String",
          user_id: "String",
          vpc_id: "String",
          vpc_peering_connection_id: "String",
        },
      ],
    },
  ],
})

Response structure


resp.return #=> true/false

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.

  • :group_id (String)

    The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

  • :group_name (String)

    [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

  • :ip_permissions (required, Array<Types::IpPermission>)

    The IP permissions for the security group rule.

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

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

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

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

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

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
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

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

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:
:bundle_task_complete#describe_bundle_tasks1540
:conversion_task_cancelled#describe_conversion_tasks1540
:conversion_task_completed#describe_conversion_tasks1540
:conversion_task_deleted#describe_conversion_tasks1540
:customer_gateway_available#describe_customer_gateways1540
:export_task_cancelled#describe_export_tasks1540
:export_task_completed#describe_export_tasks1540
:image_available#describe_images1540
:image_exists#describe_images1540
:instance_exists#describe_instances540
:instance_running#describe_instances1540
:instance_status_ok#describe_instance_status1540
:instance_stopped#describe_instances1540
:instance_terminated#describe_instances1540
:key_pair_exists#describe_key_pairs56
:nat_gateway_available#describe_nat_gateways1540
:network_interface_available#describe_network_interfaces2010
:password_data_available#get_password_data1540
:security_group_exists#describe_security_groups56
:snapshot_completed#describe_snapshots1540
:spot_instance_request_fulfilled#describe_spot_instance_requests1540
:subnet_available#describe_subnets1540
:system_status_ok#describe_instance_status1540
:volume_available#describe_volumes1540
:volume_deleted#describe_volumes1540
:volume_in_use#describe_volumes1540
:vpc_available#describe_vpcs1540
:vpc_exists#describe_vpcs15
:vpc_peering_connection_deleted#describe_vpc_peering_connections1540
:vpc_peering_connection_exists#describe_vpc_peering_connections1540
:vpn_connection_available#describe_vpn_connections1540
:vpn_connection_deleted#describe_vpn_connections1540

Returns:

  • (Array<Symbol>)

    the list of supported waiters.

#withdraw_byoip_cidr(options = {}) ⇒ Types::WithdrawByoipCidrResult

Stops advertising an address range that is provisioned as an address pool.

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

It can take a few minutes before traffic to the specified addresses stops routing to AWS because of BGP propagation delays.

Examples:

Request syntax with placeholder values


resp = client.withdraw_byoip_cidr({
  cidr: "String", # required
  dry_run: false,
})

Response structure


resp.byoip_cidr.cidr #=> String
resp.byoip_cidr.description #=> String
resp.byoip_cidr.status_message #=> String
resp.byoip_cidr.state #=> String, one of "advertised", "deprovisioned", "failed-deprovision", "failed-provision", "pending-deprovision", "pending-provision", "provisioned", "provisioned-not-publicly-advertisable"

Options Hash (options):

  • :cidr (required, String)

    The address range, in CIDR notation.

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

See Also: