tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getMariadbAccounts
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
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",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
accounts = tencentcloud.get_mariadb_accounts(instance_id="tdsql-4pzs5b67")
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
})
}
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",
});
});
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());
}
}
variables:
accounts:
fn::invoke:
function: tencentcloud:getMariadbAccounts
arguments:
instanceId: tdsql-4pzs5b67
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>
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]
func GetMariadbAccounts(ctx *Context, args *GetMariadbAccountsArgs, opts ...InvokeOption) (*GetMariadbAccountsResult, error)
func GetMariadbAccountsOutput(ctx *Context, args *GetMariadbAccountsOutputArgs, opts ...InvokeOption) GetMariadbAccountsResultOutput
> 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)
}
public static CompletableFuture<GetMariadbAccountsResult> getMariadbAccounts(GetMariadbAccountsArgs args, InvokeOptions options)
public static Output<GetMariadbAccountsResult> getMariadbAccounts(GetMariadbAccountsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getMariadbAccounts:getMariadbAccounts
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - instance id.
- Id string
- Result
Output stringFile - Used to save results.
- Instance
Id string - instance id.
- Id string
- Result
Output stringFile - Used to save results.
- instance
Id String - instance id.
- id String
- result
Output StringFile - Used to save results.
- instance
Id string - instance id.
- id string
- result
Output stringFile - Used to save results.
- instance_
id str - instance id.
- id str
- result_
output_ strfile - Used to save results.
- instance
Id String - instance id.
- id String
- result
Output StringFile - Used to save results.
getMariadbAccounts Result
The following output properties are available:
- Id string
- Instance
Id string - Lists
List<Get
Mariadb Accounts List> - account list.
- Result
Output stringFile
- Id string
- Instance
Id string - Lists
[]Get
Mariadb Accounts List - account list.
- Result
Output stringFile
- id String
- instance
Id String - lists
List<Get
Mariadb Accounts List> - account list.
- result
Output StringFile
- id string
- instance
Id string - lists
Get
Mariadb Accounts List[] - account list.
- result
Output stringFile
- id str
- instance_
id str - lists
Sequence[Get
Mariadb Accounts List] - account list.
- result_
output_ strfile
- id String
- instance
Id String - lists List<Property Map>
- account list.
- result
Output StringFile
Supporting Types
GetMariadbAccountsList
- Create
Time string - creation time.
- Delay
Thresh 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 string
- User remarks.
- Host 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 %).
- Read
Only 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. - Slave
Const 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. - Update
Time string - Update time.
- User
Name string - username.
- Create
Time string - creation time.
- Delay
Thresh 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 string
- User remarks.
- Host 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 %).
- Read
Only 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. - Slave
Const 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. - Update
Time string - Update time.
- User
Name string - username.
- create
Time String - creation time.
- delay
Thresh 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 String
- User remarks.
- host 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 %).
- read
Only 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. - slave
Const 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. - update
Time String - Update time.
- user
Name String - username.
- create
Time string - creation time.
- delay
Thresh 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 string
- User remarks.
- host 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 %).
- read
Only 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. - slave
Const 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. - update
Time string - Update time.
- user
Name string - username.
- create_
time str - creation time.
- delay_
thresh 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 str
- User remarks.
- host 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 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 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 str - Update time.
- user_
name str - username.
- create
Time String - creation time.
- delay
Thresh 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 String
- User remarks.
- host 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 %).
- read
Only 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. - slave
Const 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. - update
Time String - Update time.
- user
Name String - username.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack