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:
- Db
Cluster stringId PolarDB cluster ID.
- Db
Endpoint stringId endpoint of the cluster.
- Db
Cluster stringId PolarDB cluster ID.
- Db
Endpoint stringId endpoint of the cluster.
- db
Cluster stringId PolarDB cluster ID.
- db
Endpoint stringId endpoint of the cluster.
- db_
cluster_ strid PolarDB cluster ID.
- db_
endpoint_ strid endpoint of the cluster.
GetEndpoints Result
The following output properties are available:
- Db
Cluster stringId - Endpoints
List<Pulumi.
Ali Cloud. Polar DB. Outputs. Get Endpoints Endpoint> A list of PolarDB cluster endpoints. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Db
Endpoint stringId The endpoint ID.
- Db
Cluster stringId - Endpoints
[]Get
Endpoints Endpoint A list of PolarDB cluster endpoints. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Db
Endpoint stringId The endpoint ID.
- db
Cluster stringId - endpoints
Get
Endpoints Endpoint[] A list of PolarDB cluster endpoints. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- db
Endpoint stringId The endpoint ID.
- db_
cluster_ strid - endpoints
List[Get
Endpoints Endpoint] 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_ strid 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.
- Address
Items List<Pulumi.Ali Cloud. Polar DB. Inputs. Get Endpoints Endpoint Address Item Args> A list of endpoint addresses. Each element contains the following attributes.
- Auto
Add stringNew Nodes Whether the new node is automatically added to the default cluster address.Options are
EnableandDisable.- Db
Endpoint stringId endpoint of the cluster.
- Endpoint
Config 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.- Endpoint
Type 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.
- Read
Write stringMode Read-write mode:
ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.
- Address
Items []GetEndpoints Endpoint Address Item A list of endpoint addresses. Each element contains the following attributes.
- Auto
Add stringNew Nodes Whether the new node is automatically added to the default cluster address.Options are
EnableandDisable.- Db
Endpoint stringId endpoint of the cluster.
- Endpoint
Config 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.- Endpoint
Type 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.
- Read
Write stringMode Read-write mode:
ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.
- address
Items GetEndpoints Endpoint Address Item[] A list of endpoint addresses. Each element contains the following attributes.
- auto
Add stringNew Nodes Whether the new node is automatically added to the default cluster address.Options are
EnableandDisable.- db
Endpoint stringId endpoint of the cluster.
- endpoint
Config 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.- endpoint
Type 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.
- read
Write stringMode Read-write mode:
ReadWrite: readable and writable (automatic read-write separation).ReadOnly: ReadOnly.
- address
Items List[GetEndpoints Endpoint Address Item] A list of endpoint addresses. Each element contains the following attributes.
- auto_
add_ strnew_ nodes Whether the new node is automatically added to the default cluster address.Options are
EnableandDisable.- db_
endpoint_ strid 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_ strmode 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.
- connection_
string str Connection instance string.
- ip_
address str The ip address of connection string.
- net_
type str IP network type:
PublicorPrivate.- 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
alicloudTerraform Provider.