1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. getPbrRouteEntries
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.vpc.getPbrRouteEntries

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    NOTE: Available in v1.162.0+.

    The data source lists a number of VPN Pbr Route Entries resource information owned by an Alicloud account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.vpc.getPbrRouteEntries({
        vpnGatewayId: "example_vpn_gateway_id",
        ids: ["example_id"],
    });
    export const vpnIpsecServerId1 = ids.then(ids => ids.entries?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.vpc.get_pbr_route_entries(vpn_gateway_id="example_vpn_gateway_id",
        ids=["example_id"])
    pulumi.export("vpnIpsecServerId1", ids.entries[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := vpc.GetPbrRouteEntries(ctx, &vpc.GetPbrRouteEntriesArgs{
    			VpnGatewayId: "example_vpn_gateway_id",
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("vpnIpsecServerId1", ids.Entries[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Vpc.GetPbrRouteEntries.Invoke(new()
        {
            VpnGatewayId = "example_vpn_gateway_id",
            Ids = new[]
            {
                "example_id",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["vpnIpsecServerId1"] = ids.Apply(getPbrRouteEntriesResult => getPbrRouteEntriesResult.Entries[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetPbrRouteEntriesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var ids = VpcFunctions.getPbrRouteEntries(GetPbrRouteEntriesArgs.builder()
                .vpnGatewayId("example_vpn_gateway_id")
                .ids("example_id")
                .build());
    
            ctx.export("vpnIpsecServerId1", ids.applyValue(getPbrRouteEntriesResult -> getPbrRouteEntriesResult.entries()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:vpc:getPbrRouteEntries
          Arguments:
            vpnGatewayId: example_vpn_gateway_id
            ids:
              - example_id
    outputs:
      vpnIpsecServerId1: ${ids.entries[0].id}
    

    Using getPbrRouteEntries

    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 getPbrRouteEntries(args: GetPbrRouteEntriesArgs, opts?: InvokeOptions): Promise<GetPbrRouteEntriesResult>
    function getPbrRouteEntriesOutput(args: GetPbrRouteEntriesOutputArgs, opts?: InvokeOptions): Output<GetPbrRouteEntriesResult>
    def get_pbr_route_entries(ids: Optional[Sequence[str]] = None,
                              output_file: Optional[str] = None,
                              vpn_gateway_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPbrRouteEntriesResult
    def get_pbr_route_entries_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              vpn_gateway_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPbrRouteEntriesResult]
    func GetPbrRouteEntries(ctx *Context, args *GetPbrRouteEntriesArgs, opts ...InvokeOption) (*GetPbrRouteEntriesResult, error)
    func GetPbrRouteEntriesOutput(ctx *Context, args *GetPbrRouteEntriesOutputArgs, opts ...InvokeOption) GetPbrRouteEntriesResultOutput

    > Note: This function is named GetPbrRouteEntries in the Go SDK.

    public static class GetPbrRouteEntries 
    {
        public static Task<GetPbrRouteEntriesResult> InvokeAsync(GetPbrRouteEntriesArgs args, InvokeOptions? opts = null)
        public static Output<GetPbrRouteEntriesResult> Invoke(GetPbrRouteEntriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPbrRouteEntriesResult> getPbrRouteEntries(GetPbrRouteEntriesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getPbrRouteEntries:getPbrRouteEntries
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VpnGatewayId string
    The ID of the VPN gateway.
    Ids List<string>
    A list of VPN Pbr Route Entries IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    VpnGatewayId string
    The ID of the VPN gateway.
    Ids []string
    A list of VPN Pbr Route Entries IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    vpnGatewayId String
    The ID of the VPN gateway.
    ids List<String>
    A list of VPN Pbr Route Entries IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    vpnGatewayId string
    The ID of the VPN gateway.
    ids string[]
    A list of VPN Pbr Route Entries IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    vpn_gateway_id str
    The ID of the VPN gateway.
    ids Sequence[str]
    A list of VPN Pbr Route Entries IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    vpnGatewayId String
    The ID of the VPN gateway.
    ids List<String>
    A list of VPN Pbr Route Entries IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getPbrRouteEntries Result

    The following output properties are available:

    Entries List<Pulumi.AliCloud.Vpc.Outputs.GetPbrRouteEntriesEntry>
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    VpnGatewayId string
    The ID of the vpn gateway.
    OutputFile string
    Entries []GetPbrRouteEntriesEntry
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    VpnGatewayId string
    The ID of the vpn gateway.
    OutputFile string
    entries List<GetPbrRouteEntriesEntry>
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    vpnGatewayId String
    The ID of the vpn gateway.
    outputFile String
    entries GetPbrRouteEntriesEntry[]
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    vpnGatewayId string
    The ID of the vpn gateway.
    outputFile string
    entries Sequence[GetPbrRouteEntriesEntry]
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    vpn_gateway_id str
    The ID of the vpn gateway.
    output_file str
    entries List<Property Map>
    A list of VPN Pbr Route Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    vpnGatewayId String
    The ID of the vpn gateway.
    outputFile String

    Supporting Types

    GetPbrRouteEntriesEntry

    CreateTime string
    The creation time of the VPN Pbr Route Entry.
    Id string
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    NextHop string
    The next hop of the policy-based route.
    RouteDest string
    The destination CIDR block of the policy-based route.
    RouteSource string
    The source CIDR block of the policy-based route.
    Status string
    The status of the VPN Pbr Route Entry.
    VpnGatewayId string
    The ID of the VPN gateway.
    Weight int
    The weight of the policy-based route. Valid values: 0 and 100.
    CreateTime string
    The creation time of the VPN Pbr Route Entry.
    Id string
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    NextHop string
    The next hop of the policy-based route.
    RouteDest string
    The destination CIDR block of the policy-based route.
    RouteSource string
    The source CIDR block of the policy-based route.
    Status string
    The status of the VPN Pbr Route Entry.
    VpnGatewayId string
    The ID of the VPN gateway.
    Weight int
    The weight of the policy-based route. Valid values: 0 and 100.
    createTime String
    The creation time of the VPN Pbr Route Entry.
    id String
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    nextHop String
    The next hop of the policy-based route.
    routeDest String
    The destination CIDR block of the policy-based route.
    routeSource String
    The source CIDR block of the policy-based route.
    status String
    The status of the VPN Pbr Route Entry.
    vpnGatewayId String
    The ID of the VPN gateway.
    weight Integer
    The weight of the policy-based route. Valid values: 0 and 100.
    createTime string
    The creation time of the VPN Pbr Route Entry.
    id string
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    nextHop string
    The next hop of the policy-based route.
    routeDest string
    The destination CIDR block of the policy-based route.
    routeSource string
    The source CIDR block of the policy-based route.
    status string
    The status of the VPN Pbr Route Entry.
    vpnGatewayId string
    The ID of the VPN gateway.
    weight number
    The weight of the policy-based route. Valid values: 0 and 100.
    create_time str
    The creation time of the VPN Pbr Route Entry.
    id str
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    next_hop str
    The next hop of the policy-based route.
    route_dest str
    The destination CIDR block of the policy-based route.
    route_source str
    The source CIDR block of the policy-based route.
    status str
    The status of the VPN Pbr Route Entry.
    vpn_gateway_id str
    The ID of the VPN gateway.
    weight int
    The weight of the policy-based route. Valid values: 0 and 100.
    createTime String
    The creation time of the VPN Pbr Route Entry.
    id String
    The id of the vpn pbr route entry. The value formats as <vpn_gateway_id>:<next_hop>:<route_source>:<route_dest>.
    nextHop String
    The next hop of the policy-based route.
    routeDest String
    The destination CIDR block of the policy-based route.
    routeSource String
    The source CIDR block of the policy-based route.
    status String
    The status of the VPN Pbr Route Entry.
    vpnGatewayId String
    The ID of the VPN gateway.
    weight Number
    The weight of the policy-based route. Valid values: 0 and 100.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi