@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
195 lines (194 loc) • 5.84 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Use this data source to query detailed information of vedb mysql accounts
* ## Example Usage
*
* ```typescript
* 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,
* });
* ```
*/
export declare function getAccounts(args: GetAccountsArgs, opts?: pulumi.InvokeOptions): Promise<GetAccountsResult>;
/**
* A collection of arguments for invoking getAccounts.
*/
export interface GetAccountsArgs {
/**
* The name of the database account. This field supports fuzzy query.
*/
accountName?: string;
/**
* The id of the veDB Mysql instance.
*/
instanceId: string;
/**
* A Name Regex of Resource.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
}
/**
* A collection of values returned by getAccounts.
*/
export interface GetAccountsResult {
/**
* The name of the database account.
*/
readonly accountName?: string;
/**
* The collection of query.
*/
readonly accounts: outputs.vedb_mysql.GetAccountsAccount[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly instanceId: string;
readonly nameRegex?: string;
readonly outputFile?: string;
/**
* The total count of query.
*/
readonly totalCount: number;
}
/**
* Use this data source to query detailed information of vedb mysql accounts
* ## Example Usage
*
* ```typescript
* 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,
* });
* ```
*/
export declare function getAccountsOutput(args: GetAccountsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetAccountsResult>;
/**
* A collection of arguments for invoking getAccounts.
*/
export interface GetAccountsOutputArgs {
/**
* The name of the database account. This field supports fuzzy query.
*/
accountName?: pulumi.Input<string>;
/**
* The id of the veDB Mysql instance.
*/
instanceId: pulumi.Input<string>;
/**
* A Name Regex of Resource.
*/
nameRegex?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
}