Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.vpc.getPbrRouteEntries
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Vpn
Gateway stringId  - The ID of the VPN gateway.
 - Ids List<string>
 - A list of VPN Pbr Route Entries IDs.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- Vpn
Gateway stringId  - The ID of the VPN gateway.
 - Ids []string
 - A list of VPN Pbr Route Entries IDs.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- vpn
Gateway StringId  - The ID of the VPN gateway.
 - ids List<String>
 - A list of VPN Pbr Route Entries IDs.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
- vpn
Gateway stringId  - The ID of the VPN gateway.
 - ids string[]
 - A list of VPN Pbr Route Entries IDs.
 - output
File string - File name where to save data source results (after running 
pulumi preview). 
- vpn_
gateway_ strid  - 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). 
- vpn
Gateway StringId  - The ID of the VPN gateway.
 - ids List<String>
 - A list of VPN Pbr Route Entries IDs.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
getPbrRouteEntries Result
The following output properties are available:
- Entries
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Pbr Route Entries Entry>  - 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>
 - Vpn
Gateway stringId  - The ID of the vpn gateway.
 - Output
File string 
- Entries
[]Get
Pbr Route Entries Entry  - 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
 - Vpn
Gateway stringId  - The ID of the vpn gateway.
 - Output
File string 
- entries
List<Get
Pbr Route Entries Entry>  - 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>
 - vpn
Gateway StringId  - The ID of the vpn gateway.
 - output
File String 
- entries
Get
Pbr Route Entries Entry[]  - 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[]
 - vpn
Gateway stringId  - The ID of the vpn gateway.
 - output
File string 
- entries
Sequence[Get
Pbr Route Entries Entry]  - 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_ strid  - 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>
 - vpn
Gateway StringId  - The ID of the vpn gateway.
 - output
File String 
Supporting Types
GetPbrRouteEntriesEntry    
- Create
Time 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>. - Next
Hop string - The next hop of the policy-based route.
 - Route
Dest string - The destination CIDR block of the policy-based route.
 - Route
Source string - The source CIDR block of the policy-based route.
 - Status string
 - The status of the VPN Pbr Route Entry.
 - Vpn
Gateway stringId  - The ID of the VPN gateway.
 - Weight int
 - The weight of the policy-based route. Valid values: 0 and 100.
 
- Create
Time 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>. - Next
Hop string - The next hop of the policy-based route.
 - Route
Dest string - The destination CIDR block of the policy-based route.
 - Route
Source string - The source CIDR block of the policy-based route.
 - Status string
 - The status of the VPN Pbr Route Entry.
 - Vpn
Gateway stringId  - The ID of the VPN gateway.
 - Weight int
 - The weight of the policy-based route. Valid values: 0 and 100.
 
- create
Time 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>. - next
Hop String - The next hop of the policy-based route.
 - route
Dest String - The destination CIDR block of the policy-based route.
 - route
Source String - The source CIDR block of the policy-based route.
 - status String
 - The status of the VPN Pbr Route Entry.
 - vpn
Gateway StringId  - The ID of the VPN gateway.
 - weight Integer
 - The weight of the policy-based route. Valid values: 0 and 100.
 
- create
Time 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>. - next
Hop string - The next hop of the policy-based route.
 - route
Dest string - The destination CIDR block of the policy-based route.
 - route
Source string - The source CIDR block of the policy-based route.
 - status string
 - The status of the VPN Pbr Route Entry.
 - vpn
Gateway stringId  - 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_ strid  - The ID of the VPN gateway.
 - weight int
 - The weight of the policy-based route. Valid values: 0 and 100.
 
- create
Time 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>. - next
Hop String - The next hop of the policy-based route.
 - route
Dest String - The destination CIDR block of the policy-based route.
 - route
Source String - The source CIDR block of the policy-based route.
 - status String
 - The status of the VPN Pbr Route Entry.
 - vpn
Gateway StringId  - 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 
alicloudTerraform Provider.