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

tencentcloud.getDcdbAccounts

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 dcdb accounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = tencentcloud.getDcdbAccounts({
        instanceId: tencentcloud_dcdb_account.foo.instance_id,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.get_dcdb_accounts(instance_id=tencentcloud_dcdb_account["foo"]["instance_id"])
    
    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.GetDcdbAccounts(ctx, &tencentcloud.GetDcdbAccountsArgs{
    			InstanceId: tencentcloud_dcdb_account.Foo.Instance_id,
    		}, 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 foo = Tencentcloud.GetDcdbAccounts.Invoke(new()
        {
            InstanceId = tencentcloud_dcdb_account.Foo.Instance_id,
        });
    
    });
    
    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.GetDcdbAccountsArgs;
    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 foo = TencentcloudFunctions.getDcdbAccounts(GetDcdbAccountsArgs.builder()
                .instanceId(tencentcloud_dcdb_account.foo().instance_id())
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: tencentcloud:getDcdbAccounts
          arguments:
            instanceId: ${tencentcloud_dcdb_account.foo.instance_id}
    

    Using getDcdbAccounts

    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 getDcdbAccounts(args: GetDcdbAccountsArgs, opts?: InvokeOptions): Promise<GetDcdbAccountsResult>
    function getDcdbAccountsOutput(args: GetDcdbAccountsOutputArgs, opts?: InvokeOptions): Output<GetDcdbAccountsResult>
    def get_dcdb_accounts(id: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          result_output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDcdbAccountsResult
    def get_dcdb_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[GetDcdbAccountsResult]
    func GetDcdbAccounts(ctx *Context, args *GetDcdbAccountsArgs, opts ...InvokeOption) (*GetDcdbAccountsResult, error)
    func GetDcdbAccountsOutput(ctx *Context, args *GetDcdbAccountsOutputArgs, opts ...InvokeOption) GetDcdbAccountsResultOutput

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

    public static class GetDcdbAccounts 
    {
        public static Task<GetDcdbAccountsResult> InvokeAsync(GetDcdbAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetDcdbAccountsResult> Invoke(GetDcdbAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDcdbAccountsResult> getDcdbAccounts(GetDcdbAccountsArgs args, InvokeOptions options)
    public static Output<GetDcdbAccountsResult> getDcdbAccounts(GetDcdbAccountsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDcdbAccounts:getDcdbAccounts
      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.

    getDcdbAccounts Result

    The following output properties are available:

    Id string
    InstanceId string
    Lists List<GetDcdbAccountsList>
    Cloud database account information.
    ResultOutputFile string
    Id string
    InstanceId string
    Lists []GetDcdbAccountsList
    Cloud database account information.
    ResultOutputFile string
    id String
    instanceId String
    lists List<GetDcdbAccountsList>
    Cloud database account information.
    resultOutputFile String
    id string
    instanceId string
    lists GetDcdbAccountsList[]
    Cloud database account information.
    resultOutputFile string
    id str
    instance_id str
    lists Sequence[GetDcdbAccountsList]
    Cloud database account information.
    result_output_file str
    id String
    instanceId String
    lists List<Property Map>
    Cloud database account information.
    resultOutputFile String

    Supporting Types

    GetDcdbAccountsList

    CreateTime string
    Creation time.
    DelayThresh double
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    Description string
    User remarks info.
    Host string
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    UpdateTime string
    Last update time.
    UserName string
    User Name.
    CreateTime string
    Creation time.
    DelayThresh float64
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    Description string
    User remarks info.
    Host string
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    UpdateTime string
    Last update time.
    UserName string
    User Name.
    createTime String
    Creation time.
    delayThresh Double
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    description String
    User remarks info.
    host String
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    updateTime String
    Last update time.
    userName String
    User Name.
    createTime string
    Creation time.
    delayThresh number
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    description string
    User remarks info.
    host string
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    updateTime string
    Last update time.
    userName string
    User Name.
    create_time str
    Creation time.
    delay_thresh float
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    description str
    User remarks info.
    host str
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    update_time str
    Last update time.
    user_name str
    User Name.
    createTime String
    Creation time.
    delayThresh Number
    If the standby machine delay exceeds the setting value of this parameter, the system will consider that the standby machine is faulty and recommend that the parameter value be greater than 10. This parameter takes effect when ReadOnly selects 1 and 2.
    description String
    User remarks info.
    host String
    From which host the user can log in (corresponding to the host field of MySQL users, UserName + Host uniquely identifies a user, in the form of IP, 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 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 the policy whether to fix the standby machine, 0: not fix the standby machine, that is, the standby machine will not disconnect from the client if it does not meet the conditions, the Proxy selects other available standby machines, 1: the standby machine will be disconnected if the conditions are not met, Make sure a connection is secured to the standby machine.
    updateTime String
    Last update time.
    userName String
    User Name.

    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