tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack
tencentcloud.getAvailabilityZonesByProduct
tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack
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",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
all = tencentcloud.get_availability_zones_by_product(product="cvm")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  all:
    fn::invoke:
      function: tencentcloud:getAvailabilityZonesByProduct
      arguments:
        product: cvm
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>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]func GetAvailabilityZonesByProduct(ctx *Context, args *GetAvailabilityZonesByProductArgs, opts ...InvokeOption) (*GetAvailabilityZonesByProductResult, error)
func GetAvailabilityZonesByProductOutput(ctx *Context, args *GetAvailabilityZonesByProductOutputArgs, opts ...InvokeOption) GetAvailabilityZonesByProductResultOutput> 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)
}public static CompletableFuture<GetAvailabilityZonesByProductResult> getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs args, InvokeOptions options)
public static Output<GetAvailabilityZonesByProductResult> getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs args, InvokeOptions options)
fn::invoke:
  function: tencentcloud:index/getAvailabilityZonesByProduct:getAvailabilityZonesByProduct
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Product 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.
- bool
- A bool variable indicates that the query will include UNAVAILABLEzones.
- Name string
- When specified, only the zone with the exactly name match will be returned.
- ResultOutput stringFile 
- Used to save results.
- Product 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.
- bool
- A bool variable indicates that the query will include UNAVAILABLEzones.
- Name string
- When specified, only the zone with the exactly name match will be returned.
- ResultOutput stringFile 
- Used to save results.
- product 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.
- Boolean
- A bool variable indicates that the query will include UNAVAILABLEzones.
- name String
- When specified, only the zone with the exactly name match will be returned.
- resultOutput StringFile 
- Used to save results.
- product 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.
- boolean
- A bool variable indicates that the query will include UNAVAILABLEzones.
- name string
- When specified, only the zone with the exactly name match will be returned.
- resultOutput stringFile 
- Used to save results.
- product 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.
- bool
- A bool variable indicates that the query will include UNAVAILABLEzones.
- name str
- When specified, only the zone with the exactly name match will be returned.
- result_output_ strfile 
- Used to save results.
- product 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.
- Boolean
- A bool variable indicates that the query will include UNAVAILABLEzones.
- name String
- When specified, only the zone with the exactly name match will be returned.
- resultOutput StringFile 
- 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<GetAvailability Zones By Product 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.
- ResultOutput stringFile 
- Id string
- An internal id for the zone, like 200003, usually not so useful.
- Product string
- Zones
[]GetAvailability Zones By Product 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.
- ResultOutput stringFile 
- id String
- An internal id for the zone, like 200003, usually not so useful.
- product String
- zones
List<GetAvailability Zones By Product 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.
- resultOutput StringFile 
- id string
- An internal id for the zone, like 200003, usually not so useful.
- product string
- zones
GetAvailability Zones By Product 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.
- resultOutput stringFile 
- id str
- An internal id for the zone, like 200003, usually not so useful.
- product str
- zones
Sequence[GetAvailability Zones By Product 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.
- product String
- 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.
- resultOutput StringFile 
Supporting Types
GetAvailabilityZonesByProductZone     
- 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 AVAILABLEandUNAVAILABLEvalues.
- 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 AVAILABLEandUNAVAILABLEvalues.
- 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 AVAILABLEandUNAVAILABLEvalues.
- 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 AVAILABLEandUNAVAILABLEvalues.
- 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 AVAILABLEandUNAVAILABLEvalues.
- 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 AVAILABLEandUNAVAILABLEvalues.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the tencentcloudTerraform Provider.
tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack
