Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of vedb mysql accounts
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.getZones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[2]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.vedb_mysql.Instance("fooInstance", {
chargeType: "PostPaid",
storageChargeType: "PostPaid",
dbEngineVersion: "MySQL_8_0",
dbMinorVersion: "3.0",
nodeNumber: 2,
nodeSpec: "vedb.mysql.x4.large",
subnetId: fooSubnet.id,
instanceName: "tf-test",
projectName: "testA",
tags: [
{
key: "tftest",
value: "tftest",
},
{
key: "tftest2",
value: "tftest2",
},
],
});
const fooDatabase = new volcengine.vedb_mysql.Database("fooDatabase", {
dbName: "tf-table",
instanceId: fooInstance.id,
});
const fooAccount = new volcengine.vedb_mysql.Account("fooAccount", {
accountName: "tftest",
accountPassword: "93f0cb0614Aab12",
accountType: "Normal",
instanceId: fooInstance.id,
accountPrivileges: [{
dbName: fooDatabase.dbName,
accountPrivilege: "Custom",
accountPrivilegeDetail: "SELECT,INSERT,DELETE",
}],
});
const fooAccounts = volcengine.vedb_mysql.getAccountsOutput({
accountName: fooAccount.accountName,
instanceId: fooInstance.id,
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.get_zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[2].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.vedb_mysql.Instance("fooInstance",
charge_type="PostPaid",
storage_charge_type="PostPaid",
db_engine_version="MySQL_8_0",
db_minor_version="3.0",
node_number=2,
node_spec="vedb.mysql.x4.large",
subnet_id=foo_subnet.id,
instance_name="tf-test",
project_name="testA",
tags=[
volcengine.vedb_mysql.InstanceTagArgs(
key="tftest",
value="tftest",
),
volcengine.vedb_mysql.InstanceTagArgs(
key="tftest2",
value="tftest2",
),
])
foo_database = volcengine.vedb_mysql.Database("fooDatabase",
db_name="tf-table",
instance_id=foo_instance.id)
foo_account = volcengine.vedb_mysql.Account("fooAccount",
account_name="tftest",
account_password="93f0cb0614Aab12",
account_type="Normal",
instance_id=foo_instance.id,
account_privileges=[volcengine.vedb_mysql.AccountAccountPrivilegeArgs(
db_name=foo_database.db_name,
account_privilege="Custom",
account_privilege_detail="SELECT,INSERT,DELETE",
)])
foo_accounts = volcengine.vedb_mysql.get_accounts_output(account_name=foo_account.account_name,
instance_id=foo_instance.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vedb_mysql"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.GetZones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[2].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooInstance, err := vedb_mysql.NewInstance(ctx, "fooInstance", &vedb_mysql.InstanceArgs{
ChargeType: pulumi.String("PostPaid"),
StorageChargeType: pulumi.String("PostPaid"),
DbEngineVersion: pulumi.String("MySQL_8_0"),
DbMinorVersion: pulumi.String("3.0"),
NodeNumber: pulumi.Int(2),
NodeSpec: pulumi.String("vedb.mysql.x4.large"),
SubnetId: fooSubnet.ID(),
InstanceName: pulumi.String("tf-test"),
ProjectName: pulumi.String("testA"),
Tags: vedb_mysql.InstanceTagArray{
&vedb_mysql.InstanceTagArgs{
Key: pulumi.String("tftest"),
Value: pulumi.String("tftest"),
},
&vedb_mysql.InstanceTagArgs{
Key: pulumi.String("tftest2"),
Value: pulumi.String("tftest2"),
},
},
})
if err != nil {
return err
}
fooDatabase, err := vedb_mysql.NewDatabase(ctx, "fooDatabase", &vedb_mysql.DatabaseArgs{
DbName: pulumi.String("tf-table"),
InstanceId: fooInstance.ID(),
})
if err != nil {
return err
}
fooAccount, err := vedb_mysql.NewAccount(ctx, "fooAccount", &vedb_mysql.AccountArgs{
AccountName: pulumi.String("tftest"),
AccountPassword: pulumi.String("93f0cb0614Aab12"),
AccountType: pulumi.String("Normal"),
InstanceId: fooInstance.ID(),
AccountPrivileges: vedb_mysql.AccountAccountPrivilegeArray{
&vedb_mysql.AccountAccountPrivilegeArgs{
DbName: fooDatabase.DbName,
AccountPrivilege: pulumi.String("Custom"),
AccountPrivilegeDetail: pulumi.String("SELECT,INSERT,DELETE"),
},
},
})
if err != nil {
return err
}
_ = vedb_mysql.GetAccountsOutput(ctx, vedb_mysql.GetAccountsOutputArgs{
AccountName: fooAccount.AccountName,
InstanceId: fooInstance.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.GetZones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[2]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Vedb_mysql.Instance("fooInstance", new()
{
ChargeType = "PostPaid",
StorageChargeType = "PostPaid",
DbEngineVersion = "MySQL_8_0",
DbMinorVersion = "3.0",
NodeNumber = 2,
NodeSpec = "vedb.mysql.x4.large",
SubnetId = fooSubnet.Id,
InstanceName = "tf-test",
ProjectName = "testA",
Tags = new[]
{
new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
{
Key = "tftest",
Value = "tftest",
},
new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
{
Key = "tftest2",
Value = "tftest2",
},
},
});
var fooDatabase = new Volcengine.Vedb_mysql.Database("fooDatabase", new()
{
DbName = "tf-table",
InstanceId = fooInstance.Id,
});
var fooAccount = new Volcengine.Vedb_mysql.Account("fooAccount", new()
{
AccountName = "tftest",
AccountPassword = "93f0cb0614Aab12",
AccountType = "Normal",
InstanceId = fooInstance.Id,
AccountPrivileges = new[]
{
new Volcengine.Vedb_mysql.Inputs.AccountAccountPrivilegeArgs
{
DbName = fooDatabase.DbName,
AccountPrivilege = "Custom",
AccountPrivilegeDetail = "SELECT,INSERT,DELETE",
},
},
});
var fooAccounts = Volcengine.Vedb_mysql.GetAccounts.Invoke(new()
{
AccountName = fooAccount.AccountName,
InstanceId = fooInstance.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.vedb_mysql.Instance;
import com.pulumi.volcengine.vedb_mysql.InstanceArgs;
import com.pulumi.volcengine.vedb_mysql.inputs.InstanceTagArgs;
import com.pulumi.volcengine.vedb_mysql.Database;
import com.pulumi.volcengine.vedb_mysql.DatabaseArgs;
import com.pulumi.volcengine.vedb_mysql.Account;
import com.pulumi.volcengine.vedb_mysql.AccountArgs;
import com.pulumi.volcengine.vedb_mysql.inputs.AccountAccountPrivilegeArgs;
import com.pulumi.volcengine.vedb_mysql.Vedb_mysqlFunctions;
import com.pulumi.volcengine.vedb_mysql.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 fooZones = EcsFunctions.getZones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[2].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.chargeType("PostPaid")
.storageChargeType("PostPaid")
.dbEngineVersion("MySQL_8_0")
.dbMinorVersion("3.0")
.nodeNumber(2)
.nodeSpec("vedb.mysql.x4.large")
.subnetId(fooSubnet.id())
.instanceName("tf-test")
.projectName("testA")
.tags(
InstanceTagArgs.builder()
.key("tftest")
.value("tftest")
.build(),
InstanceTagArgs.builder()
.key("tftest2")
.value("tftest2")
.build())
.build());
var fooDatabase = new Database("fooDatabase", DatabaseArgs.builder()
.dbName("tf-table")
.instanceId(fooInstance.id())
.build());
var fooAccount = new Account("fooAccount", AccountArgs.builder()
.accountName("tftest")
.accountPassword("93f0cb0614Aab12")
.accountType("Normal")
.instanceId(fooInstance.id())
.accountPrivileges(AccountAccountPrivilegeArgs.builder()
.dbName(fooDatabase.dbName())
.accountPrivilege("Custom")
.accountPrivilegeDetail("SELECT,INSERT,DELETE")
.build())
.build());
final var fooAccounts = Vedb_mysqlFunctions.getAccounts(GetAccountsArgs.builder()
.accountName(fooAccount.accountName())
.instanceId(fooInstance.id())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[2].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:vedb_mysql:Instance
properties:
chargeType: PostPaid
storageChargeType: PostPaid
dbEngineVersion: MySQL_8_0
dbMinorVersion: '3.0'
nodeNumber: 2
nodeSpec: vedb.mysql.x4.large
subnetId: ${fooSubnet.id}
instanceName: tf-test
projectName: testA
tags:
- key: tftest
value: tftest
- key: tftest2
value: tftest2
fooDatabase:
type: volcengine:vedb_mysql:Database
properties:
dbName: tf-table
instanceId: ${fooInstance.id}
fooAccount:
type: volcengine:vedb_mysql:Account
properties:
accountName: tftest
accountPassword: 93f0cb0614Aab12
accountType: Normal
instanceId: ${fooInstance.id}
accountPrivileges:
- dbName: ${fooDatabase.dbName}
accountPrivilege: Custom
accountPrivilegeDetail: SELECT,INSERT,DELETE
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:getZones
Arguments: {}
fooAccounts:
fn::invoke:
Function: volcengine:vedb_mysql:getAccounts
Arguments:
accountName: ${fooAccount.accountName}
instanceId: ${fooInstance.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,
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,
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)
public static Output<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:vedb_mysql/getAccounts:getAccounts
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - The id of the veDB Mysql instance.
- Account
Name string - The name of the database account. This field supports fuzzy query.
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- Instance
Id string - The id of the veDB Mysql instance.
- Account
Name string - The name of the database account. This field supports fuzzy query.
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- instance
Id String - The id of the veDB Mysql instance.
- account
Name String - The name of the database account. This field supports fuzzy query.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
- instance
Id string - The id of the veDB Mysql instance.
- account
Name string - The name of the database account. This field supports fuzzy query.
- name
Regex string - A Name Regex of Resource.
- output
File string - File name where to save data source results.
- instance_
id str - The id of the veDB Mysql instance.
- account_
name str - The name of the database account. This field supports fuzzy query.
- name_
regex str - A Name Regex of Resource.
- output_
file str - File name where to save data source results.
- instance
Id String - The id of the veDB Mysql instance.
- account
Name String - The name of the database account. This field supports fuzzy query.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
getAccounts Result
The following output properties are available:
- Accounts
List<Get
Accounts Account> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Total
Count int - The total count of query.
- Account
Name string - The name of the database account.
- Name
Regex string - Output
File string
- Accounts
[]Get
Accounts Account - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Total
Count int - The total count of query.
- Account
Name string - The name of the database account.
- Name
Regex string - Output
File string
- accounts
List<Get
Accounts Account> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - total
Count Integer - The total count of query.
- account
Name String - The name of the database account.
- name
Regex String - output
File String
- accounts
Get
Accounts Account[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - total
Count number - The total count of query.
- account
Name string - The name of the database account.
- name
Regex string - output
File string
- accounts
Sequence[Get
Accounts Account] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - total_
count int - The total count of query.
- account_
name str - The name of the database account.
- name_
regex str - output_
file str
- accounts List<Property Map>
- The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - total
Count Number - The total count of query.
- account
Name String - The name of the database account.
- name
Regex String - output
File String
Supporting Types
GetAccountsAccount
- Account
Name string - The name of the database account. This field supports fuzzy query.
- Account
Privileges List<GetAccounts Account Account Privilege> - The privilege detail list of RDS mysql instance account.
- Account
Type string - The type of the database account.
- Account
Name string - The name of the database account. This field supports fuzzy query.
- Account
Privileges []GetAccounts Account Account Privilege - The privilege detail list of RDS mysql instance account.
- Account
Type string - The type of the database account.
- account
Name String - The name of the database account. This field supports fuzzy query.
- account
Privileges List<GetAccounts Account Account Privilege> - The privilege detail list of RDS mysql instance account.
- account
Type String - The type of the database account.
- account
Name string - The name of the database account. This field supports fuzzy query.
- account
Privileges GetAccounts Account Account Privilege[] - The privilege detail list of RDS mysql instance account.
- account
Type string - The type of the database account.
- account_
name str - The name of the database account. This field supports fuzzy query.
- account_
privileges Sequence[GetAccounts Account Account Privilege] - The privilege detail list of RDS mysql instance account.
- account_
type str - The type of the database account.
- account
Name String - The name of the database account. This field supports fuzzy query.
- account
Privileges List<Property Map> - The privilege detail list of RDS mysql instance account.
- account
Type String - The type of the database account.
GetAccountsAccountAccountPrivilege
- Account
Privilege string - The privilege type of the account.
- Account
Privilege stringDetail - The privilege detail of the account.
- Db
Name string - The name of database.
- Account
Privilege string - The privilege type of the account.
- Account
Privilege stringDetail - The privilege detail of the account.
- Db
Name string - The name of database.
- account
Privilege String - The privilege type of the account.
- account
Privilege StringDetail - The privilege detail of the account.
- db
Name String - The name of database.
- account
Privilege string - The privilege type of the account.
- account
Privilege stringDetail - The privilege detail of the account.
- db
Name string - The name of database.
- account_
privilege str - The privilege type of the account.
- account_
privilege_ strdetail - The privilege detail of the account.
- db_
name str - The name of database.
- account
Privilege String - The privilege type of the account.
- account
Privilege StringDetail - The privilege detail of the account.
- db
Name String - The name of database.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
