java.lang.Object
software.amazon.awssdk.services.ec2.model.Route
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Route.Builder,Route>

@Generated("software.amazon.awssdk:codegen") public final class Route extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Route.Builder,Route>

Describes a route in a route table.

See Also:
  • Method Details

    • destinationCidrBlock

      public final String destinationCidrBlock()

      The IPv4 CIDR block used for the destination match.

      Returns:
      The IPv4 CIDR block used for the destination match.
    • destinationIpv6CidrBlock

      public final String destinationIpv6CidrBlock()

      The IPv6 CIDR block used for the destination match.

      Returns:
      The IPv6 CIDR block used for the destination match.
    • destinationPrefixListId

      public final String destinationPrefixListId()

      The prefix of the Amazon Web Service.

      Returns:
      The prefix of the Amazon Web Service.
    • egressOnlyInternetGatewayId

      public final String egressOnlyInternetGatewayId()

      The ID of the egress-only internet gateway.

      Returns:
      The ID of the egress-only internet gateway.
    • gatewayId

      public final String gatewayId()

      The ID of a gateway attached to your VPC.

      Returns:
      The ID of a gateway attached to your VPC.
    • instanceId

      public final String instanceId()

      The ID of a NAT instance in your VPC.

      Returns:
      The ID of a NAT instance in your VPC.
    • instanceOwnerId

      public final String instanceOwnerId()

      The ID of Amazon Web Services account that owns the instance.

      Returns:
      The ID of Amazon Web Services account that owns the instance.
    • natGatewayId

      public final String natGatewayId()

      The ID of a NAT gateway.

      Returns:
      The ID of a NAT gateway.
    • transitGatewayId

      public final String transitGatewayId()

      The ID of a transit gateway.

      Returns:
      The ID of a transit gateway.
    • localGatewayId

      public final String localGatewayId()

      The ID of the local gateway.

      Returns:
      The ID of the local gateway.
    • carrierGatewayId

      public final String carrierGatewayId()

      The ID of the carrier gateway.

      Returns:
      The ID of the carrier gateway.
    • networkInterfaceId

      public final String networkInterfaceId()

      The ID of the network interface.

      Returns:
      The ID of the network interface.
    • origin

      public final RouteOrigin origin()

      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.

      If the service returns an enum value that is not available in the current SDK version, origin will return RouteOrigin.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from originAsString().

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

      See Also:
    • originAsString

      public final String originAsString()

      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.

      If the service returns an enum value that is not available in the current SDK version, origin will return RouteOrigin.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from originAsString().

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

      See Also:
    • state

      public final RouteState state()

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

      If the service returns an enum value that is not available in the current SDK version, state will return RouteState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from stateAsString().

      Returns:
      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).
      See Also:
    • stateAsString

      public final String stateAsString()

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

      If the service returns an enum value that is not available in the current SDK version, state will return RouteState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from stateAsString().

      Returns:
      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).
      See Also:
    • vpcPeeringConnectionId

      public final String vpcPeeringConnectionId()

      The ID of a VPC peering connection.

      Returns:
      The ID of a VPC peering connection.
    • coreNetworkArn

      public final String coreNetworkArn()

      The Amazon Resource Name (ARN) of the core network.

      Returns:
      The Amazon Resource Name (ARN) of the core network.
    • toBuilder

      public Route.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Route.Builder,Route>
      Returns:
      a builder for type T
    • builder

      public static Route.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Route.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.