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

Class: Aws::EC2::Route

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(route_table_id, destination_cidr_block, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(route_table_id, destination_cidr_block, options = {}) ⇒ Object

    Parameters:

    • route_table_id (String)
    • destination_cidr_block (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :route_table_id (required, String)
    • :destination_cidr_block (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#destination_cidr_blockString (readonly)

Returns:

  • (String)

#destination_ipv_6_cidr_blockString (readonly)

The IPv6 CIDR block used for the destination match.

Returns:

  • (String)

    The IPv6 CIDR block used for the destination match.

#destination_prefix_list_idString (readonly)

The prefix of the AWS service.

Returns:

  • (String)

    The prefix of the AWS service.

#egress_only_internet_gateway_idString (readonly)

The ID of the egress-only Internet gateway.

Returns:

  • (String)

    The ID of the egress-only Internet gateway.

#gateway_idString (readonly)

The ID of a gateway attached to your VPC.

Returns:

  • (String)

    The ID of a gateway attached to your VPC.

#instance_idString (readonly)

The ID of a NAT instance in your VPC.

Returns:

  • (String)

    The ID of a NAT instance in your VPC.

#instance_owner_idString (readonly)

The AWS account ID of the owner of the instance.

Returns:

  • (String)

    The AWS account ID of the owner of the instance.

#nat_gateway_idString (readonly)

The ID of a NAT gateway.

Returns:

  • (String)

    The ID of a NAT gateway.

#network_interface_idString (readonly)

The ID of the network interface.

Returns:

  • (String)

    The ID of the network interface.

#originString (readonly)

Describes how the route was created.

  • CreateRouteTable - The route was automatically created when the route table was created.

  • CreateRoute - The route was manually added to the route table.

  • EnableVgwRoutePropagation - The route was propagated by route propagation.

    Possible values:

    • CreateRouteTable
    • CreateRoute
    • EnableVgwRoutePropagation

Returns:

  • (String)

    Describes how the route was created.

#route_table_idString (readonly)

Returns:

  • (String)

#stateString (readonly)

The state of the route. The blackhole state indicates that the route\'s target isn\'t available (for example, the specified gateway isn\'t attached to the VPC, or the specified NAT instance has been terminated).

Possible values:

  • active
  • blackhole

Returns:

  • (String)

    The state of the route.

#vpc_peering_connection_idString (readonly)

The ID of the VPC peering connection.

Returns:

  • (String)

    The ID of the VPC peering connection.

Instance Method Details

#delete(options = {}) ⇒ Struct

Deletes the specified route from the specified route table.

Examples:

Request syntax example with placeholder values


route.delete({
  destination_ipv_6_cidr_block: "String",
  dry_run: false,
})

Options Hash (options):

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

  • :dry_run (Boolean)

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

#replace(options = {}) ⇒ Struct

Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.

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

Examples:

Request syntax example with placeholder values


route.replace({
  destination_ipv_6_cidr_block: "String",
  dry_run: false,
  egress_only_internet_gateway_id: "String",
  gateway_id: "String",
  instance_id: "String",
  nat_gateway_id: "String",
  network_interface_id: "String",
  vpc_peering_connection_id: "String",
})

Options Hash (options):

  • :destination_ipv_6_cidr_block (String)

    The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the 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.

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

  • :nat_gateway_id (String)

    [IPv4 traffic only] The ID of a NAT gateway.

  • :network_interface_id (String)

    The ID of a network interface.

  • :vpc_peering_connection_id (String)

    The ID of a VPC peering connection.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#route_tableRouteTable

Returns: