We recommend new projects start with resources from the AWS provider.
aws-native.ec2.getRoute
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Specifies a route in a route table. For more information, see Routes in the Amazon VPC User Guide.
You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target.
If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway attachment. The route table cannot use the transit gateway until it has successfully attached to the VPC. Add a DependsOn Attribute in the AWS::EC2::Route
resource to explicitly declare a dependency on the AWS::EC2::TransitGatewayAttachment
resource.
Using getRoute
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRoute(args: GetRouteArgs, opts?: InvokeOptions): Promise<GetRouteResult>
function getRouteOutput(args: GetRouteOutputArgs, opts?: InvokeOptions): Output<GetRouteResult>
def get_route(cidr_block: Optional[str] = None,
route_table_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRouteResult
def get_route_output(cidr_block: Optional[pulumi.Input[str]] = None,
route_table_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRouteResult]
func LookupRoute(ctx *Context, args *LookupRouteArgs, opts ...InvokeOption) (*LookupRouteResult, error)
func LookupRouteOutput(ctx *Context, args *LookupRouteOutputArgs, opts ...InvokeOption) LookupRouteResultOutput
> Note: This function is named LookupRoute
in the Go SDK.
public static class GetRoute
{
public static Task<GetRouteResult> InvokeAsync(GetRouteArgs args, InvokeOptions? opts = null)
public static Output<GetRouteResult> Invoke(GetRouteInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:ec2:getRoute
arguments:
# arguments dictionary
The following arguments are supported:
- Cidr
Block string - The IPv4 CIDR block.
- Route
Table stringId - The ID of the route table for the route.
- Cidr
Block string - The IPv4 CIDR block.
- Route
Table stringId - The ID of the route table for the route.
- cidr
Block String - The IPv4 CIDR block.
- route
Table StringId - The ID of the route table for the route.
- cidr
Block string - The IPv4 CIDR block.
- route
Table stringId - The ID of the route table for the route.
- cidr_
block str - The IPv4 CIDR block.
- route_
table_ strid - The ID of the route table for the route.
- cidr
Block String - The IPv4 CIDR block.
- route
Table StringId - The ID of the route table for the route.
getRoute Result
The following output properties are available:
- Carrier
Gateway stringId - 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.
- Cidr
Block string - The IPv4 CIDR block.
- Core
Network stringArn - The Amazon Resource Name (ARN) of the core network.
- Egress
Only stringInternet Gateway Id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- Gateway
Id string - The ID of an internet gateway or virtual private gateway attached to your VPC.
- Instance
Id string - 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.
- Local
Gateway stringId - The ID of the local gateway.
- Nat
Gateway stringId - [IPv4 traffic only] The ID of a NAT gateway.
- Network
Interface stringId - The ID of a network interface.
- Transit
Gateway stringId - The ID of a transit gateway.
- Vpc
Endpoint stringId - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- Vpc
Peering stringConnection Id - The ID of a VPC peering connection.
- Carrier
Gateway stringId - 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.
- Cidr
Block string - The IPv4 CIDR block.
- Core
Network stringArn - The Amazon Resource Name (ARN) of the core network.
- Egress
Only stringInternet Gateway Id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- Gateway
Id string - The ID of an internet gateway or virtual private gateway attached to your VPC.
- Instance
Id string - 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.
- Local
Gateway stringId - The ID of the local gateway.
- Nat
Gateway stringId - [IPv4 traffic only] The ID of a NAT gateway.
- Network
Interface stringId - The ID of a network interface.
- Transit
Gateway stringId - The ID of a transit gateway.
- Vpc
Endpoint stringId - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- Vpc
Peering stringConnection Id - The ID of a VPC peering connection.
- carrier
Gateway StringId - 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.
- cidr
Block String - The IPv4 CIDR block.
- core
Network StringArn - The Amazon Resource Name (ARN) of the core network.
- egress
Only StringInternet Gateway Id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- gateway
Id String - The ID of an internet gateway or virtual private gateway attached to your VPC.
- instance
Id String - 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.
- local
Gateway StringId - The ID of the local gateway.
- nat
Gateway StringId - [IPv4 traffic only] The ID of a NAT gateway.
- network
Interface StringId - The ID of a network interface.
- transit
Gateway StringId - The ID of a transit gateway.
- vpc
Endpoint StringId - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- vpc
Peering StringConnection Id - The ID of a VPC peering connection.
- carrier
Gateway stringId - 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.
- cidr
Block string - The IPv4 CIDR block.
- core
Network stringArn - The Amazon Resource Name (ARN) of the core network.
- egress
Only stringInternet Gateway Id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- gateway
Id string - The ID of an internet gateway or virtual private gateway attached to your VPC.
- instance
Id string - 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.
- local
Gateway stringId - The ID of the local gateway.
- nat
Gateway stringId - [IPv4 traffic only] The ID of a NAT gateway.
- network
Interface stringId - The ID of a network interface.
- transit
Gateway stringId - The ID of a transit gateway.
- vpc
Endpoint stringId - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- vpc
Peering stringConnection Id - The ID of a VPC peering connection.
- carrier_
gateway_ strid - 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.
- cidr_
block str - The IPv4 CIDR block.
- core_
network_ strarn - The Amazon Resource Name (ARN) of the core network.
- egress_
only_ strinternet_ gateway_ id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- gateway_
id str - The ID of an internet gateway or virtual private gateway attached to your VPC.
- instance_
id str - 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.
- local_
gateway_ strid - The ID of the local gateway.
- nat_
gateway_ strid - [IPv4 traffic only] The ID of a NAT gateway.
- network_
interface_ strid - The ID of a network interface.
- transit_
gateway_ strid - The ID of a transit gateway.
- vpc_
endpoint_ strid - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- vpc_
peering_ strconnection_ id - The ID of a VPC peering connection.
- carrier
Gateway StringId - 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.
- cidr
Block String - The IPv4 CIDR block.
- core
Network StringArn - The Amazon Resource Name (ARN) of the core network.
- egress
Only StringInternet Gateway Id - [IPv6 traffic only] The ID of an egress-only internet gateway.
- gateway
Id String - The ID of an internet gateway or virtual private gateway attached to your VPC.
- instance
Id String - 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.
- local
Gateway StringId - The ID of the local gateway.
- nat
Gateway StringId - [IPv4 traffic only] The ID of a NAT gateway.
- network
Interface StringId - The ID of a network interface.
- transit
Gateway StringId - The ID of a transit gateway.
- vpc
Endpoint StringId - The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
- vpc
Peering StringConnection Id - The ID of a VPC peering connection.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.