tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getAvailabilityRegions
Explore with Pulumi AI
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
- 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. - Result
Output stringFile - Used to save results.
- Id string
- 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. - Result
Output stringFile - Used to save results.
- id String
- 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. - result
Output StringFile - Used to save results.
- id string
- 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. - result
Output stringFile - Used to save results.
- id str
- 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_ strfile - Used to save results.
- id String
- 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. - result
Output StringFile - Used to save results.
getAvailabilityRegions Result
The following output properties are available:
- Id string
- Regions
List<Get
Availability Regions Region> - A list of regions will be exported and its every element contains the following attributes:
- bool
- Name string
- The name of the region, like
ap-guangzhou
. - Result
Output stringFile
- Id string
- Regions
[]Get
Availability Regions Region - A list of regions will be exported and its every element contains the following attributes:
- bool
- Name string
- The name of the region, like
ap-guangzhou
. - Result
Output stringFile
- id String
- regions
List<Get
Availability Regions Region> - A list of regions will be exported and its every element contains the following attributes:
- Boolean
- name String
- The name of the region, like
ap-guangzhou
. - result
Output StringFile
- id string
- regions
Get
Availability Regions Region[] - A list of regions will be exported and its every element contains the following attributes:
- boolean
- name string
- The name of the region, like
ap-guangzhou
. - result
Output stringFile
- id str
- regions
Sequence[Get
Availability Regions Region] - A list of regions will be exported and its every element contains the following attributes:
- bool
- name str
- The name of the region, like
ap-guangzhou
. - result_
output_ strfile
- id String
- regions List<Property Map>
- A list of regions will be exported and its every element contains the following attributes:
- Boolean
- name String
- The name of the region, like
ap-guangzhou
. - result
Output StringFile
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
andUNAVAILABLE
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
andUNAVAILABLE
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
andUNAVAILABLE
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
andUNAVAILABLE
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
andUNAVAILABLE
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
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.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack