1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. getRegionRouteEntries
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cen.getRegionRouteEntries

Explore with Pulumi AI

This data source provides CEN Regional Route Entries available to the user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const entry = alicloud.cen.getRegionRouteEntries({
    instanceId: "cen-id1",
    regionId: "cn-beijing",
});
export const firstRegionRouteEntriesRouteEntryCidrBlock = entry.then(entry => entry.entries?.[0]?.cidrBlock);
Copy
import pulumi
import pulumi_alicloud as alicloud

entry = alicloud.cen.get_region_route_entries(instance_id="cen-id1",
    region_id="cn-beijing")
pulumi.export("firstRegionRouteEntriesRouteEntryCidrBlock", entry.entries[0].cidr_block)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		entry, err := cen.GetRegionRouteEntries(ctx, &cen.GetRegionRouteEntriesArgs{
			InstanceId: "cen-id1",
			RegionId:   "cn-beijing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstRegionRouteEntriesRouteEntryCidrBlock", entry.Entries[0].CidrBlock)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var entry = AliCloud.Cen.GetRegionRouteEntries.Invoke(new()
    {
        InstanceId = "cen-id1",
        RegionId = "cn-beijing",
    });

    return new Dictionary<string, object?>
    {
        ["firstRegionRouteEntriesRouteEntryCidrBlock"] = entry.Apply(getRegionRouteEntriesResult => getRegionRouteEntriesResult.Entries[0]?.CidrBlock),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetRegionRouteEntriesArgs;
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 entry = CenFunctions.getRegionRouteEntries(GetRegionRouteEntriesArgs.builder()
            .instanceId("cen-id1")
            .regionId("cn-beijing")
            .build());

        ctx.export("firstRegionRouteEntriesRouteEntryCidrBlock", entry.applyValue(getRegionRouteEntriesResult -> getRegionRouteEntriesResult.entries()[0].cidrBlock()));
    }
}
Copy
variables:
  entry:
    fn::invoke:
      function: alicloud:cen:getRegionRouteEntries
      arguments:
        instanceId: cen-id1
        regionId: cn-beijing
outputs:
  firstRegionRouteEntriesRouteEntryCidrBlock: ${entry.entries[0].cidrBlock}
Copy

Using getRegionRouteEntries

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 getRegionRouteEntries(args: GetRegionRouteEntriesArgs, opts?: InvokeOptions): Promise<GetRegionRouteEntriesResult>
function getRegionRouteEntriesOutput(args: GetRegionRouteEntriesOutputArgs, opts?: InvokeOptions): Output<GetRegionRouteEntriesResult>
Copy
def get_region_route_entries(instance_id: Optional[str] = None,
                             output_file: Optional[str] = None,
                             region_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetRegionRouteEntriesResult
def get_region_route_entries_output(instance_id: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             region_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetRegionRouteEntriesResult]
Copy
func GetRegionRouteEntries(ctx *Context, args *GetRegionRouteEntriesArgs, opts ...InvokeOption) (*GetRegionRouteEntriesResult, error)
func GetRegionRouteEntriesOutput(ctx *Context, args *GetRegionRouteEntriesOutputArgs, opts ...InvokeOption) GetRegionRouteEntriesResultOutput
Copy

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

public static class GetRegionRouteEntries 
{
    public static Task<GetRegionRouteEntriesResult> InvokeAsync(GetRegionRouteEntriesArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionRouteEntriesResult> Invoke(GetRegionRouteEntriesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRegionRouteEntriesResult> getRegionRouteEntries(GetRegionRouteEntriesArgs args, InvokeOptions options)
public static Output<GetRegionRouteEntriesResult> getRegionRouteEntries(GetRegionRouteEntriesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cen/getRegionRouteEntries:getRegionRouteEntries
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
ID of the CEN instance.
RegionId
This property is required.
Changes to this property will trigger replacement.
string
ID of the region.
OutputFile string
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
ID of the CEN instance.
RegionId
This property is required.
Changes to this property will trigger replacement.
string
ID of the region.
OutputFile string
instanceId
This property is required.
Changes to this property will trigger replacement.
String
ID of the CEN instance.
regionId
This property is required.
Changes to this property will trigger replacement.
String
ID of the region.
outputFile String
instanceId
This property is required.
Changes to this property will trigger replacement.
string
ID of the CEN instance.
regionId
This property is required.
Changes to this property will trigger replacement.
string
ID of the region.
outputFile string
instance_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the CEN instance.
region_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the region.
output_file str
instanceId
This property is required.
Changes to this property will trigger replacement.
String
ID of the CEN instance.
regionId
This property is required.
Changes to this property will trigger replacement.
String
ID of the region.
outputFile String

getRegionRouteEntries Result

The following output properties are available:

Entries List<Pulumi.AliCloud.Cen.Outputs.GetRegionRouteEntriesEntry>
A list of CEN Route Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
InstanceId string
RegionId string
OutputFile string
Entries []GetRegionRouteEntriesEntry
A list of CEN Route Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
InstanceId string
RegionId string
OutputFile string
entries List<GetRegionRouteEntriesEntry>
A list of CEN Route Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
instanceId String
regionId String
outputFile String
entries GetRegionRouteEntriesEntry[]
A list of CEN Route Entries. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
instanceId string
regionId string
outputFile string
entries Sequence[GetRegionRouteEntriesEntry]
A list of CEN Route Entries. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
instance_id str
region_id str
output_file str
entries List<Property Map>
A list of CEN Route Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
instanceId String
regionId String
outputFile String

Supporting Types

GetRegionRouteEntriesEntry

CidrBlock This property is required. string
The destination CIDR block of the route entry.
NextHopId This property is required. string
ID of the next hop.
NextHopRegionId This property is required. string
ID of the region where the next hop is located.
NextHopType This property is required. string
Type of the next hop.
Type This property is required. string
Type of the route entry.
CidrBlock This property is required. string
The destination CIDR block of the route entry.
NextHopId This property is required. string
ID of the next hop.
NextHopRegionId This property is required. string
ID of the region where the next hop is located.
NextHopType This property is required. string
Type of the next hop.
Type This property is required. string
Type of the route entry.
cidrBlock This property is required. String
The destination CIDR block of the route entry.
nextHopId This property is required. String
ID of the next hop.
nextHopRegionId This property is required. String
ID of the region where the next hop is located.
nextHopType This property is required. String
Type of the next hop.
type This property is required. String
Type of the route entry.
cidrBlock This property is required. string
The destination CIDR block of the route entry.
nextHopId This property is required. string
ID of the next hop.
nextHopRegionId This property is required. string
ID of the region where the next hop is located.
nextHopType This property is required. string
Type of the next hop.
type This property is required. string
Type of the route entry.
cidr_block This property is required. str
The destination CIDR block of the route entry.
next_hop_id This property is required. str
ID of the next hop.
next_hop_region_id This property is required. str
ID of the region where the next hop is located.
next_hop_type This property is required. str
Type of the next hop.
type This property is required. str
Type of the route entry.
cidrBlock This property is required. String
The destination CIDR block of the route entry.
nextHopId This property is required. String
ID of the next hop.
nextHopRegionId This property is required. String
ID of the region where the next hop is located.
nextHopType This property is required. String
Type of the next hop.
type This property is required. String
Type of the route entry.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.