/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateRouteRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateRouteRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* 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
*
* The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
*
* The ID of a prefix list used for the destination match.
*
* The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
*
* [IPv6 traffic only] The ID of an egress-only internet gateway.
*
* The ID of an internet gateway or virtual private gateway attached to your VPC.
*
* 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.
*
* [IPv4 traffic only] The ID of a NAT gateway.
*
* The ID of a transit gateway.
*
* The ID of the local gateway.
*
* 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.
*
* The ID of a network interface.
*
* The ID of the route table for the route.
*
* The ID of a VPC peering connection.
*
* The Amazon Resource Name (ARN) of the core network.
*
* 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
*
* 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
*
* 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
*
* The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
*
* The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
*
* The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
*
* The ID of a prefix list used for the destination match.
*
* The ID of a prefix list used for the destination match.
*
* The ID of a prefix list used for the destination match.
*
* The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
*
* The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
*
* The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
*
* [IPv6 traffic only] The ID of an egress-only internet gateway.
*
* [IPv6 traffic only] The ID of an egress-only internet gateway.
*
* [IPv6 traffic only] The ID of an egress-only internet gateway.
*
* The ID of an internet gateway or virtual private gateway attached to your VPC.
*
* The ID of an internet gateway or virtual private gateway attached to your VPC.
*
* The ID of an internet gateway or virtual private gateway attached to your VPC.
*
* 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.
*
* 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.
*
* 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.
*
* [IPv4 traffic only] The ID of a NAT gateway.
*
* [IPv4 traffic only] The ID of a NAT gateway.
*
* [IPv4 traffic only] The ID of a NAT gateway.
*
* The ID of a transit gateway.
*
* The ID of a transit gateway.
*
* The ID of a transit gateway.
*
* The ID of the local gateway.
*
* The ID of the local gateway.
*
* The ID of the local gateway.
*
* 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.
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
*/
public void setDestinationCidrBlock(String destinationCidrBlock) {
this.destinationCidrBlock = destinationCidrBlock;
}
/**
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
*/
public String getDestinationCidrBlock() {
return this.destinationCidrBlock;
}
/**
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateRouteRequest withDestinationCidrBlock(String destinationCidrBlock) {
setDestinationCidrBlock(destinationCidrBlock);
return this;
}
/**
*
* You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone. */ public void setCarrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; } /** *
* 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. *
* * @return 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. */ public String getCarrierGatewayId() { return this.carrierGatewayId; } /** *
* 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. *
* * @param carrierGatewayId * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRouteRequest withCarrierGatewayId(String carrierGatewayId) { setCarrierGatewayId(carrierGatewayId); return this; } /** *
* The ID of a network interface. *
* * @param networkInterfaceId * The ID of a network interface. */ public void setNetworkInterfaceId(String networkInterfaceId) { this.networkInterfaceId = networkInterfaceId; } /** ** The ID of a network interface. *
* * @return The ID of a network interface. */ public String getNetworkInterfaceId() { return this.networkInterfaceId; } /** ** The ID of a network interface. *
* * @param networkInterfaceId * The ID of a network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRouteRequest withNetworkInterfaceId(String networkInterfaceId) { setNetworkInterfaceId(networkInterfaceId); return this; } /** ** The ID of the route table for the route. *
* * @param routeTableId * The ID of the route table for the route. */ public void setRouteTableId(String routeTableId) { this.routeTableId = routeTableId; } /** ** The ID of the route table for the route. *
* * @return The ID of the route table for the route. */ public String getRouteTableId() { return this.routeTableId; } /** ** The ID of the route table for the route. *
* * @param routeTableId * The ID of the route table for the route. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRouteRequest withRouteTableId(String routeTableId) { setRouteTableId(routeTableId); return this; } /** ** The ID of a VPC peering connection. *
* * @param vpcPeeringConnectionId * The ID of a VPC peering connection. */ public void setVpcPeeringConnectionId(String vpcPeeringConnectionId) { this.vpcPeeringConnectionId = vpcPeeringConnectionId; } /** ** The ID of a VPC peering connection. *
* * @return The ID of a VPC peering connection. */ public String getVpcPeeringConnectionId() { return this.vpcPeeringConnectionId; } /** ** The ID of a VPC peering connection. *
* * @param vpcPeeringConnectionId * The ID of a VPC peering connection. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRouteRequest withVpcPeeringConnectionId(String vpcPeeringConnectionId) { setVpcPeeringConnectionId(vpcPeeringConnectionId); return this; } /** ** The Amazon Resource Name (ARN) of the core network. *
* * @param coreNetworkArn * The Amazon Resource Name (ARN) of the core network. */ public void setCoreNetworkArn(String coreNetworkArn) { this.coreNetworkArn = coreNetworkArn; } /** ** The Amazon Resource Name (ARN) of the core network. *
* * @return The Amazon Resource Name (ARN) of the core network. */ public String getCoreNetworkArn() { return this.coreNetworkArn; } /** ** The Amazon Resource Name (ARN) of the core network. *
* * @param coreNetworkArn * The Amazon Resource Name (ARN) of the core network. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRouteRequest withCoreNetworkArn(String coreNetworkArn) { setCoreNetworkArn(coreNetworkArn); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request