alicloud.clickhouseenterprisedbcluster.PublicEndpoint
Explore with Pulumi AI
Provides a Click House Enterprise Db Cluster Public Endpoint resource.
ClickHouse enterprise instance public network endpoint.
For information about Click House Enterprise Db Cluster Public Endpoint and how to use it, see What is Enterprise Db Cluster Public Endpoint.
NOTE: Available since v1.247.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const regionId = config.get("regionId") || "cn-beijing";
const vswIpRangeI = config.get("vswIpRangeI") || "172.16.1.0/24";
const vpcIpRange = config.get("vpcIpRange") || "172.16.0.0/12";
const zoneIdI = config.get("zoneIdI") || "cn-beijing-i";
const defaultktKLuM = new alicloud.vpc.Network("defaultktKLuM", {cidrBlock: vpcIpRange});
const defaultTQWN3k = new alicloud.vpc.Switch("defaultTQWN3k", {
vpcId: defaultktKLuM.id,
zoneId: zoneIdI,
cidrBlock: vswIpRangeI,
});
const defaultaqnt22 = new alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster("defaultaqnt22", {
zoneId: zoneIdI,
vpcId: defaultktKLuM.id,
scaleMin: "8",
scaleMax: "16",
vswitchId: defaultTQWN3k.id,
});
const _default = new alicloud.clickhouseenterprisedbcluster.PublicEndpoint("default", {
dbInstanceId: defaultaqnt22.id,
netType: "Public",
connectionStringPrefix: defaultaqnt22.id,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
region_id = config.get("regionId")
if region_id is None:
region_id = "cn-beijing"
vsw_ip_range_i = config.get("vswIpRangeI")
if vsw_ip_range_i is None:
vsw_ip_range_i = "172.16.1.0/24"
vpc_ip_range = config.get("vpcIpRange")
if vpc_ip_range is None:
vpc_ip_range = "172.16.0.0/12"
zone_id_i = config.get("zoneIdI")
if zone_id_i is None:
zone_id_i = "cn-beijing-i"
defaultkt_k_lu_m = alicloud.vpc.Network("defaultktKLuM", cidr_block=vpc_ip_range)
default_tqwn3k = alicloud.vpc.Switch("defaultTQWN3k",
vpc_id=defaultkt_k_lu_m.id,
zone_id=zone_id_i,
cidr_block=vsw_ip_range_i)
defaultaqnt22 = alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster("defaultaqnt22",
zone_id=zone_id_i,
vpc_id=defaultkt_k_lu_m.id,
scale_min="8",
scale_max="16",
vswitch_id=default_tqwn3k.id)
default = alicloud.clickhouseenterprisedbcluster.PublicEndpoint("default",
db_instance_id=defaultaqnt22.id,
net_type="Public",
connection_string_prefix=defaultaqnt22.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/clickhouseenterprisedbcluster"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
regionId := "cn-beijing"
if param := cfg.Get("regionId"); param != "" {
regionId = param
}
vswIpRangeI := "172.16.1.0/24"
if param := cfg.Get("vswIpRangeI"); param != "" {
vswIpRangeI = param
}
vpcIpRange := "172.16.0.0/12"
if param := cfg.Get("vpcIpRange"); param != "" {
vpcIpRange = param
}
zoneIdI := "cn-beijing-i"
if param := cfg.Get("zoneIdI"); param != "" {
zoneIdI = param
}
defaultktKLuM, err := vpc.NewNetwork(ctx, "defaultktKLuM", &vpc.NetworkArgs{
CidrBlock: pulumi.String(vpcIpRange),
})
if err != nil {
return err
}
defaultTQWN3k, err := vpc.NewSwitch(ctx, "defaultTQWN3k", &vpc.SwitchArgs{
VpcId: defaultktKLuM.ID(),
ZoneId: pulumi.String(zoneIdI),
CidrBlock: pulumi.String(vswIpRangeI),
})
if err != nil {
return err
}
defaultaqnt22, err := clickhouseenterprisedbcluster.NewClickHouseEnterpriseDbCluster(ctx, "defaultaqnt22", &clickhouseenterprisedbcluster.ClickHouseEnterpriseDbClusterArgs{
ZoneId: pulumi.String(zoneIdI),
VpcId: defaultktKLuM.ID(),
ScaleMin: pulumi.String("8"),
ScaleMax: pulumi.String("16"),
VswitchId: defaultTQWN3k.ID(),
})
if err != nil {
return err
}
_, err = clickhouseenterprisedbcluster.NewPublicEndpoint(ctx, "default", &clickhouseenterprisedbcluster.PublicEndpointArgs{
DbInstanceId: defaultaqnt22.ID(),
NetType: pulumi.String("Public"),
ConnectionStringPrefix: defaultaqnt22.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var regionId = config.Get("regionId") ?? "cn-beijing";
var vswIpRangeI = config.Get("vswIpRangeI") ?? "172.16.1.0/24";
var vpcIpRange = config.Get("vpcIpRange") ?? "172.16.0.0/12";
var zoneIdI = config.Get("zoneIdI") ?? "cn-beijing-i";
var defaultktKLuM = new AliCloud.Vpc.Network("defaultktKLuM", new()
{
CidrBlock = vpcIpRange,
});
var defaultTQWN3k = new AliCloud.Vpc.Switch("defaultTQWN3k", new()
{
VpcId = defaultktKLuM.Id,
ZoneId = zoneIdI,
CidrBlock = vswIpRangeI,
});
var defaultaqnt22 = new AliCloud.ClickHouseEnterpriseDbCluster.ClickHouseEnterpriseDbCluster("defaultaqnt22", new()
{
ZoneId = zoneIdI,
VpcId = defaultktKLuM.Id,
ScaleMin = "8",
ScaleMax = "16",
VswitchId = defaultTQWN3k.Id,
});
var @default = new AliCloud.ClickHouseEnterpriseDbCluster.PublicEndpoint("default", new()
{
DbInstanceId = defaultaqnt22.Id,
NetType = "Public",
ConnectionStringPrefix = defaultaqnt22.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster;
import com.pulumi.alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbClusterArgs;
import com.pulumi.alicloud.clickhouseenterprisedbcluster.PublicEndpoint;
import com.pulumi.alicloud.clickhouseenterprisedbcluster.PublicEndpointArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var regionId = config.get("regionId").orElse("cn-beijing");
final var vswIpRangeI = config.get("vswIpRangeI").orElse("172.16.1.0/24");
final var vpcIpRange = config.get("vpcIpRange").orElse("172.16.0.0/12");
final var zoneIdI = config.get("zoneIdI").orElse("cn-beijing-i");
var defaultktKLuM = new Network("defaultktKLuM", NetworkArgs.builder()
.cidrBlock(vpcIpRange)
.build());
var defaultTQWN3k = new Switch("defaultTQWN3k", SwitchArgs.builder()
.vpcId(defaultktKLuM.id())
.zoneId(zoneIdI)
.cidrBlock(vswIpRangeI)
.build());
var defaultaqnt22 = new ClickHouseEnterpriseDbCluster("defaultaqnt22", ClickHouseEnterpriseDbClusterArgs.builder()
.zoneId(zoneIdI)
.vpcId(defaultktKLuM.id())
.scaleMin("8")
.scaleMax("16")
.vswitchId(defaultTQWN3k.id())
.build());
var default_ = new PublicEndpoint("default", PublicEndpointArgs.builder()
.dbInstanceId(defaultaqnt22.id())
.netType("Public")
.connectionStringPrefix(defaultaqnt22.id())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
regionId:
type: string
default: cn-beijing
vswIpRangeI:
type: string
default: 172.16.1.0/24
vpcIpRange:
type: string
default: 172.16.0.0/12
zoneIdI:
type: string
default: cn-beijing-i
resources:
defaultktKLuM:
type: alicloud:vpc:Network
properties:
cidrBlock: ${vpcIpRange}
defaultTQWN3k:
type: alicloud:vpc:Switch
properties:
vpcId: ${defaultktKLuM.id}
zoneId: ${zoneIdI}
cidrBlock: ${vswIpRangeI}
defaultaqnt22:
type: alicloud:clickhouseenterprisedbcluster:ClickHouseEnterpriseDbCluster
properties:
zoneId: ${zoneIdI}
vpcId: ${defaultktKLuM.id}
scaleMin: '8'
scaleMax: '16'
vswitchId: ${defaultTQWN3k.id}
default:
type: alicloud:clickhouseenterprisedbcluster:PublicEndpoint
properties:
dbInstanceId: ${defaultaqnt22.id}
netType: Public
connectionStringPrefix: ${defaultaqnt22.id}
Create PublicEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublicEndpoint(name: string, args: PublicEndpointArgs, opts?: CustomResourceOptions);
@overload
def PublicEndpoint(resource_name: str,
args: PublicEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PublicEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
connection_string_prefix: Optional[str] = None,
db_instance_id: Optional[str] = None,
net_type: Optional[str] = None)
func NewPublicEndpoint(ctx *Context, name string, args PublicEndpointArgs, opts ...ResourceOption) (*PublicEndpoint, error)
public PublicEndpoint(string name, PublicEndpointArgs args, CustomResourceOptions? opts = null)
public PublicEndpoint(String name, PublicEndpointArgs args)
public PublicEndpoint(String name, PublicEndpointArgs args, CustomResourceOptions options)
type: alicloud:clickhouseenterprisedbcluster:PublicEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PublicEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PublicEndpointArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PublicEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublicEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var publicEndpointResource = new AliCloud.ClickHouseEnterpriseDbCluster.PublicEndpoint("publicEndpointResource", new()
{
ConnectionStringPrefix = "string",
DbInstanceId = "string",
NetType = "string",
});
example, err := clickhouseenterprisedbcluster.NewPublicEndpoint(ctx, "publicEndpointResource", &clickhouseenterprisedbcluster.PublicEndpointArgs{
ConnectionStringPrefix: pulumi.String("string"),
DbInstanceId: pulumi.String("string"),
NetType: pulumi.String("string"),
})
var publicEndpointResource = new PublicEndpoint("publicEndpointResource", PublicEndpointArgs.builder()
.connectionStringPrefix("string")
.dbInstanceId("string")
.netType("string")
.build());
public_endpoint_resource = alicloud.clickhouseenterprisedbcluster.PublicEndpoint("publicEndpointResource",
connection_string_prefix="string",
db_instance_id="string",
net_type="string")
const publicEndpointResource = new alicloud.clickhouseenterprisedbcluster.PublicEndpoint("publicEndpointResource", {
connectionStringPrefix: "string",
dbInstanceId: "string",
netType: "string",
});
type: alicloud:clickhouseenterprisedbcluster:PublicEndpoint
properties:
connectionStringPrefix: string
dbInstanceId: string
netType: string
PublicEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PublicEndpoint resource accepts the following input properties:
- Connection
String stringPrefix - The public network connection string prefix of the instance.
- Db
Instance stringId - The cluster ID.
- Net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- Connection
String stringPrefix - The public network connection string prefix of the instance.
- Db
Instance stringId - The cluster ID.
- Net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String StringPrefix - The public network connection string prefix of the instance.
- db
Instance StringId - The cluster ID.
- net
Type String - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String stringPrefix - The public network connection string prefix of the instance.
- db
Instance stringId - The cluster ID.
- net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- connection_
string_ strprefix - The public network connection string prefix of the instance.
- db_
instance_ strid - The cluster ID.
- net_
type str - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String StringPrefix - The public network connection string prefix of the instance.
- db
Instance StringId - The cluster ID.
- net
Type String - Network type of the connection address. Valid values:
- Public: Public network.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicEndpoint resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PublicEndpoint Resource
Get an existing PublicEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PublicEndpointState, opts?: CustomResourceOptions): PublicEndpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
connection_string_prefix: Optional[str] = None,
db_instance_id: Optional[str] = None,
net_type: Optional[str] = None) -> PublicEndpoint
func GetPublicEndpoint(ctx *Context, name string, id IDInput, state *PublicEndpointState, opts ...ResourceOption) (*PublicEndpoint, error)
public static PublicEndpoint Get(string name, Input<string> id, PublicEndpointState? state, CustomResourceOptions? opts = null)
public static PublicEndpoint get(String name, Output<String> id, PublicEndpointState state, CustomResourceOptions options)
resources: _: type: alicloud:clickhouseenterprisedbcluster:PublicEndpoint get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Connection
String stringPrefix - The public network connection string prefix of the instance.
- Db
Instance stringId - The cluster ID.
- Net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- Connection
String stringPrefix - The public network connection string prefix of the instance.
- Db
Instance stringId - The cluster ID.
- Net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String StringPrefix - The public network connection string prefix of the instance.
- db
Instance StringId - The cluster ID.
- net
Type String - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String stringPrefix - The public network connection string prefix of the instance.
- db
Instance stringId - The cluster ID.
- net
Type string - Network type of the connection address. Valid values:
- Public: Public network.
- connection_
string_ strprefix - The public network connection string prefix of the instance.
- db_
instance_ strid - The cluster ID.
- net_
type str - Network type of the connection address. Valid values:
- Public: Public network.
- connection
String StringPrefix - The public network connection string prefix of the instance.
- db
Instance StringId - The cluster ID.
- net
Type String - Network type of the connection address. Valid values:
- Public: Public network.
Import
Click House Enterprise Db Cluster Public Endpoint can be imported using the id, e.g.
$ pulumi import alicloud:clickhouseenterprisedbcluster/publicEndpoint:PublicEndpoint example <db_instance_id>:<net_type>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.