Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.cen.getRouteEntries
Explore with Pulumi AI
This data source provides CEN Route Entries available to the user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const entry = alicloud.cen.getRouteEntries({
    instanceId: "cen-id1",
    routeTableId: "vtb-id1",
});
export const firstRouteEntriesRouteEntryCidrBlock = entry.then(entry => entry.entries?.[0]?.cidrBlock);
import pulumi
import pulumi_alicloud as alicloud
entry = alicloud.cen.get_route_entries(instance_id="cen-id1",
    route_table_id="vtb-id1")
pulumi.export("firstRouteEntriesRouteEntryCidrBlock", entry.entries[0].cidr_block)
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.GetRouteEntries(ctx, &cen.GetRouteEntriesArgs{
			InstanceId:   "cen-id1",
			RouteTableId: "vtb-id1",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstRouteEntriesRouteEntryCidrBlock", entry.Entries[0].CidrBlock)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var entry = AliCloud.Cen.GetRouteEntries.Invoke(new()
    {
        InstanceId = "cen-id1",
        RouteTableId = "vtb-id1",
    });
    return new Dictionary<string, object?>
    {
        ["firstRouteEntriesRouteEntryCidrBlock"] = entry.Apply(getRouteEntriesResult => getRouteEntriesResult.Entries[0]?.CidrBlock),
    };
});
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.GetRouteEntriesArgs;
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.getRouteEntries(GetRouteEntriesArgs.builder()
            .instanceId("cen-id1")
            .routeTableId("vtb-id1")
            .build());
        ctx.export("firstRouteEntriesRouteEntryCidrBlock", entry.applyValue(getRouteEntriesResult -> getRouteEntriesResult.entries()[0].cidrBlock()));
    }
}
variables:
  entry:
    fn::invoke:
      function: alicloud:cen:getRouteEntries
      arguments:
        instanceId: cen-id1
        routeTableId: vtb-id1
outputs:
  firstRouteEntriesRouteEntryCidrBlock: ${entry.entries[0].cidrBlock}
Using getRouteEntries
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 getRouteEntries(args: GetRouteEntriesArgs, opts?: InvokeOptions): Promise<GetRouteEntriesResult>
function getRouteEntriesOutput(args: GetRouteEntriesOutputArgs, opts?: InvokeOptions): Output<GetRouteEntriesResult>def get_route_entries(cidr_block: Optional[str] = None,
                      instance_id: Optional[str] = None,
                      output_file: Optional[str] = None,
                      route_table_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetRouteEntriesResult
def get_route_entries_output(cidr_block: Optional[pulumi.Input[str]] = None,
                      instance_id: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      route_table_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetRouteEntriesResult]func GetRouteEntries(ctx *Context, args *GetRouteEntriesArgs, opts ...InvokeOption) (*GetRouteEntriesResult, error)
func GetRouteEntriesOutput(ctx *Context, args *GetRouteEntriesOutputArgs, opts ...InvokeOption) GetRouteEntriesResultOutput> Note: This function is named GetRouteEntries in the Go SDK.
public static class GetRouteEntries 
{
    public static Task<GetRouteEntriesResult> InvokeAsync(GetRouteEntriesArgs args, InvokeOptions? opts = null)
    public static Output<GetRouteEntriesResult> Invoke(GetRouteEntriesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRouteEntriesResult> getRouteEntries(GetRouteEntriesArgs args, InvokeOptions options)
public static Output<GetRouteEntriesResult> getRouteEntries(GetRouteEntriesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:cen/getRouteEntries:getRouteEntries
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Instance
Id string - ID of the CEN instance.
 - Route
Table stringId  - ID of the route table of the VPC or VBR.
 - Cidr
Block string - The destination CIDR block of the route entry to query.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- Instance
Id string - ID of the CEN instance.
 - Route
Table stringId  - ID of the route table of the VPC or VBR.
 - Cidr
Block string - The destination CIDR block of the route entry to query.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- instance
Id String - ID of the CEN instance.
 - route
Table StringId  - ID of the route table of the VPC or VBR.
 - cidr
Block String - The destination CIDR block of the route entry to query.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
- instance
Id string - ID of the CEN instance.
 - route
Table stringId  - ID of the route table of the VPC or VBR.
 - cidr
Block string - The destination CIDR block of the route entry to query.
 - output
File string - File name where to save data source results (after running 
pulumi preview). 
- instance_
id str - ID of the CEN instance.
 - route_
table_ strid  - ID of the route table of the VPC or VBR.
 - cidr_
block str - The destination CIDR block of the route entry to query.
 - output_
file str - File name where to save data source results (after running 
pulumi preview). 
- instance
Id String - ID of the CEN instance.
 - route
Table StringId  - ID of the route table of the VPC or VBR.
 - cidr
Block String - The destination CIDR block of the route entry to query.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
getRouteEntries Result
The following output properties are available:
- Entries
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Route Entries Entry>  - A list of CEN Route Entries. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Instance
Id string - ID of the CEN child instance.
 - Route
Table stringId  - ID of the route table.
 - Cidr
Block string - The destination CIDR block of the conflicted route entry.
 - Output
File string 
- Entries
[]Get
Route Entries Entry  - A list of CEN Route Entries. Each element contains the following attributes:
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Instance
Id string - ID of the CEN child instance.
 - Route
Table stringId  - ID of the route table.
 - Cidr
Block string - The destination CIDR block of the conflicted route entry.
 - Output
File string 
- entries
List<Get
Route Entries Entry>  - A list of CEN Route Entries. Each element contains the following attributes:
 - id String
 - The provider-assigned unique ID for this managed resource.
 - instance
Id String - ID of the CEN child instance.
 - route
Table StringId  - ID of the route table.
 - cidr
Block String - The destination CIDR block of the conflicted route entry.
 - output
File String 
- entries
Get
Route Entries Entry[]  - A list of CEN Route Entries. Each element contains the following attributes:
 - id string
 - The provider-assigned unique ID for this managed resource.
 - instance
Id string - ID of the CEN child instance.
 - route
Table stringId  - ID of the route table.
 - cidr
Block string - The destination CIDR block of the conflicted route entry.
 - output
File string 
- entries
Sequence[Get
Route Entries Entry]  - 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 - ID of the CEN child instance.
 - route_
table_ strid  - ID of the route table.
 - cidr_
block str - The destination CIDR block of the conflicted route entry.
 - 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.
 - instance
Id String - ID of the CEN child instance.
 - route
Table StringId  - ID of the route table.
 - cidr
Block String - The destination CIDR block of the conflicted route entry.
 - output
File String 
Supporting Types
GetRouteEntriesEntry   
- Cidr
Block string - The destination CIDR block of the route entry to query.
 - Conflicts
List<Pulumi.
Ali Cloud. Cen. Inputs. Get Route Entries Entry Conflict>  - A list of conflicted Route Entries. Each element contains the following attributes:
 - Next
Hop stringId  - ID of the next hop.
 - Next
Hop stringType  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - Operational
Mode bool - Whether to allow the route entry to be published or removed to or from CEN.
 - Publish
Status string - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - Route
Table stringId  - ID of the route table of the VPC or VBR.
 - Route
Type string - Type of the route entry, including "System", "Custom" and "BGP".
 
- Cidr
Block string - The destination CIDR block of the route entry to query.
 - Conflicts
[]Get
Route Entries Entry Conflict  - A list of conflicted Route Entries. Each element contains the following attributes:
 - Next
Hop stringId  - ID of the next hop.
 - Next
Hop stringType  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - Operational
Mode bool - Whether to allow the route entry to be published or removed to or from CEN.
 - Publish
Status string - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - Route
Table stringId  - ID of the route table of the VPC or VBR.
 - Route
Type string - Type of the route entry, including "System", "Custom" and "BGP".
 
- cidr
Block String - The destination CIDR block of the route entry to query.
 - conflicts
List<Get
Route Entries Entry Conflict>  - A list of conflicted Route Entries. Each element contains the following attributes:
 - next
Hop StringId  - ID of the next hop.
 - next
Hop StringType  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - operational
Mode Boolean - Whether to allow the route entry to be published or removed to or from CEN.
 - publish
Status String - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - route
Table StringId  - ID of the route table of the VPC or VBR.
 - route
Type String - Type of the route entry, including "System", "Custom" and "BGP".
 
- cidr
Block string - The destination CIDR block of the route entry to query.
 - conflicts
Get
Route Entries Entry Conflict[]  - A list of conflicted Route Entries. Each element contains the following attributes:
 - next
Hop stringId  - ID of the next hop.
 - next
Hop stringType  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - operational
Mode boolean - Whether to allow the route entry to be published or removed to or from CEN.
 - publish
Status string - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - route
Table stringId  - ID of the route table of the VPC or VBR.
 - route
Type string - Type of the route entry, including "System", "Custom" and "BGP".
 
- cidr_
block str - The destination CIDR block of the route entry to query.
 - conflicts
Sequence[Get
Route Entries Entry Conflict]  - A list of conflicted Route Entries. Each element contains the following attributes:
 - next_
hop_ strid  - ID of the next hop.
 - next_
hop_ strtype  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - operational_
mode bool - Whether to allow the route entry to be published or removed to or from CEN.
 - publish_
status str - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - route_
table_ strid  - ID of the route table of the VPC or VBR.
 - route_
type str - Type of the route entry, including "System", "Custom" and "BGP".
 
- cidr
Block String - The destination CIDR block of the route entry to query.
 - conflicts List<Property Map>
 - A list of conflicted Route Entries. Each element contains the following attributes:
 - next
Hop StringId  - ID of the next hop.
 - next
Hop StringType  - Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
 - operational
Mode Boolean - Whether to allow the route entry to be published or removed to or from CEN.
 - publish
Status String - The publish status of the route entry in CEN, including "Published" and "NonPublished".
 - route
Table StringId  - ID of the route table of the VPC or VBR.
 - route
Type String - Type of the route entry, including "System", "Custom" and "BGP".
 
GetRouteEntriesEntryConflict    
- Cidr
Block string - The destination CIDR block of the route entry to query.
 - Instance
Id string - ID of the CEN instance.
 - Instance
Type string - The type of the CEN child instance.
 - Region
Id string - ID of the region where the conflicted route entry is located.
 - Status string
 - Reasons of exceptions.
 
- Cidr
Block string - The destination CIDR block of the route entry to query.
 - Instance
Id string - ID of the CEN instance.
 - Instance
Type string - The type of the CEN child instance.
 - Region
Id string - ID of the region where the conflicted route entry is located.
 - Status string
 - Reasons of exceptions.
 
- cidr
Block String - The destination CIDR block of the route entry to query.
 - instance
Id String - ID of the CEN instance.
 - instance
Type String - The type of the CEN child instance.
 - region
Id String - ID of the region where the conflicted route entry is located.
 - status String
 - Reasons of exceptions.
 
- cidr
Block string - The destination CIDR block of the route entry to query.
 - instance
Id string - ID of the CEN instance.
 - instance
Type string - The type of the CEN child instance.
 - region
Id string - ID of the region where the conflicted route entry is located.
 - status string
 - Reasons of exceptions.
 
- cidr_
block str - The destination CIDR block of the route entry to query.
 - instance_
id str - ID of the CEN instance.
 - instance_
type str - The type of the CEN child instance.
 - region_
id str - ID of the region where the conflicted route entry is located.
 - status str
 - Reasons of exceptions.
 
- cidr
Block String - The destination CIDR block of the route entry to query.
 - instance
Id String - ID of the CEN instance.
 - instance
Type String - The type of the CEN child instance.
 - region
Id String - ID of the region where the conflicted route entry is located.
 - status String
 - Reasons of exceptions.
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.