Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.kvstore.getAccounts
Explore with Pulumi AI
This data source provides the KVStore Accounts of the current Alibaba Cloud user.
NOTE: Available in v1.102.0+.
Example Usage
Basic Usage
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);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.kvstore.get_accounts(instance_id="example_value")
pulumi.export("firstKvstoreAccountId", example.accounts[0].id)
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.KVStore.GetAccounts.Invoke(new()
{
InstanceId = "example_value",
});
return new Dictionary<string, object?>
{
["firstKvstoreAccountId"] = example.Apply(getAccountsResult => getAccountsResult.Accounts[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.kvstore.KvstoreFunctions;
import com.pulumi.alicloud.kvstore.inputs.GetAccountsArgs;
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 example = KvstoreFunctions.getAccounts(GetAccountsArgs.builder()
.instanceId("example_value")
.build());
ctx.export("firstKvstoreAccountId", example.applyValue(getAccountsResult -> getAccountsResult.accounts()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:kvstore:getAccounts
Arguments:
instanceId: example_value
outputs:
firstKvstoreAccountId: ${example.accounts[0].id}
Using getAccounts
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
function getAccountsOutput(args: GetAccountsOutputArgs, opts?: InvokeOptions): Output<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
def get_accounts_output(account_name: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountsResult]
func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)
func GetAccountsOutput(ctx *Context, args *GetAccountsOutputArgs, opts ...InvokeOption) GetAccountsResultOutput
> Note: This function is named GetAccounts
in the Go SDK.
public static class GetAccounts
{
public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
public static Output<GetAccountsResult> Invoke(GetAccountsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:kvstore/getAccounts:getAccounts
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The Id of instance in which account belongs.
- Account
Name string - The name of the account.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of KVStore Account. Valid Values:
"Available
Unavailable
- Instance
Id string - The Id of instance in which account belongs.
- Account
Name string - The name of the account.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of KVStore Account. Valid Values:
"Available
Unavailable
- instance
Id String - The Id of instance in which account belongs.
- account
Name String - The name of the account.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of KVStore Account. Valid Values:
"Available
Unavailable
- instance
Id string - The Id of instance in which account belongs.
- account
Name string - The name of the account.
- name
Regex string - output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of KVStore Account. Valid Values:
"Available
Unavailable
- 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 - File name where to save data source results (after running
pulumi preview
). - status str
- The status of KVStore Account. Valid Values:
"Available
Unavailable
- instance
Id String - The Id of instance in which account belongs.
- account
Name String - The name of the account.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of KVStore Account. Valid Values:
"Available
Unavailable
getAccounts Result
The following output properties are available:
- Accounts
List<Pulumi.
Ali Cloud. KVStore. Outputs. Get Accounts Account> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - Names List<string>
- Account
Name string - Name
Regex string - Output
File string - Status string
- Accounts
[]Get
Accounts Account - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - Names []string
- Account
Name string - Name
Regex string - Output
File string - Status string
- accounts
List<Get
Accounts Account> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - names List<String>
- account
Name String - name
Regex String - output
File String - status String
- accounts
Get
Accounts Account[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - names string[]
- account
Name string - name
Regex string - output
File string - status string
- accounts
Sequence[Get
Accounts Account] - 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
- accounts List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - names List<String>
- account
Name String - name
Regex String - output
File String - status String
Supporting Types
GetAccountsAccount
- Account
Name string - The name of the account.
- Account
Privilege string - The privilege of account access database.
- Account
Type string - Privilege type of account.
- Description string
- The description of account.
- Id string
- The ID of the Account.
- Instance
Id string - The Id of instance in which account belongs.
- Status string
- The status of account.
- Account
Name string - The name of the account.
- Account
Privilege string - The privilege of account access database.
- Account
Type string - Privilege type of account.
- Description string
- The description of account.
- Id string
- The ID of the Account.
- Instance
Id string - The Id of instance in which account belongs.
- Status string
- The status of account.
- account
Name String - The name of the account.
- account
Privilege String - The privilege of account access database.
- account
Type String - Privilege type of account.
- description String
- The description of account.
- id String
- The ID of the Account.
- instance
Id String - The Id of instance in which account belongs.
- status String
- The status of account.
- account
Name string - The name of the account.
- account
Privilege string - The privilege of account access database.
- account
Type string - Privilege type of account.
- description string
- The description of account.
- id string
- The ID of the Account.
- instance
Id 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.
- account
Name String - The name of the account.
- account
Privilege String - The privilege of account access database.
- account
Type String - Privilege type of account.
- description String
- The description of account.
- id String
- The ID of the Account.
- instance
Id String - The Id of instance in which account belongs.
- status String
- The status of account.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.