GetZones
This data source provides availability zones for RDS 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.Rds.GetZones.InvokeAsync());
// Create an RDS instance with the first matched zone
var db = new AliCloud.Rds.Instance("db", new AliCloud.Rds.InstanceArgs
{
ZoneId = zonesIds.Apply(zonesIds => zonesIds.Zones[0]),
});
// Other properties...
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
zones_ids = alicloud.rds.get_zones()
# Create an RDS instance with the first matched zone
db = alicloud.rds.Instance("db", zone_id=zones_ids.zones[0])
# Other properties...import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zonesIds = alicloud.rds.getZones({});
// Create an RDS instance with the first matched zone
const db = new alicloud.rds.Instance("db", {zoneId: zonesIds.then(zonesIds => zonesIds.zones[0])});
// 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 RDS 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 RDS 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 RDS 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 RDS 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. Rds. 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.