Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates a route in a route table within a VPC.
You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list.
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.
Synopsis
- data CreateRoute = CreateRoute' {
- carrierGatewayId :: Maybe Text
- coreNetworkArn :: Maybe Text
- destinationCidrBlock :: Maybe Text
- destinationIpv6CidrBlock :: Maybe Text
- destinationPrefixListId :: Maybe Text
- dryRun :: Maybe Bool
- egressOnlyInternetGatewayId :: Maybe Text
- gatewayId :: Maybe Text
- instanceId :: Maybe Text
- localGatewayId :: Maybe Text
- natGatewayId :: Maybe Text
- networkInterfaceId :: Maybe Text
- transitGatewayId :: Maybe Text
- vpcEndpointId :: Maybe Text
- vpcPeeringConnectionId :: Maybe Text
- routeTableId :: Text
- newCreateRoute :: Text -> CreateRoute
- createRoute_carrierGatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_coreNetworkArn :: Lens' CreateRoute (Maybe Text)
- createRoute_destinationCidrBlock :: Lens' CreateRoute (Maybe Text)
- createRoute_destinationIpv6CidrBlock :: Lens' CreateRoute (Maybe Text)
- createRoute_destinationPrefixListId :: Lens' CreateRoute (Maybe Text)
- createRoute_dryRun :: Lens' CreateRoute (Maybe Bool)
- createRoute_egressOnlyInternetGatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_gatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_instanceId :: Lens' CreateRoute (Maybe Text)
- createRoute_localGatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_natGatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_networkInterfaceId :: Lens' CreateRoute (Maybe Text)
- createRoute_transitGatewayId :: Lens' CreateRoute (Maybe Text)
- createRoute_vpcEndpointId :: Lens' CreateRoute (Maybe Text)
- createRoute_vpcPeeringConnectionId :: Lens' CreateRoute (Maybe Text)
- createRoute_routeTableId :: Lens' CreateRoute Text
- data CreateRouteResponse = CreateRouteResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newCreateRouteResponse :: Int -> CreateRouteResponse
- createRouteResponse_return :: Lens' CreateRouteResponse (Maybe Bool)
- createRouteResponse_httpStatus :: Lens' CreateRouteResponse Int
Creating a Request
data CreateRoute Source #
See: newCreateRoute
smart constructor.
CreateRoute' | |
|
Instances
Create a value of CreateRoute
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateRoute
, createRoute_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.
CreateRoute
, createRoute_coreNetworkArn
- The Amazon Resource Name (ARN) of the core network.
CreateRoute
, createRoute_destinationCidrBlock
- 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
.
CreateRoute
, createRoute_destinationIpv6CidrBlock
- The IPv6 CIDR block used for the destination match. Routing decisions
are based on the most specific match.
CreateRoute
, createRoute_destinationPrefixListId
- The ID of a prefix list used for the destination match.
$sel:dryRun:CreateRoute'
, createRoute_dryRun
- Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
CreateRoute
, createRoute_egressOnlyInternetGatewayId
- [IPv6 traffic only] The ID of an egress-only internet gateway.
CreateRoute
, createRoute_gatewayId
- The ID of an internet gateway or virtual private gateway attached to
your VPC.
CreateRoute
, createRoute_instanceId
- 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.
CreateRoute
, createRoute_localGatewayId
- The ID of the local gateway.
CreateRoute
, createRoute_natGatewayId
- [IPv4 traffic only] The ID of a NAT gateway.
CreateRoute
, createRoute_networkInterfaceId
- The ID of a network interface.
CreateRoute
, createRoute_transitGatewayId
- The ID of a transit gateway.
CreateRoute
, createRoute_vpcEndpointId
- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints
only.
CreateRoute
, createRoute_vpcPeeringConnectionId
- The ID of a VPC peering connection.
CreateRoute
, createRoute_routeTableId
- The ID of the route table for the route.
Request Lenses
createRoute_carrierGatewayId :: Lens' CreateRoute (Maybe Text) Source #
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.
createRoute_coreNetworkArn :: Lens' CreateRoute (Maybe Text) Source #
The Amazon Resource Name (ARN) of the core network.
createRoute_destinationCidrBlock :: Lens' CreateRoute (Maybe Text) Source #
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
.
createRoute_destinationIpv6CidrBlock :: Lens' CreateRoute (Maybe Text) Source #
The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
createRoute_destinationPrefixListId :: Lens' CreateRoute (Maybe Text) Source #
The ID of a prefix list used for the destination match.
createRoute_dryRun :: Lens' CreateRoute (Maybe Bool) Source #
Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
createRoute_egressOnlyInternetGatewayId :: Lens' CreateRoute (Maybe Text) Source #
- IPv6 traffic only
- The ID of an egress-only internet gateway.
createRoute_gatewayId :: Lens' CreateRoute (Maybe Text) Source #
The ID of an internet gateway or virtual private gateway attached to your VPC.
createRoute_instanceId :: Lens' CreateRoute (Maybe Text) Source #
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.
createRoute_localGatewayId :: Lens' CreateRoute (Maybe Text) Source #
The ID of the local gateway.
createRoute_natGatewayId :: Lens' CreateRoute (Maybe Text) Source #
- IPv4 traffic only
- The ID of a NAT gateway.
createRoute_networkInterfaceId :: Lens' CreateRoute (Maybe Text) Source #
The ID of a network interface.
createRoute_transitGatewayId :: Lens' CreateRoute (Maybe Text) Source #
The ID of a transit gateway.
createRoute_vpcEndpointId :: Lens' CreateRoute (Maybe Text) Source #
The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
createRoute_vpcPeeringConnectionId :: Lens' CreateRoute (Maybe Text) Source #
The ID of a VPC peering connection.
createRoute_routeTableId :: Lens' CreateRoute Text Source #
The ID of the route table for the route.
Destructuring the Response
data CreateRouteResponse Source #
See: newCreateRouteResponse
smart constructor.
CreateRouteResponse' | |
|
Instances
newCreateRouteResponse Source #
Create a value of CreateRouteResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:return':CreateRouteResponse'
, createRouteResponse_return
- Returns true
if the request succeeds; otherwise, it returns an error.
$sel:httpStatus:CreateRouteResponse'
, createRouteResponse_httpStatus
- The response's http status code.
Response Lenses
createRouteResponse_return :: Lens' CreateRouteResponse (Maybe Bool) Source #
Returns true
if the request succeeds; otherwise, it returns an error.
createRouteResponse_httpStatus :: Lens' CreateRouteResponse Int Source #
The response's http status code.