1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. getRouteEntries
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.cen.getRouteEntries

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getRouteEntries:getRouteEntries
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of the CEN instance.
    RouteTableId string
    ID of the route table of the VPC or VBR.
    CidrBlock string
    The destination CIDR block of the route entry to query.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    InstanceId string
    ID of the CEN instance.
    RouteTableId string
    ID of the route table of the VPC or VBR.
    CidrBlock string
    The destination CIDR block of the route entry to query.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    instanceId String
    ID of the CEN instance.
    routeTableId String
    ID of the route table of the VPC or VBR.
    cidrBlock String
    The destination CIDR block of the route entry to query.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    instanceId string
    ID of the CEN instance.
    routeTableId string
    ID of the route table of the VPC or VBR.
    cidrBlock string
    The destination CIDR block of the route entry to query.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    instance_id str
    ID of the CEN instance.
    route_table_id str
    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).
    instanceId String
    ID of the CEN instance.
    routeTableId String
    ID of the route table of the VPC or VBR.
    cidrBlock String
    The destination CIDR block of the route entry to query.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getRouteEntries Result

    The following output properties are available:

    Entries List<Pulumi.AliCloud.Cen.Outputs.GetRouteEntriesEntry>
    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
    ID of the CEN child instance.
    RouteTableId string
    ID of the route table.
    CidrBlock string
    The destination CIDR block of the conflicted route entry.
    OutputFile string
    Entries []GetRouteEntriesEntry
    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
    ID of the CEN child instance.
    RouteTableId string
    ID of the route table.
    CidrBlock string
    The destination CIDR block of the conflicted route entry.
    OutputFile string
    entries List<GetRouteEntriesEntry>
    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
    ID of the CEN child instance.
    routeTableId String
    ID of the route table.
    cidrBlock String
    The destination CIDR block of the conflicted route entry.
    outputFile String
    entries GetRouteEntriesEntry[]
    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
    ID of the CEN child instance.
    routeTableId string
    ID of the route table.
    cidrBlock string
    The destination CIDR block of the conflicted route entry.
    outputFile string
    entries Sequence[GetRouteEntriesEntry]
    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_id str
    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.
    instanceId String
    ID of the CEN child instance.
    routeTableId String
    ID of the route table.
    cidrBlock String
    The destination CIDR block of the conflicted route entry.
    outputFile String

    Supporting Types

    GetRouteEntriesEntry

    CidrBlock string
    The destination CIDR block of the route entry to query.
    Conflicts List<Pulumi.AliCloud.Cen.Inputs.GetRouteEntriesEntryConflict>
    A list of conflicted Route Entries. Each element contains the following attributes:
    NextHopId string
    ID of the next hop.
    NextHopType string
    Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
    OperationalMode bool
    Whether to allow the route entry to be published or removed to or from CEN.
    PublishStatus string
    The publish status of the route entry in CEN, including "Published" and "NonPublished".
    RouteTableId string
    ID of the route table of the VPC or VBR.
    RouteType string
    Type of the route entry, including "System", "Custom" and "BGP".
    CidrBlock string
    The destination CIDR block of the route entry to query.
    Conflicts []GetRouteEntriesEntryConflict
    A list of conflicted Route Entries. Each element contains the following attributes:
    NextHopId string
    ID of the next hop.
    NextHopType string
    Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
    OperationalMode bool
    Whether to allow the route entry to be published or removed to or from CEN.
    PublishStatus string
    The publish status of the route entry in CEN, including "Published" and "NonPublished".
    RouteTableId string
    ID of the route table of the VPC or VBR.
    RouteType string
    Type of the route entry, including "System", "Custom" and "BGP".
    cidrBlock String
    The destination CIDR block of the route entry to query.
    conflicts List<GetRouteEntriesEntryConflict>
    A list of conflicted Route Entries. Each element contains the following attributes:
    nextHopId String
    ID of the next hop.
    nextHopType String
    Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
    operationalMode Boolean
    Whether to allow the route entry to be published or removed to or from CEN.
    publishStatus String
    The publish status of the route entry in CEN, including "Published" and "NonPublished".
    routeTableId String
    ID of the route table of the VPC or VBR.
    routeType String
    Type of the route entry, including "System", "Custom" and "BGP".
    cidrBlock string
    The destination CIDR block of the route entry to query.
    conflicts GetRouteEntriesEntryConflict[]
    A list of conflicted Route Entries. Each element contains the following attributes:
    nextHopId string
    ID of the next hop.
    nextHopType string
    Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
    operationalMode boolean
    Whether to allow the route entry to be published or removed to or from CEN.
    publishStatus string
    The publish status of the route entry in CEN, including "Published" and "NonPublished".
    routeTableId string
    ID of the route table of the VPC or VBR.
    routeType 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[GetRouteEntriesEntryConflict]
    A list of conflicted Route Entries. Each element contains the following attributes:
    next_hop_id str
    ID of the next hop.
    next_hop_type str
    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_id str
    ID of the route table of the VPC or VBR.
    route_type str
    Type of the route entry, including "System", "Custom" and "BGP".
    cidrBlock 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:
    nextHopId String
    ID of the next hop.
    nextHopType String
    Type of the next hop, including "Instance", "HaVip" and "RouterInterface".
    operationalMode Boolean
    Whether to allow the route entry to be published or removed to or from CEN.
    publishStatus String
    The publish status of the route entry in CEN, including "Published" and "NonPublished".
    routeTableId String
    ID of the route table of the VPC or VBR.
    routeType String
    Type of the route entry, including "System", "Custom" and "BGP".

    GetRouteEntriesEntryConflict

    CidrBlock string
    The destination CIDR block of the route entry to query.
    InstanceId string
    ID of the CEN instance.
    InstanceType string
    The type of the CEN child instance.
    RegionId string
    ID of the region where the conflicted route entry is located.
    Status string
    Reasons of exceptions.
    CidrBlock string
    The destination CIDR block of the route entry to query.
    InstanceId string
    ID of the CEN instance.
    InstanceType string
    The type of the CEN child instance.
    RegionId string
    ID of the region where the conflicted route entry is located.
    Status string
    Reasons of exceptions.
    cidrBlock String
    The destination CIDR block of the route entry to query.
    instanceId String
    ID of the CEN instance.
    instanceType String
    The type of the CEN child instance.
    regionId String
    ID of the region where the conflicted route entry is located.
    status String
    Reasons of exceptions.
    cidrBlock string
    The destination CIDR block of the route entry to query.
    instanceId string
    ID of the CEN instance.
    instanceType string
    The type of the CEN child instance.
    regionId 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.
    cidrBlock String
    The destination CIDR block of the route entry to query.
    instanceId String
    ID of the CEN instance.
    instanceType String
    The type of the CEN child instance.
    regionId 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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi