1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. polardb
  5. Endpoint
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi

alicloud.polardb.Endpoint

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.polardb.getNodeClasses({
        dbType: "MySQL",
        dbVersion: "8.0",
        payType: "PostPaid",
        category: "Normal",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: "terraform-example",
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.classes?.[0]?.zoneId),
        vswitchName: "terraform-example",
    });
    const defaultCluster = new alicloud.polardb.Cluster("default", {
        dbType: "MySQL",
        dbVersion: "8.0",
        dbNodeClass: _default.then(_default => _default.classes?.[0]?.supportedEngines?.[0]?.availableResources?.[0]?.dbNodeClass),
        payType: "PostPaid",
        vswitchId: defaultSwitch.id,
        description: "terraform-example",
    });
    const defaultEndpoint = new alicloud.polardb.Endpoint("default", {
        dbClusterId: defaultCluster.id,
        endpointType: "Custom",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.polardb.get_node_classes(db_type="MySQL",
        db_version="8.0",
        pay_type="PostPaid",
        category="Normal")
    default_network = alicloud.vpc.Network("default",
        vpc_name="terraform-example",
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.classes[0].zone_id,
        vswitch_name="terraform-example")
    default_cluster = alicloud.polardb.Cluster("default",
        db_type="MySQL",
        db_version="8.0",
        db_node_class=default.classes[0].supported_engines[0].available_resources[0].db_node_class,
        pay_type="PostPaid",
        vswitch_id=default_switch.id,
        description="terraform-example")
    default_endpoint = alicloud.polardb.Endpoint("default",
        db_cluster_id=default_cluster.id,
        endpoint_type="Custom")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := polardb.GetNodeClasses(ctx, &polardb.GetNodeClassesArgs{
    			DbType:    pulumi.StringRef("MySQL"),
    			DbVersion: pulumi.StringRef("8.0"),
    			PayType:   "PostPaid",
    			Category:  pulumi.StringRef("Normal"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Classes[0].ZoneId),
    			VswitchName: pulumi.String("terraform-example"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultCluster, err := polardb.NewCluster(ctx, "default", &polardb.ClusterArgs{
    			DbType:      pulumi.String("MySQL"),
    			DbVersion:   pulumi.String("8.0"),
    			DbNodeClass: pulumi.String(_default.Classes[0].SupportedEngines[0].AvailableResources[0].DbNodeClass),
    			PayType:     pulumi.String("PostPaid"),
    			VswitchId:   defaultSwitch.ID(),
    			Description: pulumi.String("terraform-example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = polardb.NewEndpoint(ctx, "default", &polardb.EndpointArgs{
    			DbClusterId:  defaultCluster.ID(),
    			EndpointType: pulumi.String("Custom"),
    		})
    		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 @default = AliCloud.PolarDB.GetNodeClasses.Invoke(new()
        {
            DbType = "MySQL",
            DbVersion = "8.0",
            PayType = "PostPaid",
            Category = "Normal",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getNodeClassesResult => getNodeClassesResult.Classes[0]?.ZoneId)),
            VswitchName = "terraform-example",
        });
    
        var defaultCluster = new AliCloud.PolarDB.Cluster("default", new()
        {
            DbType = "MySQL",
            DbVersion = "8.0",
            DbNodeClass = @default.Apply(@default => @default.Apply(getNodeClassesResult => getNodeClassesResult.Classes[0]?.SupportedEngines[0]?.AvailableResources[0]?.DbNodeClass)),
            PayType = "PostPaid",
            VswitchId = defaultSwitch.Id,
            Description = "terraform-example",
        });
    
        var defaultEndpoint = new AliCloud.PolarDB.Endpoint("default", new()
        {
            DbClusterId = defaultCluster.Id,
            EndpointType = "Custom",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: terraform-example
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.classes[0].zoneId}
          vswitchName: terraform-example
      defaultCluster:
        type: alicloud:polardb:Cluster
        name: default
        properties:
          dbType: MySQL
          dbVersion: '8.0'
          dbNodeClass: ${default.classes[0].supportedEngines[0].availableResources[0].dbNodeClass}
          payType: PostPaid
          vswitchId: ${defaultSwitch.id}
          description: terraform-example
      defaultEndpoint:
        type: alicloud:polardb:Endpoint
        name: default
        properties:
          dbClusterId: ${defaultCluster.id}
          endpointType: Custom
    variables:
      default:
        fn::invoke:
          Function: alicloud:polardb:getNodeClasses
          Arguments:
            dbType: MySQL
            dbVersion: '8.0'
            payType: PostPaid
            category: Normal
    

    Create Endpoint Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Endpoint(name: string, args: EndpointArgs, opts?: CustomResourceOptions);
    @overload
    def Endpoint(resource_name: str,
                 args: EndpointArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Endpoint(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 db_cluster_id: Optional[str] = None,
                 auto_add_new_nodes: Optional[str] = None,
                 connection_prefix: Optional[str] = None,
                 db_endpoint_description: Optional[str] = None,
                 endpoint_config: Optional[Mapping[str, str]] = None,
                 endpoint_type: Optional[str] = None,
                 net_type: Optional[str] = None,
                 nodes: Optional[Sequence[str]] = None,
                 port: Optional[str] = None,
                 read_write_mode: Optional[str] = None,
                 ssl_auto_rotate: Optional[str] = None,
                 ssl_enabled: Optional[str] = None)
    func NewEndpoint(ctx *Context, name string, args EndpointArgs, opts ...ResourceOption) (*Endpoint, error)
    public Endpoint(string name, EndpointArgs args, CustomResourceOptions? opts = null)
    public Endpoint(String name, EndpointArgs args)
    public Endpoint(String name, EndpointArgs args, CustomResourceOptions options)
    
    type: alicloud:polardb:Endpoint
    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 EndpointArgs
    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 EndpointArgs
    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 EndpointArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EndpointArgs
    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 endpointResource = new AliCloud.PolarDB.Endpoint("endpointResource", new()
    {
        DbClusterId = "string",
        AutoAddNewNodes = "string",
        ConnectionPrefix = "string",
        DbEndpointDescription = "string",
        EndpointConfig = 
        {
            { "string", "string" },
        },
        EndpointType = "string",
        NetType = "string",
        Nodes = new[]
        {
            "string",
        },
        Port = "string",
        ReadWriteMode = "string",
        SslAutoRotate = "string",
        SslEnabled = "string",
    });
    
    example, err := polardb.NewEndpoint(ctx, "endpointResource", &polardb.EndpointArgs{
    	DbClusterId:           pulumi.String("string"),
    	AutoAddNewNodes:       pulumi.String("string"),
    	ConnectionPrefix:      pulumi.String("string"),
    	DbEndpointDescription: pulumi.String("string"),
    	EndpointConfig: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	EndpointType: pulumi.String("string"),
    	NetType:      pulumi.String("string"),
    	Nodes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Port:          pulumi.String("string"),
    	ReadWriteMode: pulumi.String("string"),
    	SslAutoRotate: pulumi.String("string"),
    	SslEnabled:    pulumi.String("string"),
    })
    
    var endpointResource = new Endpoint("endpointResource", EndpointArgs.builder()
        .dbClusterId("string")
        .autoAddNewNodes("string")
        .connectionPrefix("string")
        .dbEndpointDescription("string")
        .endpointConfig(Map.of("string", "string"))
        .endpointType("string")
        .netType("string")
        .nodes("string")
        .port("string")
        .readWriteMode("string")
        .sslAutoRotate("string")
        .sslEnabled("string")
        .build());
    
    endpoint_resource = alicloud.polardb.Endpoint("endpointResource",
        db_cluster_id="string",
        auto_add_new_nodes="string",
        connection_prefix="string",
        db_endpoint_description="string",
        endpoint_config={
            "string": "string",
        },
        endpoint_type="string",
        net_type="string",
        nodes=["string"],
        port="string",
        read_write_mode="string",
        ssl_auto_rotate="string",
        ssl_enabled="string")
    
    const endpointResource = new alicloud.polardb.Endpoint("endpointResource", {
        dbClusterId: "string",
        autoAddNewNodes: "string",
        connectionPrefix: "string",
        dbEndpointDescription: "string",
        endpointConfig: {
            string: "string",
        },
        endpointType: "string",
        netType: "string",
        nodes: ["string"],
        port: "string",
        readWriteMode: "string",
        sslAutoRotate: "string",
        sslEnabled: "string",
    });
    
    type: alicloud:polardb:Endpoint
    properties:
        autoAddNewNodes: string
        connectionPrefix: string
        dbClusterId: string
        dbEndpointDescription: string
        endpointConfig:
            string: string
        endpointType: string
        netType: string
        nodes:
            - string
        port: string
        readWriteMode: string
        sslAutoRotate: string
        sslEnabled: string
    

    Endpoint 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 Endpoint resource accepts the following input properties:

    DbClusterId string
    The Id of cluster that can run database.
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    ConnectionPrefix string
    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.
    DbEndpointDescription string
    The name of the endpoint.
    EndpointConfig Dictionary<string, string>
    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.
    EndpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes List<string>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    SslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    SslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    DbClusterId string
    The Id of cluster that can run database.
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    ConnectionPrefix string
    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.
    DbEndpointDescription string
    The name of the endpoint.
    EndpointConfig map[string]string
    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.
    EndpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes []string
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    SslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    SslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    dbClusterId String
    The Id of cluster that can run database.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix String
    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.
    dbEndpointDescription String
    The name of the endpoint.
    endpointConfig Map<String,String>
    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.
    endpointType String
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate String
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslEnabled String
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    dbClusterId string
    The Id of cluster that can run database.
    autoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix string
    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.
    dbEndpointDescription string
    The name of the endpoint.
    endpointConfig {[key: string]: string}
    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.
    endpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType string
    The network type of the endpoint address.
    nodes string[]
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    db_cluster_id str
    The Id of cluster that can run database.
    auto_add_new_nodes str
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connection_prefix str
    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.
    db_endpoint_description str
    The name of the endpoint.
    endpoint_config Mapping[str, str]
    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.
    endpoint_type str
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    net_type str
    The network type of the endpoint address.
    nodes Sequence[str]
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port str
    Port of the specified endpoint. Valid values: 3000 to 5999.
    read_write_mode str
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    ssl_auto_rotate str
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    ssl_enabled str
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    dbClusterId String
    The Id of cluster that can run database.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix String
    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.
    dbEndpointDescription String
    The name of the endpoint.
    endpointConfig Map<String>
    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.
    endpointType String
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate String
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslEnabled String
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Endpoint resource produces the following output properties:

    DbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    Id string
    The provider-assigned unique ID for this managed resource.
    SslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    SslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    SslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    DbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    Id string
    The provider-assigned unique ID for this managed resource.
    SslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    SslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    SslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    dbEndpointId String
    (Available since v1.161.0) The ID of the cluster endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    sslCertificateUrl String
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString String
    (Available since v1.121.0) The SSL connection string.
    sslExpireTime String
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    dbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    id string
    The provider-assigned unique ID for this managed resource.
    sslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    sslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    db_endpoint_id str
    (Available since v1.161.0) The ID of the cluster endpoint.
    id str
    The provider-assigned unique ID for this managed resource.
    ssl_certificate_url str
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    ssl_connection_string str
    (Available since v1.121.0) The SSL connection string.
    ssl_expire_time str
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    dbEndpointId String
    (Available since v1.161.0) The ID of the cluster endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    sslCertificateUrl String
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString String
    (Available since v1.121.0) The SSL connection string.
    sslExpireTime String
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

    Look up Existing Endpoint Resource

    Get an existing Endpoint 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?: EndpointState, opts?: CustomResourceOptions): Endpoint
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_add_new_nodes: Optional[str] = None,
            connection_prefix: Optional[str] = None,
            db_cluster_id: Optional[str] = None,
            db_endpoint_description: Optional[str] = None,
            db_endpoint_id: Optional[str] = None,
            endpoint_config: Optional[Mapping[str, str]] = None,
            endpoint_type: Optional[str] = None,
            net_type: Optional[str] = None,
            nodes: Optional[Sequence[str]] = None,
            port: Optional[str] = None,
            read_write_mode: Optional[str] = None,
            ssl_auto_rotate: Optional[str] = None,
            ssl_certificate_url: Optional[str] = None,
            ssl_connection_string: Optional[str] = None,
            ssl_enabled: Optional[str] = None,
            ssl_expire_time: Optional[str] = None) -> Endpoint
    func GetEndpoint(ctx *Context, name string, id IDInput, state *EndpointState, opts ...ResourceOption) (*Endpoint, error)
    public static Endpoint Get(string name, Input<string> id, EndpointState? state, CustomResourceOptions? opts = null)
    public static Endpoint get(String name, Output<String> id, EndpointState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    ConnectionPrefix string
    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.
    DbClusterId string
    The Id of cluster that can run database.
    DbEndpointDescription string
    The name of the endpoint.
    DbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    EndpointConfig Dictionary<string, string>
    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.
    EndpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes List<string>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    SslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    SslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    SslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    SslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    SslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    AutoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    ConnectionPrefix string
    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.
    DbClusterId string
    The Id of cluster that can run database.
    DbEndpointDescription string
    The name of the endpoint.
    DbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    EndpointConfig map[string]string
    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.
    EndpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    NetType string
    The network type of the endpoint address.
    Nodes []string
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    Port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    ReadWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    SslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    SslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    SslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    SslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    SslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix String
    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.
    dbClusterId String
    The Id of cluster that can run database.
    dbEndpointDescription String
    The name of the endpoint.
    dbEndpointId String
    (Available since v1.161.0) The ID of the cluster endpoint.
    endpointConfig Map<String,String>
    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.
    endpointType String
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate String
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslCertificateUrl String
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString String
    (Available since v1.121.0) The SSL connection string.
    sslEnabled String
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    sslExpireTime String
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    autoAddNewNodes string
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix string
    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.
    dbClusterId string
    The Id of cluster that can run database.
    dbEndpointDescription string
    The name of the endpoint.
    dbEndpointId string
    (Available since v1.161.0) The ID of the cluster endpoint.
    endpointConfig {[key: string]: string}
    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.
    endpointType string
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType string
    The network type of the endpoint address.
    nodes string[]
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port string
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode string
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate string
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslCertificateUrl string
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString string
    (Available since v1.121.0) The SSL connection string.
    sslEnabled string
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    sslExpireTime string
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    auto_add_new_nodes str
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connection_prefix str
    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.
    db_cluster_id str
    The Id of cluster that can run database.
    db_endpoint_description str
    The name of the endpoint.
    db_endpoint_id str
    (Available since v1.161.0) The ID of the cluster endpoint.
    endpoint_config Mapping[str, str]
    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.
    endpoint_type str
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    net_type str
    The network type of the endpoint address.
    nodes Sequence[str]
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port str
    Port of the specified endpoint. Valid values: 3000 to 5999.
    read_write_mode str
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    ssl_auto_rotate str
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    ssl_certificate_url str
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    ssl_connection_string str
    (Available since v1.121.0) The SSL connection string.
    ssl_enabled str
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    ssl_expire_time str
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    autoAddNewNodes String
    Whether the new node automatically joins the default cluster address. Valid values are Enable, Disable. When creating a new custom endpoint, default to Disable.
    connectionPrefix String
    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.
    dbClusterId String
    The Id of cluster that can run database.
    dbEndpointDescription String
    The name of the endpoint.
    dbEndpointId String
    (Available since v1.161.0) The ID of the cluster endpoint.
    endpointConfig Map<String>
    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.
    endpointType String
    Type of the endpoint. Before v1.121.0, it only can be Custom. since v1.121.0, Custom, Cluster, Primary are valid, default to Custom. However when creating a new endpoint, it also only can be Custom.
    netType String
    The network type of the endpoint address.
    nodes List<String>
    Node id list for endpoint configuration. At least 2 nodes if specified, or if the cluster has more than 3 nodes, read-only endpoint is allowed to mount only one node. Default is all nodes.
    port String
    Port of the specified endpoint. Valid values: 3000 to 5999.
    readWriteMode String
    Read or write mode. Valid values are ReadWrite, ReadOnly. When creating a new custom endpoint, default to ReadOnly.
    sslAutoRotate String
    Specifies whether automatic rotation of SSL certificates is enabled. Valid values: Enable,Disable.
    sslCertificateUrl String
    Specifies SSL certificate download link.
    NOTE: For a PolarDB for MySQL cluster, this parameter is required, and only one connection string in each endpoint can enable the ssl, for other notes, see Configure SSL encryption. For a PolarDB for PostgreSQL cluster or a PolarDB-O cluster, this parameter is not required, by default, SSL encryption is enabled for all endpoints.
    sslConnectionString String
    (Available since v1.121.0) The SSL connection string.
    sslEnabled String
    Specifies how to modify the SSL encryption status. Valid values: Disable, Enable, Update.
    sslExpireTime String
    (Available since v1.121.0) The time when the SSL certificate expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

    Import

    PolarDB endpoint can be imported using the id, e.g.

    $ pulumi import alicloud:polardb/endpoint:Endpoint example pc-abc123456:pe-abc123456
    

    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.
    alicloud logo
    Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi