1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getAvailabilityZonesByProduct
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.getAvailabilityZonesByProduct

Explore with Pulumi AI

Use this data source to get the available zones in current region. Must set product param to fetch the product infomations(e.g. => cvm, vpc). By default only AVAILABLE zones will be returned, but UNAVAILABLE zones can also be fetched when include_unavailable is specified.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const all = tencentcloud.getAvailabilityZonesByProduct({
    product: "cvm",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

all = tencentcloud.get_availability_zones_by_product(product="cvm")
Copy
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.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
			Product: "cvm",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var all = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
    {
        Product = "cvm",
    });

});
Copy
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.GetAvailabilityZonesByProductArgs;
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 all = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
            .product("cvm")
            .build());

    }
}
Copy
variables:
  all:
    fn::invoke:
      function: tencentcloud:getAvailabilityZonesByProduct
      arguments:
        product: cvm
Copy

Using getAvailabilityZonesByProduct

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 getAvailabilityZonesByProduct(args: GetAvailabilityZonesByProductArgs, opts?: InvokeOptions): Promise<GetAvailabilityZonesByProductResult>
function getAvailabilityZonesByProductOutput(args: GetAvailabilityZonesByProductOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityZonesByProductResult>
Copy
def get_availability_zones_by_product(id: Optional[str] = None,
                                      include_unavailable: Optional[bool] = None,
                                      name: Optional[str] = None,
                                      product: Optional[str] = None,
                                      result_output_file: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetAvailabilityZonesByProductResult
def get_availability_zones_by_product_output(id: Optional[pulumi.Input[str]] = None,
                                      include_unavailable: Optional[pulumi.Input[bool]] = None,
                                      name: Optional[pulumi.Input[str]] = None,
                                      product: Optional[pulumi.Input[str]] = None,
                                      result_output_file: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityZonesByProductResult]
Copy
func GetAvailabilityZonesByProduct(ctx *Context, args *GetAvailabilityZonesByProductArgs, opts ...InvokeOption) (*GetAvailabilityZonesByProductResult, error)
func GetAvailabilityZonesByProductOutput(ctx *Context, args *GetAvailabilityZonesByProductOutputArgs, opts ...InvokeOption) GetAvailabilityZonesByProductResultOutput
Copy

> Note: This function is named GetAvailabilityZonesByProduct in the Go SDK.

public static class GetAvailabilityZonesByProduct 
{
    public static Task<GetAvailabilityZonesByProductResult> InvokeAsync(GetAvailabilityZonesByProductArgs args, InvokeOptions? opts = null)
    public static Output<GetAvailabilityZonesByProductResult> Invoke(GetAvailabilityZonesByProductInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAvailabilityZonesByProductResult> getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs args, InvokeOptions options)
public static Output<GetAvailabilityZonesByProductResult> getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getAvailabilityZonesByProduct:getAvailabilityZonesByProduct
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Product This property is required. string
A string variable indicates that the query will use product information.
Id string
An internal id for the zone, like 200003, usually not so useful.
IncludeUnavailable 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.
ResultOutputFile string
Used to save results.
Product This property is required. string
A string variable indicates that the query will use product information.
Id string
An internal id for the zone, like 200003, usually not so useful.
IncludeUnavailable 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.
ResultOutputFile string
Used to save results.
product This property is required. String
A string variable indicates that the query will use product information.
id String
An internal id for the zone, like 200003, usually not so useful.
includeUnavailable 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.
resultOutputFile String
Used to save results.
product This property is required. string
A string variable indicates that the query will use product information.
id string
An internal id for the zone, like 200003, usually not so useful.
includeUnavailable 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.
resultOutputFile string
Used to save results.
product This property is required. str
A string variable indicates that the query will use product information.
id str
An internal id for the zone, like 200003, usually not so useful.
include_unavailable 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_file str
Used to save results.
product This property is required. String
A string variable indicates that the query will use product information.
id String
An internal id for the zone, like 200003, usually not so useful.
includeUnavailable 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.
resultOutputFile String
Used to save results.

getAvailabilityZonesByProduct Result

The following output properties are available:

Id string
An internal id for the zone, like 200003, usually not so useful.
Product string
Zones List<GetAvailabilityZonesByProductZone>
A list of zones will be exported and its every element contains the following attributes:
IncludeUnavailable bool
Name string
The name of the zone, like ap-guangzhou-3.
ResultOutputFile string
Id string
An internal id for the zone, like 200003, usually not so useful.
Product string
Zones []GetAvailabilityZonesByProductZone
A list of zones will be exported and its every element contains the following attributes:
IncludeUnavailable bool
Name string
The name of the zone, like ap-guangzhou-3.
ResultOutputFile string
id String
An internal id for the zone, like 200003, usually not so useful.
product String
zones List<GetAvailabilityZonesByProductZone>
A list of zones will be exported and its every element contains the following attributes:
includeUnavailable Boolean
name String
The name of the zone, like ap-guangzhou-3.
resultOutputFile String
id string
An internal id for the zone, like 200003, usually not so useful.
product string
zones GetAvailabilityZonesByProductZone[]
A list of zones will be exported and its every element contains the following attributes:
includeUnavailable boolean
name string
The name of the zone, like ap-guangzhou-3.
resultOutputFile string
id str
An internal id for the zone, like 200003, usually not so useful.
product str
zones Sequence[GetAvailabilityZonesByProductZone]
A list of zones will be exported and its every element contains the following attributes:
include_unavailable bool
name str
The name of the zone, like ap-guangzhou-3.
result_output_file str
id String
An internal id for the zone, like 200003, usually not so useful.
product String
zones List<Property Map>
A list of zones will be exported and its every element contains the following attributes:
includeUnavailable Boolean
name String
The name of the zone, like ap-guangzhou-3.
resultOutputFile String

Supporting Types

GetAvailabilityZonesByProductZone

Description This property is required. string
The description of the zone, like Guangzhou Zone 3.
Id This property is required. string
An internal id for the zone, like 200003, usually not so useful.
Name This property is required. string
When specified, only the zone with the exactly name match will be returned.
State This property is required. string
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.
Description This property is required. string
The description of the zone, like Guangzhou Zone 3.
Id This property is required. string
An internal id for the zone, like 200003, usually not so useful.
Name This property is required. string
When specified, only the zone with the exactly name match will be returned.
State This property is required. string
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.
description This property is required. String
The description of the zone, like Guangzhou Zone 3.
id This property is required. String
An internal id for the zone, like 200003, usually not so useful.
name This property is required. String
When specified, only the zone with the exactly name match will be returned.
state This property is required. String
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.
description This property is required. string
The description of the zone, like Guangzhou Zone 3.
id This property is required. string
An internal id for the zone, like 200003, usually not so useful.
name This property is required. string
When specified, only the zone with the exactly name match will be returned.
state This property is required. string
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.
description This property is required. str
The description of the zone, like Guangzhou Zone 3.
id This property is required. str
An internal id for the zone, like 200003, usually not so useful.
name This property is required. str
When specified, only the zone with the exactly name match will be returned.
state This property is required. str
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.
description This property is required. String
The description of the zone, like Guangzhou Zone 3.
id This property is required. String
An internal id for the zone, like 200003, usually not so useful.
name This property is required. String
When specified, only the zone with the exactly name match will be returned.
state This property is required. String
The state of the zone, indicate availability using AVAILABLE and UNAVAILABLE values.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.