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

tencentcloud.getMariadbAccounts

Explore with Pulumi AI

tencentcloud logo
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:

    InstanceId string
    instance id.
    Id string
    ResultOutputFile string
    Used to save results.
    InstanceId string
    instance id.
    Id string
    ResultOutputFile string
    Used to save results.
    instanceId String
    instance id.
    id String
    resultOutputFile String
    Used to save results.
    instanceId string
    instance id.
    id string
    resultOutputFile string
    Used to save results.
    instance_id str
    instance id.
    id str
    result_output_file str
    Used to save results.
    instanceId 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 string
    creation time.
    DelayThresh 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 %).
    ReadOnly 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 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 string
    Update time.
    UserName string
    username.
    CreateTime string
    creation time.
    DelayThresh 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 %).
    ReadOnly 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 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 string
    Update time.
    UserName string
    username.
    createTime String
    creation time.
    delayThresh 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 %).
    readOnly 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 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 String
    Update time.
    userName String
    username.
    createTime string
    creation time.
    delayThresh 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 %).
    readOnly 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 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 string
    Update time.
    userName 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.
    createTime String
    creation time.
    delayThresh 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 %).
    readOnly 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 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 String
    Update time.
    userName String
    username.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack