tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack
tencentcloud.getAvailabilityZones
Explore with Pulumi AI
tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack
Use this data source to get the available zones in current region. By default only AVAILABLE
zones will be returned, but UNAVAILABLE
zones can also be fetched when include_unavailable
is specified.
NOTE: It has been deprecated and replaced by tencentcloud_availability_zones_by_product.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const myFavouriteZone = tencentcloud.getAvailabilityZones({
name: "ap-guangzhou-3",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
my_favourite_zone = tencentcloud.get_availability_zones(name="ap-guangzhou-3")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetAvailabilityZones(ctx, &tencentcloud.GetAvailabilityZonesArgs{
Name: pulumi.StringRef("ap-guangzhou-3"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var myFavouriteZone = Tencentcloud.GetAvailabilityZones.Invoke(new()
{
Name = "ap-guangzhou-3",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesArgs;
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 myFavouriteZone = TencentcloudFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.name("ap-guangzhou-3")
.build());
}
}
variables:
myFavouriteZone:
fn::invoke:
function: tencentcloud:getAvailabilityZones
arguments:
name: ap-guangzhou-3
Using getAvailabilityZones
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 getAvailabilityZones(args: GetAvailabilityZonesArgs, opts?: InvokeOptions): Promise<GetAvailabilityZonesResult>
function getAvailabilityZonesOutput(args: GetAvailabilityZonesOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZonesResult>
def get_availability_zones(id: Optional[str] = None,
include_unavailable: Optional[bool] = None,
name: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAvailabilityZonesResult
def get_availability_zones_output(id: Optional[pulumi.Input[str]] = None,
include_unavailable: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZonesResult]
func GetAvailabilityZones(ctx *Context, args *GetAvailabilityZonesArgs, opts ...InvokeOption) (*GetAvailabilityZonesResult, error)
func GetAvailabilityZonesOutput(ctx *Context, args *GetAvailabilityZonesOutputArgs, opts ...InvokeOption) GetAvailabilityZonesResultOutput
> Note: This function is named GetAvailabilityZones
in the Go SDK.
public static class GetAvailabilityZones
{
public static Task<GetAvailabilityZonesResult> InvokeAsync(GetAvailabilityZonesArgs args, InvokeOptions? opts = null)
public static Output<GetAvailabilityZonesResult> Invoke(GetAvailabilityZonesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAvailabilityZonesResult> getAvailabilityZones(GetAvailabilityZonesArgs args, InvokeOptions options)
public static Output<GetAvailabilityZonesResult> getAvailabilityZones(GetAvailabilityZonesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getAvailabilityZones:getAvailabilityZones
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- An internal id for the zone, like
200003
, usually not so useful. - bool
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - Name string
- When specified, only the zone with the exactly name match will be returned.
- Result
Output stringFile - Used to save results.
- Id string
- An internal id for the zone, like
200003
, usually not so useful. - bool
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - Name string
- When specified, only the zone with the exactly name match will be returned.
- Result
Output stringFile - Used to save results.
- id String
- An internal id for the zone, like
200003
, usually not so useful. - Boolean
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - name String
- When specified, only the zone with the exactly name match will be returned.
- result
Output StringFile - Used to save results.
- id string
- An internal id for the zone, like
200003
, usually not so useful. - boolean
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - name string
- When specified, only the zone with the exactly name match will be returned.
- result
Output stringFile - Used to save results.
- id str
- An internal id for the zone, like
200003
, usually not so useful. - bool
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - name str
- When specified, only the zone with the exactly name match will be returned.
- result_
output_ strfile - Used to save results.
- id String
- An internal id for the zone, like
200003
, usually not so useful. - Boolean
- A bool variable indicates that the query will include
UNAVAILABLE
zones. - name String
- When specified, only the zone with the exactly name match will be returned.
- result
Output StringFile - Used to save results.
getAvailabilityZones Result
The following output properties are available:
- Id string
- An internal id for the zone, like
200003
, usually not so useful. - Zones
List<Get
Availability Zones Zone> - A list of zones will be exported and its every element contains the following attributes:
- bool
- Name string
- The name of the zone, like
ap-guangzhou-3
. - Result
Output stringFile
- Id string
- An internal id for the zone, like
200003
, usually not so useful. - Zones
[]Get
Availability Zones Zone - A list of zones will be exported and its every element contains the following attributes:
- bool
- Name string
- The name of the zone, like
ap-guangzhou-3
. - Result
Output stringFile
- id String
- An internal id for the zone, like
200003
, usually not so useful. - zones
List<Get
Availability Zones Zone> - A list of zones will be exported and its every element contains the following attributes:
- Boolean
- name String
- The name of the zone, like
ap-guangzhou-3
. - result
Output StringFile
- id string
- An internal id for the zone, like
200003
, usually not so useful. - zones
Get
Availability Zones Zone[] - A list of zones will be exported and its every element contains the following attributes:
- boolean
- name string
- The name of the zone, like
ap-guangzhou-3
. - result
Output stringFile
- id str
- An internal id for the zone, like
200003
, usually not so useful. - zones
Sequence[Get
Availability Zones Zone] - A list of zones will be exported and its every element contains the following attributes:
- bool
- name str
- The name of the zone, like
ap-guangzhou-3
. - result_
output_ strfile
- id String
- An internal id for the zone, like
200003
, usually not so useful. - zones List<Property Map>
- A list of zones will be exported and its every element contains the following attributes:
- Boolean
- name String
- The name of the zone, like
ap-guangzhou-3
. - result
Output StringFile
Supporting Types
GetAvailabilityZonesZone
- Description string
- The description of the zone, like
Guangzhou Zone 3
. - Id string
- An internal id for the zone, like
200003
, usually not so useful. - Name string
- When specified, only the zone with the exactly name match will be returned.
- State string
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
- Description string
- The description of the zone, like
Guangzhou Zone 3
. - Id string
- An internal id for the zone, like
200003
, usually not so useful. - Name string
- When specified, only the zone with the exactly name match will be returned.
- State string
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
- description String
- The description of the zone, like
Guangzhou Zone 3
. - id String
- An internal id for the zone, like
200003
, usually not so useful. - name String
- When specified, only the zone with the exactly name match will be returned.
- state String
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
- description string
- The description of the zone, like
Guangzhou Zone 3
. - id string
- An internal id for the zone, like
200003
, usually not so useful. - name string
- When specified, only the zone with the exactly name match will be returned.
- state string
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
- description str
- The description of the zone, like
Guangzhou Zone 3
. - id str
- An internal id for the zone, like
200003
, usually not so useful. - name str
- When specified, only the zone with the exactly name match will be returned.
- state str
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
- description String
- The description of the zone, like
Guangzhou Zone 3
. - id String
- An internal id for the zone, like
200003
, usually not so useful. - name String
- When specified, only the zone with the exactly name match will be returned.
- state String
- The state of the zone, indicate availability using
AVAILABLE
andUNAVAILABLE
values.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.191 published on Friday, May 9, 2025 by tencentcloudstack