com.pulumi.alicloud.polardb.Endpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.polardb;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.polardb.EndpointArgs;
import com.pulumi.alicloud.polardb.inputs.EndpointState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a PolarDB endpoint resource to manage custom endpoint of PolarDB cluster.
*
* > **NOTE:** Available since v1.80.0.
* **NOTE:** After v1.80.0 and before v1.121.0, you can only use this resource to manage the custom endpoint. Since v1.121.0, you also can import the primary endpoint and the cluster endpoint, to modify their ssl status and so on.
* **NOTE:** The primary endpoint and the default cluster endpoint can not be created or deleted manually.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.alicloud.polardb.PolardbFunctions;
* import com.pulumi.alicloud.polardb.inputs.GetNodeClassesArgs;
* 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.polardb.Cluster;
* import com.pulumi.alicloud.polardb.ClusterArgs;
* import com.pulumi.alicloud.polardb.Endpoint;
* import com.pulumi.alicloud.polardb.EndpointArgs;
* 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 default = PolardbFunctions.getNodeClasses(GetNodeClassesArgs.builder()
* .dbType("MySQL")
* .dbVersion("8.0")
* .payType("PostPaid")
* .category("Normal")
* .build());
*
* var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
* .vpcName("terraform-example")
* .cidrBlock("172.16.0.0/16")
* .build());
*
* var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
* .vpcId(defaultNetwork.id())
* .cidrBlock("172.16.0.0/24")
* .zoneId(default_.classes()[0].zoneId())
* .vswitchName("terraform-example")
* .build());
*
* var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
* .dbType("MySQL")
* .dbVersion("8.0")
* .dbNodeClass(default_.classes()[0].supportedEngines()[0].availableResources()[0].dbNodeClass())
* .payType("PostPaid")
* .vswitchId(defaultSwitch.id())
* .description("terraform-example")
* .build());
*
* var defaultEndpoint = new Endpoint("defaultEndpoint", EndpointArgs.builder()
* .dbClusterId(defaultCluster.id())
* .endpointType("Custom")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* PolarDB endpoint can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:polardb/endpoint:Endpoint example pc-abc123456:pe-abc123456
* ```
*
*/
@ResourceType(type="alicloud:polardb/endpoint:Endpoint")
public class Endpoint extends com.pulumi.resources.CustomResource {
/**
* Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
*
*/
@Export(name="autoAddNewNodes", refs={String.class}, tree="[0]")
private Output autoAddNewNodes;
/**
* @return Whether the new node automatically joins the default cluster address. Valid values are `Enable`, `Disable`. When creating a new custom endpoint, default to `Disable`.
*
*/
public Output autoAddNewNodes() {
return this.autoAddNewNodes;
}
/**
* Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
*
*/
@Export(name="connectionPrefix", refs={String.class}, tree="[0]")
private Output connectionPrefix;
/**
* @return Prefix of the specified endpoint. The prefix must be 6 to 30 characters in length, and can contain lowercase letters, digits, and hyphens (-), must start with a letter and end with a digit or letter.
*
*/
public Output connectionPrefix() {
return this.connectionPrefix;
}
/**
* The Id of cluster that can run database.
*
*/
@Export(name="dbClusterId", refs={String.class}, tree="[0]")
private Output dbClusterId;
/**
* @return The Id of cluster that can run database.
*
*/
public Output dbClusterId() {
return this.dbClusterId;
}
/**
* The name of the endpoint.
*
*/
@Export(name="dbEndpointDescription", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> dbEndpointDescription;
/**
* @return The name of the endpoint.
*
*/
public Output> dbEndpointDescription() {
return Codegen.optional(this.dbEndpointDescription);
}
/**
* (Available since v1.161.0) The ID of the cluster endpoint.
*
*/
@Export(name="dbEndpointId", refs={String.class}, tree="[0]")
private Output dbEndpointId;
/**
* @return (Available since v1.161.0) The ID of the cluster endpoint.
*
*/
public Output dbEndpointId() {
return this.dbEndpointId;
}
/**
* The advanced settings of the endpoint of Apsara PolarDB clusters are in JSON format. Including the settings of consistency level, transaction splitting, connection pool, and offload reads from primary node. For more details, see the [description of EndpointConfig in the Request parameters table for details](https://www.alibabacloud.com/help/doc-detail/116593.htm).
*
*/
@Export(name="endpointConfig", refs={Map.class,String.class}, tree="[0,1,1]")
private Output