tencentcloud.CynosdbAccount
Explore with Pulumi AI
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:
- Account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- Account
Password string - Password, with a length range of 8 to 64 characters.
- Cluster
Id string - Cluster ID.
- Host string
- main engine.
- Cynosdb
Account stringId - ID of the resource.
- Description string
- describe.
- Max
User doubleConnections - The maximum number of user connections cannot be greater than 10240.
- Account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- Account
Password string - Password, with a length range of 8 to 64 characters.
- Cluster
Id string - Cluster ID.
- Host string
- main engine.
- Cynosdb
Account stringId - ID of the resource.
- Description string
- describe.
- Max
User float64Connections - The maximum number of user connections cannot be greater than 10240.
- account
Name String - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password String - Password, with a length range of 8 to 64 characters.
- cluster
Id String - Cluster ID.
- host String
- main engine.
- cynosdb
Account StringId - ID of the resource.
- description String
- describe.
- max
User DoubleConnections - The maximum number of user connections cannot be greater than 10240.
- account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password string - Password, with a length range of 8 to 64 characters.
- cluster
Id string - Cluster ID.
- host string
- main engine.
- cynosdb
Account stringId - ID of the resource.
- description string
- describe.
- max
User numberConnections - 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_ strid - ID of the resource.
- description str
- describe.
- max_
user_ floatconnections - The maximum number of user connections cannot be greater than 10240.
- account
Name String - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password String - Password, with a length range of 8 to 64 characters.
- cluster
Id String - Cluster ID.
- host String
- main engine.
- cynosdb
Account StringId - ID of the resource.
- description String
- describe.
- max
User NumberConnections - 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.
- Account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- Account
Password string - Password, with a length range of 8 to 64 characters.
- Cluster
Id string - Cluster ID.
- Cynosdb
Account stringId - ID of the resource.
- Description string
- describe.
- Host string
- main engine.
- Max
User doubleConnections - The maximum number of user connections cannot be greater than 10240.
- Account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- Account
Password string - Password, with a length range of 8 to 64 characters.
- Cluster
Id string - Cluster ID.
- Cynosdb
Account stringId - ID of the resource.
- Description string
- describe.
- Host string
- main engine.
- Max
User float64Connections - The maximum number of user connections cannot be greater than 10240.
- account
Name String - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password String - Password, with a length range of 8 to 64 characters.
- cluster
Id String - Cluster ID.
- cynosdb
Account StringId - ID of the resource.
- description String
- describe.
- host String
- main engine.
- max
User DoubleConnections - The maximum number of user connections cannot be greater than 10240.
- account
Name string - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password string - Password, with a length range of 8 to 64 characters.
- cluster
Id string - Cluster ID.
- cynosdb
Account stringId - ID of the resource.
- description string
- describe.
- host string
- main engine.
- max
User numberConnections - 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_ strid - ID of the resource.
- description str
- describe.
- host str
- main engine.
- max_
user_ floatconnections - The maximum number of user connections cannot be greater than 10240.
- account
Name String - Account name, including alphanumeric _, Start with a letter, end with a letter or number, length 1-16.
- account
Password String - Password, with a length range of 8 to 64 characters.
- cluster
Id String - Cluster ID.
- cynosdb
Account StringId - ID of the resource.
- description String
- describe.
- host String
- main engine.
- max
User NumberConnections - 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.