getAccounts

This data source provides the KVStore Accounts of the current Alibaba Cloud user.

NOTE: Available in v1.102.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.KVStore.GetAccounts.InvokeAsync(new AliCloud.KVStore.GetAccountsArgs
        {
            InstanceId = "example_value",
        }));
        this.FirstKvstoreAccountId = example.Apply(example => example.Accounts[0].Id);
    }

    [Output("firstKvstoreAccountId")]
    public Output<string> FirstKvstoreAccountId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kvstore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := kvstore.GetAccounts(ctx, &kvstore.GetAccountsArgs{
			InstanceId: "example_value",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstKvstoreAccountId", example.Accounts[0].Id)
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.kvstore.get_accounts(instance_id="example_value")
pulumi.export("firstKvstoreAccountId", example.accounts[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.kvstore.getAccounts({
    instanceId: "example_value",
});
export const firstKvstoreAccountId = example.then(example => example.accounts[0].id);

Using getAccounts

function getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
def get_accounts(account_name: Optional[str] = None,
                 instance_id: Optional[str] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 status: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetAccountsResult
func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)

Note: This function is named GetAccounts in the Go SDK.

public static class GetAccounts {
    public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

InstanceId string
The Id of instance in which account belongs.
AccountName string
The name of the account.
NameRegex string
OutputFile string
Status string
The status of account.
InstanceId string
The Id of instance in which account belongs.
AccountName string
The name of the account.
NameRegex string
OutputFile string
Status string
The status of account.
instanceId string
The Id of instance in which account belongs.
accountName string
The name of the account.
nameRegex string
outputFile string
status string
The status of account.
instance_id str
The Id of instance in which account belongs.
account_name str
The name of the account.
name_regex str
output_file str
status str
The status of account.

getAccounts Result

The following output properties are available:

Accounts List<Pulumi.AliCloud.KVStore.Outputs.GetAccountsAccount>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
InstanceId string
Names List<string>
AccountName string
NameRegex string
OutputFile string
Status string
Accounts []GetAccountsAccount
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
InstanceId string
Names []string
AccountName string
NameRegex string
OutputFile string
Status string
accounts GetAccountsAccount[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
instanceId string
names string[]
accountName string
nameRegex string
outputFile string
status string
accounts Sequence[GetAccountsAccount]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
instance_id str
names Sequence[str]
account_name str
name_regex str
output_file str
status str

Supporting Types

GetAccountsAccount

AccountName string
The name of the account.
AccountPrivilege string
The privilege of account access database.
AccountType string
Privilege type of account.
Description string
The description of account.
Id string
The ID of the Account.
InstanceId string
The Id of instance in which account belongs.
Status string
The status of account.
AccountName string
The name of the account.
AccountPrivilege string
The privilege of account access database.
AccountType string
Privilege type of account.
Description string
The description of account.
Id string
The ID of the Account.
InstanceId string
The Id of instance in which account belongs.
Status string
The status of account.
accountName string
The name of the account.
accountPrivilege string
The privilege of account access database.
accountType string
Privilege type of account.
description string
The description of account.
id string
The ID of the Account.
instanceId string
The Id of instance in which account belongs.
status string
The status of account.
account_name str
The name of the account.
account_privilege str
The privilege of account access database.
account_type str
Privilege type of account.
description str
The description of account.
id str
The ID of the Account.
instance_id str
The Id of instance in which account belongs.
status str
The status of account.

Package Details

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