Class GetAccounts
Inheritance
System.Object
GetAccounts
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.PolarDB
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetAccounts
Methods
View SourceInvokeAsync(GetAccountsArgs, InvokeOptions)
The alicloud.polardb.getAccounts data source provides a collection of PolarDB cluster database account available in Alibaba Cloud account.
Filters support regular expression for the account name, searches by clusterId.
NOTE: Available in v1.70.0+.
{{% examples %}}
Example Usage
{{% example %}}
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.GetAccounts.InvokeAsync(new AliCloud.PolarDB.GetAccountsArgs
{
DbClusterId = polardbClustersDs.Clusters[0].Id,
})));
this.Ends = @default.Apply(@default => @default.Accounts[0].AccountName);
}
[Output("ends")]
public Output<string> Ends { get; set; }
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAccountsArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetAccountsResult> |