1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getMariadbAccounts
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.getMariadbAccounts

Explore with Pulumi AI

Use this data source to query detailed information of mariadb accounts

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const accounts = tencentcloud.getMariadbAccounts({
    instanceId: "tdsql-4pzs5b67",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

accounts = tencentcloud.get_mariadb_accounts(instance_id="tdsql-4pzs5b67")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.GetMariadbAccounts(ctx, &tencentcloud.GetMariadbAccountsArgs{
			InstanceId: "tdsql-4pzs5b67",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var accounts = Tencentcloud.GetMariadbAccounts.Invoke(new()
    {
        InstanceId = "tdsql-4pzs5b67",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetMariadbAccountsArgs;
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 accounts = TencentcloudFunctions.getMariadbAccounts(GetMariadbAccountsArgs.builder()
            .instanceId("tdsql-4pzs5b67")
            .build());

    }
}
Copy
variables:
  accounts:
    fn::invoke:
      function: tencentcloud:getMariadbAccounts
      arguments:
        instanceId: tdsql-4pzs5b67
Copy

Using getMariadbAccounts

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 getMariadbAccounts(args: GetMariadbAccountsArgs, opts?: InvokeOptions): Promise<GetMariadbAccountsResult>
function getMariadbAccountsOutput(args: GetMariadbAccountsOutputArgs, opts?: InvokeOptions): Output<GetMariadbAccountsResult>
Copy
def get_mariadb_accounts(id: Optional[str] = None,
                         instance_id: Optional[str] = None,
                         result_output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetMariadbAccountsResult
def get_mariadb_accounts_output(id: Optional[pulumi.Input[str]] = None,
                         instance_id: Optional[pulumi.Input[str]] = None,
                         result_output_file: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetMariadbAccountsResult]
Copy
func GetMariadbAccounts(ctx *Context, args *GetMariadbAccountsArgs, opts ...InvokeOption) (*GetMariadbAccountsResult, error)
func GetMariadbAccountsOutput(ctx *Context, args *GetMariadbAccountsOutputArgs, opts ...InvokeOption) GetMariadbAccountsResultOutput
Copy

> Note: This function is named GetMariadbAccounts in the Go SDK.

public static class GetMariadbAccounts 
{
    public static Task<GetMariadbAccountsResult> InvokeAsync(GetMariadbAccountsArgs args, InvokeOptions? opts = null)
    public static Output<GetMariadbAccountsResult> Invoke(GetMariadbAccountsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMariadbAccountsResult> getMariadbAccounts(GetMariadbAccountsArgs args, InvokeOptions options)
public static Output<GetMariadbAccountsResult> getMariadbAccounts(GetMariadbAccountsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getMariadbAccounts:getMariadbAccounts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId This property is required. string
instance id.
Id string
ResultOutputFile string
Used to save results.
InstanceId This property is required. string
instance id.
Id string
ResultOutputFile string
Used to save results.
instanceId This property is required. String
instance id.
id String
resultOutputFile String
Used to save results.
instanceId This property is required. string
instance id.
id string
resultOutputFile string
Used to save results.
instance_id This property is required. str
instance id.
id str
result_output_file str
Used to save results.
instanceId This property is required. String
instance id.
id String
resultOutputFile String
Used to save results.

getMariadbAccounts Result

The following output properties are available:

id String
instanceId String
lists List<Property Map>
account list.
resultOutputFile String

Supporting Types

GetMariadbAccountsList

CreateTime This property is required. string
creation time.
DelayThresh This property is required. double
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
Description This property is required. string
User remarks.
Host This property is required. string
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
ReadOnly This property is required. double
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
SlaveConst This property is required. double
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
UpdateTime This property is required. string
Update time.
UserName This property is required. string
username.
CreateTime This property is required. string
creation time.
DelayThresh This property is required. float64
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
Description This property is required. string
User remarks.
Host This property is required. string
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
ReadOnly This property is required. float64
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
SlaveConst This property is required. float64
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
UpdateTime This property is required. string
Update time.
UserName This property is required. string
username.
createTime This property is required. String
creation time.
delayThresh This property is required. Double
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
description This property is required. String
User remarks.
host This property is required. String
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
readOnly This property is required. Double
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
slaveConst This property is required. Double
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
updateTime This property is required. String
Update time.
userName This property is required. String
username.
createTime This property is required. string
creation time.
delayThresh This property is required. number
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
description This property is required. string
User remarks.
host This property is required. string
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
readOnly This property is required. number
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
slaveConst This property is required. number
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
updateTime This property is required. string
Update time.
userName This property is required. string
username.
create_time This property is required. str
creation time.
delay_thresh This property is required. float
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
description This property is required. str
User remarks.
host This property is required. str
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
read_only This property is required. float
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
slave_const This property is required. float
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
update_time This property is required. str
Update time.
user_name This property is required. str
username.
createTime This property is required. String
creation time.
delayThresh This property is required. Number
This field is meaningful for read-only accounts, indicating that the standby machine with the active-standby delay less than this value is selected.
description This property is required. String
User remarks.
host This property is required. String
The host from which the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, and the IP segment ends with %; supports filling in %; if it is empty, it defaults to %).
readOnly This property is required. Number
Read-only flag, 0: No, 1: The SQL request of this account is preferentially executed on the standby machine, and the host machine is selected for execution when the standby machine is unavailable, 2: The standby machine is preferentially selected for execution, and the operation fails when the standby machine is unavailable.
slaveConst This property is required. Number
For read-only accounts, set whether the policy is to fix the standby machine, 0: The standby machine is not fixed, that is, the standby machine does not meet the conditions and will not disconnect from the client, and the Proxy selects other available standby machines, 1: The standby machine does not meet the conditions Disconnect, make sure one connection secures the standby.
updateTime This property is required. String
Update time.
userName This property is required. String
username.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.