alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.clickhouse.getRegions

Explore with Pulumi AI

This data source provides the Click House Accounts of the current Alibaba Cloud user.

NOTE: Available in v1.138.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var default1 = AliCloud.ClickHouse.GetRegions.Invoke(new()
    {
        Current = true,
    });

    var default2 = AliCloud.ClickHouse.GetRegions.Invoke(new()
    {
        RegionId = "cn-hangzhou",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/clickhouse"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := clickhouse.GetRegions(ctx, &clickhouse.GetRegionsArgs{
			Current: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		_, err = clickhouse.GetRegions(ctx, &clickhouse.GetRegionsArgs{
			RegionId: pulumi.StringRef("cn-hangzhou"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.clickhouse.ClickhouseFunctions;
import com.pulumi.alicloud.clickhouse.inputs.GetRegionsArgs;
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 default1 = ClickhouseFunctions.getRegions(GetRegionsArgs.builder()
            .current(true)
            .build());

        final var default2 = ClickhouseFunctions.getRegions(GetRegionsArgs.builder()
            .regionId("cn-hangzhou")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default1 = alicloud.clickhouse.get_regions(current=True)
default2 = alicloud.clickhouse.get_regions(region_id="cn-hangzhou")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default1 = alicloud.clickhouse.getRegions({
    current: true,
});
const default2 = alicloud.clickhouse.getRegions({
    regionId: "cn-hangzhou",
});
variables:
  default1:
    fn::invoke:
      Function: alicloud:clickhouse:getRegions
      Arguments:
        current: true
  default2:
    fn::invoke:
      Function: alicloud:clickhouse:getRegions
      Arguments:
        regionId: cn-hangzhou

Using getRegions

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 getRegions(args: GetRegionsArgs, opts?: InvokeOptions): Promise<GetRegionsResult>
function getRegionsOutput(args: GetRegionsOutputArgs, opts?: InvokeOptions): Output<GetRegionsResult>
def get_regions(current: Optional[bool] = None,
                output_file: Optional[str] = None,
                region_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetRegionsResult
def get_regions_output(current: Optional[pulumi.Input[bool]] = None,
                output_file: Optional[pulumi.Input[str]] = None,
                region_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetRegionsResult]
func GetRegions(ctx *Context, args *GetRegionsArgs, opts ...InvokeOption) (*GetRegionsResult, error)
func GetRegionsOutput(ctx *Context, args *GetRegionsOutputArgs, opts ...InvokeOption) GetRegionsResultOutput

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

public static class GetRegions 
{
    public static Task<GetRegionsResult> InvokeAsync(GetRegionsArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionsResult> Invoke(GetRegionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:clickhouse/getRegions:getRegions
  arguments:
    # arguments dictionary

The following arguments are supported:

Current bool

Set to true to match only the region configured in the provider. Default value: true.

OutputFile string

File name where to save data source results (after running pulumi preview).

RegionId string

The Region ID.

Current bool

Set to true to match only the region configured in the provider. Default value: true.

OutputFile string

File name where to save data source results (after running pulumi preview).

RegionId string

The Region ID.

current Boolean

Set to true to match only the region configured in the provider. Default value: true.

outputFile String

File name where to save data source results (after running pulumi preview).

regionId String

The Region ID.

current boolean

Set to true to match only the region configured in the provider. Default value: true.

outputFile string

File name where to save data source results (after running pulumi preview).

regionId string

The Region ID.

current bool

Set to true to match only the region configured in the provider. Default value: true.

output_file str

File name where to save data source results (after running pulumi preview).

region_id str

The Region ID.

current Boolean

Set to true to match only the region configured in the provider. Default value: true.

outputFile String

File name where to save data source results (after running pulumi preview).

regionId String

The Region ID.

getRegions Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Regions List<Pulumi.AliCloud.ClickHouse.Outputs.GetRegionsRegion>
Current bool
OutputFile string
RegionId string
Id string

The provider-assigned unique ID for this managed resource.

Regions []GetRegionsRegion
Current bool
OutputFile string
RegionId string
id String

The provider-assigned unique ID for this managed resource.

regions List<GetRegionsRegion>
current Boolean
outputFile String
regionId String
id string

The provider-assigned unique ID for this managed resource.

regions GetRegionsRegion[]
current boolean
outputFile string
regionId string
id str

The provider-assigned unique ID for this managed resource.

regions Sequence[GetRegionsRegion]
current bool
output_file str
region_id str
id String

The provider-assigned unique ID for this managed resource.

regions List<Property Map>
current Boolean
outputFile String
regionId String

Supporting Types

GetRegionsRegion

RegionId string

The Region ID.

ZoneIds List<Pulumi.AliCloud.ClickHouse.Inputs.GetRegionsRegionZoneId>

A list of available zone ids in the region_id.

RegionId string

The Region ID.

ZoneIds []GetRegionsRegionZoneId

A list of available zone ids in the region_id.

regionId String

The Region ID.

zoneIds List<GetRegionsRegionZoneId>

A list of available zone ids in the region_id.

regionId string

The Region ID.

zoneIds GetRegionsRegionZoneId[]

A list of available zone ids in the region_id.

region_id str

The Region ID.

zone_ids Sequence[GetRegionsRegionZoneId]

A list of available zone ids in the region_id.

regionId String

The Region ID.

zoneIds List<Property Map>

A list of available zone ids in the region_id.

GetRegionsRegionZoneId

VpcEnabled bool

Whether to support vpc network.

ZoneId string

The zone ID.

VpcEnabled bool

Whether to support vpc network.

ZoneId string

The zone ID.

vpcEnabled Boolean

Whether to support vpc network.

zoneId String

The zone ID.

vpcEnabled boolean

Whether to support vpc network.

zoneId string

The zone ID.

vpc_enabled bool

Whether to support vpc network.

zone_id str

The zone ID.

vpcEnabled Boolean

Whether to support vpc network.

zoneId String

The zone ID.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.