1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getAvailabilityRegions
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getAvailabilityRegions

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to get the available regions. By default only AVAILABLE regions will be returned, but UNAVAILABLE regions can also be fetched when include_unavailable is specified.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const myFavouriteRegion = tencentcloud.getAvailabilityRegions({
        name: "ap-guangzhou",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    my_favourite_region = tencentcloud.get_availability_regions(name="ap-guangzhou")
    
    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.GetAvailabilityRegions(ctx, &tencentcloud.GetAvailabilityRegionsArgs{
    			Name: pulumi.StringRef("ap-guangzhou"),
    		}, 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 myFavouriteRegion = Tencentcloud.GetAvailabilityRegions.Invoke(new()
        {
            Name = "ap-guangzhou",
        });
    
    });
    
    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.GetAvailabilityRegionsArgs;
    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 myFavouriteRegion = TencentcloudFunctions.getAvailabilityRegions(GetAvailabilityRegionsArgs.builder()
                .name("ap-guangzhou")
                .build());
    
        }
    }
    
    variables:
      myFavouriteRegion:
        fn::invoke:
          function: tencentcloud:getAvailabilityRegions
          arguments:
            name: ap-guangzhou
    

    Using getAvailabilityRegions

    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 getAvailabilityRegions(args: GetAvailabilityRegionsArgs, opts?: InvokeOptions): Promise<GetAvailabilityRegionsResult>
    function getAvailabilityRegionsOutput(args: GetAvailabilityRegionsOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityRegionsResult>
    def get_availability_regions(id: Optional[str] = None,
                                 include_unavailable: Optional[bool] = None,
                                 name: Optional[str] = None,
                                 result_output_file: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAvailabilityRegionsResult
    def get_availability_regions_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[GetAvailabilityRegionsResult]
    func GetAvailabilityRegions(ctx *Context, args *GetAvailabilityRegionsArgs, opts ...InvokeOption) (*GetAvailabilityRegionsResult, error)
    func GetAvailabilityRegionsOutput(ctx *Context, args *GetAvailabilityRegionsOutputArgs, opts ...InvokeOption) GetAvailabilityRegionsResultOutput

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

    public static class GetAvailabilityRegions 
    {
        public static Task<GetAvailabilityRegionsResult> InvokeAsync(GetAvailabilityRegionsArgs args, InvokeOptions? opts = null)
        public static Output<GetAvailabilityRegionsResult> Invoke(GetAvailabilityRegionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAvailabilityRegionsResult> getAvailabilityRegions(GetAvailabilityRegionsArgs args, InvokeOptions options)
    public static Output<GetAvailabilityRegionsResult> getAvailabilityRegions(GetAvailabilityRegionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getAvailabilityRegions:getAvailabilityRegions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    IncludeUnavailable bool
    A bool variable indicates that the query will include UNAVAILABLE regions.
    Name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    ResultOutputFile string
    Used to save results.
    Id string
    IncludeUnavailable bool
    A bool variable indicates that the query will include UNAVAILABLE regions.
    Name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    ResultOutputFile string
    Used to save results.
    id String
    includeUnavailable Boolean
    A bool variable indicates that the query will include UNAVAILABLE regions.
    name String
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    resultOutputFile String
    Used to save results.
    id string
    includeUnavailable boolean
    A bool variable indicates that the query will include UNAVAILABLE regions.
    name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    resultOutputFile string
    Used to save results.
    id str
    include_unavailable bool
    A bool variable indicates that the query will include UNAVAILABLE regions.
    name str
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    result_output_file str
    Used to save results.
    id String
    includeUnavailable Boolean
    A bool variable indicates that the query will include UNAVAILABLE regions.
    name String
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    resultOutputFile String
    Used to save results.

    getAvailabilityRegions Result

    The following output properties are available:

    Id string
    Regions List<GetAvailabilityRegionsRegion>
    A list of regions will be exported and its every element contains the following attributes:
    IncludeUnavailable bool
    Name string
    The name of the region, like ap-guangzhou.
    ResultOutputFile string
    Id string
    Regions []GetAvailabilityRegionsRegion
    A list of regions will be exported and its every element contains the following attributes:
    IncludeUnavailable bool
    Name string
    The name of the region, like ap-guangzhou.
    ResultOutputFile string
    id String
    regions List<GetAvailabilityRegionsRegion>
    A list of regions will be exported and its every element contains the following attributes:
    includeUnavailable Boolean
    name String
    The name of the region, like ap-guangzhou.
    resultOutputFile String
    id string
    regions GetAvailabilityRegionsRegion[]
    A list of regions will be exported and its every element contains the following attributes:
    includeUnavailable boolean
    name string
    The name of the region, like ap-guangzhou.
    resultOutputFile string
    id str
    regions Sequence[GetAvailabilityRegionsRegion]
    A list of regions will be exported and its every element contains the following attributes:
    include_unavailable bool
    name str
    The name of the region, like ap-guangzhou.
    result_output_file str
    id String
    regions List<Property Map>
    A list of regions will be exported and its every element contains the following attributes:
    includeUnavailable Boolean
    name String
    The name of the region, like ap-guangzhou.
    resultOutputFile String

    Supporting Types

    GetAvailabilityRegionsRegion

    Description string
    The description of the region, like Guangzhou Region.
    Name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    State string
    The state of the region, indicate availability using AVAILABLE and UNAVAILABLE values.
    Description string
    The description of the region, like Guangzhou Region.
    Name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    State string
    The state of the region, indicate availability using AVAILABLE and UNAVAILABLE values.
    description String
    The description of the region, like Guangzhou Region.
    name String
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    state String
    The state of the region, indicate availability using AVAILABLE and UNAVAILABLE values.
    description string
    The description of the region, like Guangzhou Region.
    name string
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    state string
    The state of the region, indicate availability using AVAILABLE and UNAVAILABLE values.
    description str
    The description of the region, like Guangzhou Region.
    name str
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    state str
    The state of the region, indicate availability using AVAILABLE and UNAVAILABLE values.
    description String
    The description of the region, like Guangzhou Region.
    name String
    When specified, only the region with the exactly name match will be returned. default value means it consistent with the provider region.
    state String
    The state of the region, 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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack