1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. getRoute

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.ec2.getRoute

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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:

    CidrBlock string
    The IPv4 CIDR block.
    RouteTableId string
    The ID of the route table for the route.
    CidrBlock string
    The IPv4 CIDR block.
    RouteTableId string
    The ID of the route table for the route.
    cidrBlock String
    The IPv4 CIDR block.
    routeTableId String
    The ID of the route table for the route.
    cidrBlock string
    The IPv4 CIDR block.
    routeTableId string
    The ID of the route table for the route.
    cidr_block str
    The IPv4 CIDR block.
    route_table_id str
    The ID of the route table for the route.
    cidrBlock String
    The IPv4 CIDR block.
    routeTableId String
    The ID of the route table for the route.

    getRoute Result

    The following output properties are available:

    CarrierGatewayId string
    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.
    CidrBlock string
    The IPv4 CIDR block.
    CoreNetworkArn string
    The Amazon Resource Name (ARN) of the core network.
    EgressOnlyInternetGatewayId string
    [IPv6 traffic only] The ID of an egress-only internet gateway.
    GatewayId string
    The ID of an internet gateway or virtual private gateway attached to your VPC.
    InstanceId 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.
    LocalGatewayId string
    The ID of the local gateway.
    NatGatewayId string
    [IPv4 traffic only] The ID of a NAT gateway.
    NetworkInterfaceId string
    The ID of a network interface.
    TransitGatewayId string
    The ID of a transit gateway.
    VpcEndpointId string
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    VpcPeeringConnectionId string
    The ID of a VPC peering connection.
    CarrierGatewayId string
    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.
    CidrBlock string
    The IPv4 CIDR block.
    CoreNetworkArn string
    The Amazon Resource Name (ARN) of the core network.
    EgressOnlyInternetGatewayId string
    [IPv6 traffic only] The ID of an egress-only internet gateway.
    GatewayId string
    The ID of an internet gateway or virtual private gateway attached to your VPC.
    InstanceId 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.
    LocalGatewayId string
    The ID of the local gateway.
    NatGatewayId string
    [IPv4 traffic only] The ID of a NAT gateway.
    NetworkInterfaceId string
    The ID of a network interface.
    TransitGatewayId string
    The ID of a transit gateway.
    VpcEndpointId string
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    VpcPeeringConnectionId string
    The ID of a VPC peering connection.
    carrierGatewayId String
    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.
    cidrBlock String
    The IPv4 CIDR block.
    coreNetworkArn String
    The Amazon Resource Name (ARN) of the core network.
    egressOnlyInternetGatewayId String
    [IPv6 traffic only] The ID of an egress-only internet gateway.
    gatewayId String
    The ID of an internet gateway or virtual private gateway attached to your VPC.
    instanceId 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.
    localGatewayId String
    The ID of the local gateway.
    natGatewayId String
    [IPv4 traffic only] The ID of a NAT gateway.
    networkInterfaceId String
    The ID of a network interface.
    transitGatewayId String
    The ID of a transit gateway.
    vpcEndpointId String
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    vpcPeeringConnectionId String
    The ID of a VPC peering connection.
    carrierGatewayId string
    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.
    cidrBlock string
    The IPv4 CIDR block.
    coreNetworkArn string
    The Amazon Resource Name (ARN) of the core network.
    egressOnlyInternetGatewayId string
    [IPv6 traffic only] The ID of an egress-only internet gateway.
    gatewayId string
    The ID of an internet gateway or virtual private gateway attached to your VPC.
    instanceId 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.
    localGatewayId string
    The ID of the local gateway.
    natGatewayId string
    [IPv4 traffic only] The ID of a NAT gateway.
    networkInterfaceId string
    The ID of a network interface.
    transitGatewayId string
    The ID of a transit gateway.
    vpcEndpointId string
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    vpcPeeringConnectionId string
    The ID of a VPC peering connection.
    carrier_gateway_id str
    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_arn str
    The Amazon Resource Name (ARN) of the core network.
    egress_only_internet_gateway_id str
    [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_id str
    The ID of the local gateway.
    nat_gateway_id str
    [IPv4 traffic only] The ID of a NAT gateway.
    network_interface_id str
    The ID of a network interface.
    transit_gateway_id str
    The ID of a transit gateway.
    vpc_endpoint_id str
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    vpc_peering_connection_id str
    The ID of a VPC peering connection.
    carrierGatewayId String
    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.
    cidrBlock String
    The IPv4 CIDR block.
    coreNetworkArn String
    The Amazon Resource Name (ARN) of the core network.
    egressOnlyInternetGatewayId String
    [IPv6 traffic only] The ID of an egress-only internet gateway.
    gatewayId String
    The ID of an internet gateway or virtual private gateway attached to your VPC.
    instanceId 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.
    localGatewayId String
    The ID of the local gateway.
    natGatewayId String
    [IPv4 traffic only] The ID of a NAT gateway.
    networkInterfaceId String
    The ID of a network interface.
    transitGatewayId String
    The ID of a transit gateway.
    vpcEndpointId String
    The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
    vpcPeeringConnectionId String
    The ID of a VPC peering connection.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi