Show / Hide Table of Contents

Class GetZones

Inheritance
System.Object
GetZones
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
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetZones

Methods

View Source

InvokeAsync(GetZonesArgs, InvokeOptions)

This data source provides availability zones that can be accessed by an Alibaba Cloud account within the region configured in the provider.

NOTE: If one zone is sold out, it will not be exported.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var zonesDs = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
    {
        AvailableDiskCategory = "cloud_ssd",
        AvailableInstanceType = "ecs.n4.large",
    }));
    // Create an ECS instance with the first matched zone
    var instance = new AliCloud.Ecs.Instance("instance", new AliCloud.Ecs.InstanceArgs
    {
        AvailabilityZone = zonesDs.Apply(zonesDs => zonesDs.Zones[0].Id),
    });
}

}

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

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