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

tencentcloud.CynosdbAccount

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cynosdb account

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const account = new tencentcloud.CynosdbAccount("account", {
        accountName: "terraform_test",
        accountPassword: "Password@1234",
        clusterId: "cynosdbmysql-bws8h88b",
        description: "terraform test",
        host: "%",
        maxUserConnections: 2,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    account = tencentcloud.CynosdbAccount("account",
        account_name="terraform_test",
        account_password="Password@1234",
        cluster_id="cynosdbmysql-bws8h88b",
        description="terraform test",
        host="%",
        max_user_connections=2)
    
    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.NewCynosdbAccount(ctx, "account", &tencentcloud.CynosdbAccountArgs{
    			AccountName:        pulumi.String("terraform_test"),
    			AccountPassword:    pulumi.String("Password@1234"),
    			ClusterId:          pulumi.String("cynosdbmysql-bws8h88b"),
    			Description:        pulumi.String("terraform test"),
    			Host:               pulumi.String("%"),
    			MaxUserConnections: pulumi.Float64(2),
    		})
    		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 account = new Tencentcloud.CynosdbAccount("account", new()
        {
            AccountName = "terraform_test",
            AccountPassword = "Password@1234",
            ClusterId = "cynosdbmysql-bws8h88b",
            Description = "terraform test",
            Host = "%",
            MaxUserConnections = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CynosdbAccount;
    import com.pulumi.tencentcloud.CynosdbAccountArgs;
    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) {
            var account = new CynosdbAccount("account", CynosdbAccountArgs.builder()
                .accountName("terraform_test")
                .accountPassword("Password@1234")
                .clusterId("cynosdbmysql-bws8h88b")
                .description("terraform test")
                .host("%")
                .maxUserConnections(2)
                .build());
    
        }
    }
    
    resources:
      account:
        type: tencentcloud:CynosdbAccount
        properties:
          accountName: terraform_test
          accountPassword: Password@1234
          clusterId: cynosdbmysql-bws8h88b
          description: terraform test
          host: '%'
          maxUserConnections: 2
    

    Create CynosdbAccount Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CynosdbAccount(name: string, args: CynosdbAccountArgs, opts?: CustomResourceOptions);
    @overload
    def CynosdbAccount(resource_name: str,
                       args: CynosdbAccountArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CynosdbAccount(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       account_name: Optional[str] = None,
                       account_password: Optional[str] = None,
                       cluster_id: Optional[str] = None,
                       host: Optional[str] = None,
                       cynosdb_account_id: Optional[str] = None,
                       description: Optional[str] = None,
                       max_user_connections: Optional[float] = None)
    func NewCynosdbAccount(ctx *Context, name string, args CynosdbAccountArgs, opts ...ResourceOption) (*CynosdbAccount, error)
    public CynosdbAccount(string name, CynosdbAccountArgs args, CustomResourceOptions? opts = null)
    public CynosdbAccount(String name, CynosdbAccountArgs args)
    public CynosdbAccount(String name, CynosdbAccountArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CynosdbAccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CynosdbAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CynosdbAccountArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CynosdbAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CynosdbAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CynosdbAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CynosdbAccount Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CynosdbAccount resource accepts the following input properties:

    AccountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    AccountPassword string
    Password, with a length range of 8 to 64 characters.
    ClusterId string
    Cluster ID.
    Host string
    main engine.
    CynosdbAccountId string
    ID of the resource.
    Description string
    describe.
    MaxUserConnections double
    The maximum number of user connections cannot be greater than 10240.
    AccountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    AccountPassword string
    Password, with a length range of 8 to 64 characters.
    ClusterId string
    Cluster ID.
    Host string
    main engine.
    CynosdbAccountId string
    ID of the resource.
    Description string
    describe.
    MaxUserConnections float64
    The maximum number of user connections cannot be greater than 10240.
    accountName String
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword String
    Password, with a length range of 8 to 64 characters.
    clusterId String
    Cluster ID.
    host String
    main engine.
    cynosdbAccountId String
    ID of the resource.
    description String
    describe.
    maxUserConnections Double
    The maximum number of user connections cannot be greater than 10240.
    accountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword string
    Password, with a length range of 8 to 64 characters.
    clusterId string
    Cluster ID.
    host string
    main engine.
    cynosdbAccountId string
    ID of the resource.
    description string
    describe.
    maxUserConnections number
    The maximum number of user connections cannot be greater than 10240.
    account_name str
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    account_password str
    Password, with a length range of 8 to 64 characters.
    cluster_id str
    Cluster ID.
    host str
    main engine.
    cynosdb_account_id str
    ID of the resource.
    description str
    describe.
    max_user_connections float
    The maximum number of user connections cannot be greater than 10240.
    accountName String
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword String
    Password, with a length range of 8 to 64 characters.
    clusterId String
    Cluster ID.
    host String
    main engine.
    cynosdbAccountId String
    ID of the resource.
    description String
    describe.
    maxUserConnections Number
    The maximum number of user connections cannot be greater than 10240.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CynosdbAccount resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CynosdbAccount Resource

    Get an existing CynosdbAccount resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CynosdbAccountState, opts?: CustomResourceOptions): CynosdbAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            account_password: Optional[str] = None,
            cluster_id: Optional[str] = None,
            cynosdb_account_id: Optional[str] = None,
            description: Optional[str] = None,
            host: Optional[str] = None,
            max_user_connections: Optional[float] = None) -> CynosdbAccount
    func GetCynosdbAccount(ctx *Context, name string, id IDInput, state *CynosdbAccountState, opts ...ResourceOption) (*CynosdbAccount, error)
    public static CynosdbAccount Get(string name, Input<string> id, CynosdbAccountState? state, CustomResourceOptions? opts = null)
    public static CynosdbAccount get(String name, Output<String> id, CynosdbAccountState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CynosdbAccount    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    AccountPassword string
    Password, with a length range of 8 to 64 characters.
    ClusterId string
    Cluster ID.
    CynosdbAccountId string
    ID of the resource.
    Description string
    describe.
    Host string
    main engine.
    MaxUserConnections double
    The maximum number of user connections cannot be greater than 10240.
    AccountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    AccountPassword string
    Password, with a length range of 8 to 64 characters.
    ClusterId string
    Cluster ID.
    CynosdbAccountId string
    ID of the resource.
    Description string
    describe.
    Host string
    main engine.
    MaxUserConnections float64
    The maximum number of user connections cannot be greater than 10240.
    accountName String
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword String
    Password, with a length range of 8 to 64 characters.
    clusterId String
    Cluster ID.
    cynosdbAccountId String
    ID of the resource.
    description String
    describe.
    host String
    main engine.
    maxUserConnections Double
    The maximum number of user connections cannot be greater than 10240.
    accountName string
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword string
    Password, with a length range of 8 to 64 characters.
    clusterId string
    Cluster ID.
    cynosdbAccountId string
    ID of the resource.
    description string
    describe.
    host string
    main engine.
    maxUserConnections number
    The maximum number of user connections cannot be greater than 10240.
    account_name str
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    account_password str
    Password, with a length range of 8 to 64 characters.
    cluster_id str
    Cluster ID.
    cynosdb_account_id str
    ID of the resource.
    description str
    describe.
    host str
    main engine.
    max_user_connections float
    The maximum number of user connections cannot be greater than 10240.
    accountName String
    Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
    accountPassword String
    Password, with a length range of 8 to 64 characters.
    clusterId String
    Cluster ID.
    cynosdbAccountId String
    ID of the resource.
    description String
    describe.
    host String
    main engine.
    maxUserConnections Number
    The maximum number of user connections cannot be greater than 10240.

    Import

    cynosdb account can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/cynosdbAccount:CynosdbAccount account account_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    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