com.amazonaws.services.ec2.model

## クラス CreateRouteRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.ec2.model.CreateRouteRequest

- すべての実装されたインタフェース:
    java.io.Serializable

      public class CreateRouteRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `CreateRoute operation`.

  Creates a new route in a route table within a VPC. The route's target can be either a gateway attached to the VPC or a NAT instance in the VPC.

  When determining how to route traffic, we use the route with the most specific match. For example, let's say the traffic is destined for `192.0.2.3` , and the route table includes the following two 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 is more specific, so we use that route to determine where to target the traffic.

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

  関連項目:
    `AmazonEC2.createRoute(CreateRouteRequest)`, 直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `CreateRouteRequest()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getDestinationCidrBlock()` The CIDR address block used for the destination match.
    `java.lang.String` | `getGatewayId()` The ID of a VPN or Internet gateway attached to your VPC.
    `java.lang.String` | `getInstanceId()` The ID of a NAT instance in your VPC.
    `java.lang.String` | `getNetworkInterfaceId()` Returns the value of the NetworkInterfaceId property for this object.
    `java.lang.String` | `getRouteTableId()` The ID of the route table where the route will be added.
    `int` | `hashCode()`
    `void` | `setDestinationCidrBlock(java.lang.String destinationCidrBlock)` The CIDR address block used for the destination match.
    `void` | `setGatewayId(java.lang.String gatewayId)` The ID of a VPN or Internet gateway attached to your VPC.
    `void` | `setInstanceId(java.lang.String instanceId)` The ID of a NAT instance in your VPC.
    `void` | `setNetworkInterfaceId(java.lang.String networkInterfaceId)` Sets the value of the NetworkInterfaceId property for this object.
    `void` | `setRouteTableId(java.lang.String routeTableId)` The ID of the route table where the route will be added.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `CreateRouteRequest` | `withDestinationCidrBlock(java.lang.String destinationCidrBlock)` The CIDR address block used for the destination match.
    `CreateRouteRequest` | `withGatewayId(java.lang.String gatewayId)` The ID of a VPN or Internet gateway attached to your VPC.
    `CreateRouteRequest` | `withInstanceId(java.lang.String instanceId)` The ID of a NAT instance in your VPC.
    `CreateRouteRequest` | `withNetworkInterfaceId(java.lang.String networkInterfaceId)` Sets the value of the NetworkInterfaceId property for this object.
    `CreateRouteRequest` | `withRouteTableId(java.lang.String routeTableId)` The ID of the route table where the route will be added.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### CreateRouteRequest

          public CreateRouteRequest()

  - ### メソッドの詳細

    - #### getRouteTableId

          public java.lang.String getRouteTableId()

      The ID of the route table where the route will be added.
      戻り値:
        The ID of the route table where the route will be added.

    - #### setRouteTableId

          public void setRouteTableId(java.lang.String routeTableId)

      The ID of the route table where the route will be added.
      パラメータ:
        `routeTableId` - The ID of the route table where the route will be added.

    - #### withRouteTableId

          public CreateRouteRequest withRouteTableId(java.lang.String routeTableId)

      The ID of the route table where the route will be added.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `routeTableId` - The ID of the route table where the route will be added.

    - #### getDestinationCidrBlock

          public java.lang.String getDestinationCidrBlock()

      The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.
      戻り値:
        The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.

    - #### setDestinationCidrBlock

          public void setDestinationCidrBlock(java.lang.String destinationCidrBlock)

      The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.
      パラメータ:
        `destinationCidrBlock` - The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.

    - #### withDestinationCidrBlock

          public CreateRouteRequest withDestinationCidrBlock(java.lang.String destinationCidrBlock)

      The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `destinationCidrBlock` - The CIDR address block used for the destination match. For example: `0.0.0.0/0`. Routing decisions are based on the most specific match.

    - #### getGatewayId

          public java.lang.String getGatewayId()

      The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.
      戻り値:
        The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### setGatewayId

          public void setGatewayId(java.lang.String gatewayId)

      The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.
      パラメータ:
        `gatewayId` - The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### withGatewayId

          public CreateRouteRequest withGatewayId(java.lang.String gatewayId)

      The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `gatewayId` - The ID of a VPN or Internet gateway attached to your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### getInstanceId

          public java.lang.String getInstanceId()

      The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.
      戻り値:
        The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### setInstanceId

          public void setInstanceId(java.lang.String instanceId)

      The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.
      パラメータ:
        `instanceId` - The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### withInstanceId

          public CreateRouteRequest withInstanceId(java.lang.String instanceId)

      The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `instanceId` - The ID of a NAT instance in your VPC. You must provide either `GatewayId` or `InstanceId`, but not both.

    - #### getNetworkInterfaceId

          public java.lang.String getNetworkInterfaceId()

      Returns the value of the NetworkInterfaceId property for this object.
      戻り値:
        The value of the NetworkInterfaceId property for this object.

    - #### setNetworkInterfaceId

          public void setNetworkInterfaceId(java.lang.String networkInterfaceId)

      Sets the value of the NetworkInterfaceId property for this object.
      パラメータ:
        `networkInterfaceId` - The new value for the NetworkInterfaceId property for this object.

    - #### withNetworkInterfaceId

          public CreateRouteRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)

      Sets the value of the NetworkInterfaceId property for this object.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `networkInterfaceId` - The new value for the NetworkInterfaceId property for this object.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`