Show / Hide Table of Contents

Class GetRouteTables

Inheritance
System.Object
GetRouteTables
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Vpc
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetRouteTables

Methods

View Source

InvokeAsync(GetRouteTablesArgs, InvokeOptions)

This data source provides a list of Route Tables owned by an Alibaba Cloud account.

NOTE: Available in 1.36.0+.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var name = config.Get("name") ?? "route-tables-datasource-example-name";
    var fooNetwork = new AliCloud.Vpc.Network("fooNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/12",
    });
    var fooRouteTable = new AliCloud.Vpc.RouteTable("fooRouteTable", new AliCloud.Vpc.RouteTableArgs
    {
        Description = name,
        VpcId = fooNetwork.Id,
    });
    var fooRouteTables = fooRouteTable.Id.Apply(id => AliCloud.Vpc.GetRouteTables.InvokeAsync(new AliCloud.Vpc.GetRouteTablesArgs
    {
        Ids = 
        {
            id,
        },
    }));
    this.RouteTableIds = fooRouteTables.Apply(fooRouteTables => fooRouteTables.Ids);
}

[Output("routeTableIds")]
public Output<string> RouteTableIds { get; set; }
}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetRouteTablesResult> InvokeAsync(GetRouteTablesArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetRouteTablesArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetRouteTablesResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.