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

alicloud.cen.getRegionRouteEntries

Explore with Pulumi AI

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

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      entry:
        fn::invoke:
          Function: alicloud:cen:getRegionRouteEntries
          Arguments:
            instanceId: cen-id1
            regionId: cn-beijing
    outputs:
      firstRegionRouteEntriesRouteEntryCidrBlock: ${entry.entries[0].cidrBlock}
    

    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>
    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]
    func GetRegionRouteEntries(ctx *Context, args *GetRegionRouteEntriesArgs, opts ...InvokeOption) (*GetRegionRouteEntriesResult, error)
    func GetRegionRouteEntriesOutput(ctx *Context, args *GetRegionRouteEntriesOutputArgs, opts ...InvokeOption) GetRegionRouteEntriesResultOutput

    > 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)
    }
    public static CompletableFuture<GetRegionRouteEntriesResult> getRegionRouteEntries(GetRegionRouteEntriesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getRegionRouteEntries:getRegionRouteEntries
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of the CEN instance.
    RegionId string
    ID of the region.
    OutputFile string
    InstanceId string
    ID of the CEN instance.
    RegionId string
    ID of the region.
    OutputFile string
    instanceId String
    ID of the CEN instance.
    regionId String
    ID of the region.
    outputFile String
    instanceId string
    ID of the CEN instance.
    regionId string
    ID of the region.
    outputFile string
    instance_id str
    ID of the CEN instance.
    region_id str
    ID of the region.
    output_file str
    instanceId String
    ID of the CEN instance.
    regionId 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 string
    The destination CIDR block of the route entry.
    NextHopId string
    ID of the next hop.
    NextHopRegionId string
    ID of the region where the next hop is located.
    NextHopType string
    Type of the next hop.
    Type string
    Type of the route entry.
    CidrBlock string
    The destination CIDR block of the route entry.
    NextHopId string
    ID of the next hop.
    NextHopRegionId string
    ID of the region where the next hop is located.
    NextHopType string
    Type of the next hop.
    Type string
    Type of the route entry.
    cidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    ID of the next hop.
    nextHopRegionId String
    ID of the region where the next hop is located.
    nextHopType String
    Type of the next hop.
    type String
    Type of the route entry.
    cidrBlock string
    The destination CIDR block of the route entry.
    nextHopId string
    ID of the next hop.
    nextHopRegionId string
    ID of the region where the next hop is located.
    nextHopType string
    Type of the next hop.
    type string
    Type of the route entry.
    cidr_block str
    The destination CIDR block of the route entry.
    next_hop_id str
    ID of the next hop.
    next_hop_region_id str
    ID of the region where the next hop is located.
    next_hop_type str
    Type of the next hop.
    type str
    Type of the route entry.
    cidrBlock String
    The destination CIDR block of the route entry.
    nextHopId String
    ID of the next hop.
    nextHopRegionId String
    ID of the region where the next hop is located.
    nextHopType String
    Type of the next hop.
    type 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.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi