GetEndpoints

The alicloud.polardb.getEndpoints data source provides a collection of PolarDB endpoints available in Alibaba Cloud account. Filters support regular expression for the cluster name, searches by clusterId, and other filters which are listed below.

NOTE: Available in v1.68.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var polardbClustersDs = Output.Create(AliCloud.PolarDB.GetClusters.InvokeAsync(new AliCloud.PolarDB.GetClustersArgs
        {
            DescriptionRegex = "pc-\\w+",
            Status = "Running",
        }));
        var @default = polardbClustersDs.Apply(polardbClustersDs => Output.Create(AliCloud.PolarDB.GetEndpoints.InvokeAsync(new AliCloud.PolarDB.GetEndpointsArgs
        {
            DbClusterId = polardbClustersDs.Clusters[0].Id,
        })));
        this.Ends = @default.Apply(@default => @default.Endpoints[0].DbEndpointId);
    }

    [Output("ends")]
    public Output<string> Ends { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

polardb_clusters_ds = alicloud.polardb.get_clusters(description_regex="pc-\\w+",
    status="Running")
default = alicloud.polardb.get_endpoints(db_cluster_id=polardb_clusters_ds.clusters[0]["id"])
pulumi.export("ends", default.endpoints[0]["db_endpoint_id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const polardbClustersDs = alicloud.polardb.getClusters({
    descriptionRegex: "pc-\\w+",
    status: "Running",
});
const default = polardbClustersDs.then(polardbClustersDs => alicloud.polardb.getEndpoints({
    dbClusterId: polardbClustersDs.clusters[0].id,
}));
export const ends = _default.then(_default => _default.endpoints[0].dbEndpointId);

Using GetEndpoints

function getEndpoints(args: GetEndpointsArgs, opts?: InvokeOptions): Promise<GetEndpointsResult>
function  get_endpoints(db_cluster_id=None, db_endpoint_id=None, opts=None)
func GetEndpoints(ctx *Context, args *GetEndpointsArgs, opts ...InvokeOption) (*GetEndpointsResult, error)
public static class GetEndpoints {
    public static Task<GetEndpointsResult> InvokeAsync(GetEndpointsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DbClusterId string

PolarDB cluster ID.

DbEndpointId string

endpoint of the cluster.

DbClusterId string

PolarDB cluster ID.

DbEndpointId string

endpoint of the cluster.

dbClusterId string

PolarDB cluster ID.

dbEndpointId string

endpoint of the cluster.

db_cluster_id str

PolarDB cluster ID.

db_endpoint_id str

endpoint of the cluster.

GetEndpoints Result

The following output properties are available:

DbClusterId string
Endpoints List<Pulumi.AliCloud.PolarDB.Outputs.GetEndpointsEndpoint>

A list of PolarDB cluster endpoints. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

DbEndpointId string

The endpoint ID.

DbClusterId string
Endpoints []GetEndpointsEndpoint

A list of PolarDB cluster endpoints. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

DbEndpointId string

The endpoint ID.

dbClusterId string
endpoints GetEndpointsEndpoint[]

A list of PolarDB cluster endpoints. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

dbEndpointId string

The endpoint ID.

db_cluster_id str
endpoints List[GetEndpointsEndpoint]

A list of PolarDB cluster endpoints. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

db_endpoint_id str

The endpoint ID.

Supporting Types

GetEndpointsEndpoint

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AddressItems List<Pulumi.AliCloud.PolarDB.Inputs.GetEndpointsEndpointAddressItemArgs>

A list of endpoint addresses. Each element contains the following attributes.

AutoAddNewNodes string

Whether the new node is automatically added to the default cluster address.Options are Enable and Disable.

DbEndpointId string

endpoint of the cluster.

EndpointConfig string

The Endpoint configuration. ConsistLevel: session consistency level, value:0: final consistency,1: session consistency;LoadBalanceStrategy: load balancing strategy. Based on the automatic scheduling of load, the value is: load.

EndpointType string

Cluster address type.Cluster: the default address of the Cluster.Primary: Primary address.Custom: Custom cluster addresses.

Nodes string

A list of nodes that connect to the address configuration.

ReadWriteMode string

Read-write mode:ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.

AddressItems []GetEndpointsEndpointAddressItem

A list of endpoint addresses. Each element contains the following attributes.

AutoAddNewNodes string

Whether the new node is automatically added to the default cluster address.Options are Enable and Disable.

DbEndpointId string

endpoint of the cluster.

EndpointConfig string

The Endpoint configuration. ConsistLevel: session consistency level, value:0: final consistency,1: session consistency;LoadBalanceStrategy: load balancing strategy. Based on the automatic scheduling of load, the value is: load.

EndpointType string

Cluster address type.Cluster: the default address of the Cluster.Primary: Primary address.Custom: Custom cluster addresses.

Nodes string

A list of nodes that connect to the address configuration.

ReadWriteMode string

Read-write mode:ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.

addressItems GetEndpointsEndpointAddressItem[]

A list of endpoint addresses. Each element contains the following attributes.

autoAddNewNodes string

Whether the new node is automatically added to the default cluster address.Options are Enable and Disable.

dbEndpointId string

endpoint of the cluster.

endpointConfig string

The Endpoint configuration. ConsistLevel: session consistency level, value:0: final consistency,1: session consistency;LoadBalanceStrategy: load balancing strategy. Based on the automatic scheduling of load, the value is: load.

endpointType string

Cluster address type.Cluster: the default address of the Cluster.Primary: Primary address.Custom: Custom cluster addresses.

nodes string

A list of nodes that connect to the address configuration.

readWriteMode string

Read-write mode:ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.

addressItems List[GetEndpointsEndpointAddressItem]

A list of endpoint addresses. Each element contains the following attributes.

auto_add_new_nodes str

Whether the new node is automatically added to the default cluster address.Options are Enable and Disable.

db_endpoint_id str

endpoint of the cluster.

endpoint_config str

The Endpoint configuration. ConsistLevel: session consistency level, value:0: final consistency,1: session consistency;LoadBalanceStrategy: load balancing strategy. Based on the automatic scheduling of load, the value is: load.

endpoint_type str

Cluster address type.Cluster: the default address of the Cluster.Primary: Primary address.Custom: Custom cluster addresses.

nodes str

A list of nodes that connect to the address configuration.

read_write_mode str

Read-write mode:ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.

GetEndpointsEndpointAddressItem

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ConnectionString string

Connection instance string.

IpAddress string

The ip address of connection string.

NetType string

IP network type:Public or Private.

Port string

Intranet connection port.

VpcId string

ID of the VPC the instance belongs to.

VswitchId string

ID of the VSwitch the cluster belongs to.

ConnectionString string

Connection instance string.

IpAddress string

The ip address of connection string.

NetType string

IP network type:Public or Private.

Port string

Intranet connection port.

VpcId string

ID of the VPC the instance belongs to.

VswitchId string

ID of the VSwitch the cluster belongs to.

connectionString string

Connection instance string.

ipAddress string

The ip address of connection string.

netType string

IP network type:Public or Private.

port string

Intranet connection port.

vpcId string

ID of the VPC the instance belongs to.

vswitchId string

ID of the VSwitch the cluster belongs to.

connection_string str

Connection instance string.

ip_address str

The ip address of connection string.

net_type str

IP network type:Public or Private.

port str

Intranet connection port.

vpc_id str

ID of the VPC the instance belongs to.

vswitch_id str

ID of the VSwitch the cluster belongs to.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.