GetZones
This data source provides availability zones for KVStore that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var zonesIds = Output.Create(AliCloud.KVStore.GetZones.InvokeAsync());
// Create an KVStore instance with the first matched zone
var kvstore = new AliCloud.KVStore.Instance("kvstore", new AliCloud.KVStore.InstanceArgs
{
AvailabilityZone = zonesIds.Apply(zonesIds => zonesIds.Zones[0].Id),
});
// Other properties...
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
zones_ids = alicloud.kvstore.get_zones()
# Create an KVStore instance with the first matched zone
kvstore = alicloud.kvstore.Instance("kvstore", availability_zone=zones_ids.zones[0]["id"])
# Other properties...import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zonesIds = alicloud.kvstore.getZones({});
// Create an KVStore instance with the first matched zone
const kvstore = new alicloud.kvstore.Instance("kvstore", {availabilityZone: zonesIds.then(zonesIds => zonesIds.zones[0].id)});
// Other properties...Using GetZones
function getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>function get_zones(instance_charge_type=None, multi=None, output_file=None, opts=None)func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)public static class GetZones {
public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Instance
Charge stringType Filter the results by a specific instance charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- Multi bool
Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch KVStore instances.- Output
File string
- Instance
Charge stringType Filter the results by a specific instance charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- Multi bool
Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch KVStore instances.- Output
File string
- instance
Charge stringType Filter the results by a specific instance charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- multi boolean
Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch KVStore instances.- output
File string
- instance_
charge_ strtype Filter the results by a specific instance charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.- multi bool
Indicate whether the zones can be used in a multi AZ configuration. Default to
false. Multi AZ is usually used to launch KVStore instances.- output_
file str
GetZones Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of zone IDs.
- Zones
List<Pulumi.
Ali Cloud. KVStore. Outputs. Get Zones Zone> A list of availability zones. Each element contains the following attributes:
- Instance
Charge stringType - Multi bool
- Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of zone IDs.
- Zones
[]Get
Zones Zone A list of availability zones. Each element contains the following attributes:
- Instance
Charge stringType - Multi bool
- Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of zone IDs.
- zones
Get
Zones Zone[] A list of availability zones. Each element contains the following attributes:
- instance
Charge stringType - multi boolean
- output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of zone IDs.
- zones
List[Get
Zones Zone] A list of availability zones. Each element contains the following attributes:
- instance_
charge_ strtype - multi bool
- output_
file str
Supporting Types
GetZonesZone
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Id string
ID of the zone.
- Multi
Zone List<string>Ids A list of zone ids in which the multi zone.
- Id string
ID of the zone.
- Multi
Zone []stringIds A list of zone ids in which the multi zone.
- id string
ID of the zone.
- multi
Zone string[]Ids A list of zone ids in which the multi zone.
- id str
ID of the zone.
- multi
Zone List[str]Ids A list of zone ids in which the multi zone.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.