tencentcloud.DcdbAccount
Explore with Pulumi AI
Provides a resource to create a dcdb account
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const account = new tencentcloud.DcdbAccount("account", {
description: "this is a test account",
host: "127.0.0.1",
instanceId: "tdsqlshard-kkpoxvnv",
maxUserConnections: 10,
password: "===password===",
readOnly: 0,
userName: "mysql",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
account = tencentcloud.DcdbAccount("account",
description="this is a test account",
host="127.0.0.1",
instance_id="tdsqlshard-kkpoxvnv",
max_user_connections=10,
password="===password===",
read_only=0,
user_name="mysql")
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.NewDcdbAccount(ctx, "account", &tencentcloud.DcdbAccountArgs{
Description: pulumi.String("this is a test account"),
Host: pulumi.String("127.0.0.1"),
InstanceId: pulumi.String("tdsqlshard-kkpoxvnv"),
MaxUserConnections: pulumi.Float64(10),
Password: pulumi.String("===password==="),
ReadOnly: pulumi.Float64(0),
UserName: pulumi.String("mysql"),
})
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.DcdbAccount("account", new()
{
Description = "this is a test account",
Host = "127.0.0.1",
InstanceId = "tdsqlshard-kkpoxvnv",
MaxUserConnections = 10,
Password = "===password===",
ReadOnly = 0,
UserName = "mysql",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DcdbAccount;
import com.pulumi.tencentcloud.DcdbAccountArgs;
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 DcdbAccount("account", DcdbAccountArgs.builder()
.description("this is a test account")
.host("127.0.0.1")
.instanceId("tdsqlshard-kkpoxvnv")
.maxUserConnections(10)
.password("===password===")
.readOnly(0)
.userName("mysql")
.build());
}
}
resources:
account:
type: tencentcloud:DcdbAccount
properties:
description: this is a test account
host: 127.0.0.1
instanceId: tdsqlshard-kkpoxvnv
maxUserConnections: 10
password: ===password===
readOnly: 0
userName: mysql
Create DcdbAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcdbAccount(name: string, args: DcdbAccountArgs, opts?: CustomResourceOptions);
@overload
def DcdbAccount(resource_name: str,
args: DcdbAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcdbAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
host: Optional[str] = None,
instance_id: Optional[str] = None,
password: Optional[str] = None,
user_name: Optional[str] = None,
dcdb_account_id: Optional[str] = None,
description: Optional[str] = None,
max_user_connections: Optional[float] = None,
read_only: Optional[float] = None)
func NewDcdbAccount(ctx *Context, name string, args DcdbAccountArgs, opts ...ResourceOption) (*DcdbAccount, error)
public DcdbAccount(string name, DcdbAccountArgs args, CustomResourceOptions? opts = null)
public DcdbAccount(String name, DcdbAccountArgs args)
public DcdbAccount(String name, DcdbAccountArgs args, CustomResourceOptions options)
type: tencentcloud:DcdbAccount
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 DcdbAccountArgs
- 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 DcdbAccountArgs
- 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 DcdbAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcdbAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcdbAccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DcdbAccount 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 DcdbAccount resource accepts the following input properties:
- Host string
- db host.
- Instance
Id string - instance id.
- Password string
- password.
- User
Name string - account name.
- Dcdb
Account stringId - ID of the resource.
- Description string
- description for account.
- Max
User doubleConnections - max user connections.
- Read
Only double - whether the account is readonly. 0 means not a readonly account.
- Host string
- db host.
- Instance
Id string - instance id.
- Password string
- password.
- User
Name string - account name.
- Dcdb
Account stringId - ID of the resource.
- Description string
- description for account.
- Max
User float64Connections - max user connections.
- Read
Only float64 - whether the account is readonly. 0 means not a readonly account.
- host String
- db host.
- instance
Id String - instance id.
- password String
- password.
- user
Name String - account name.
- dcdb
Account StringId - ID of the resource.
- description String
- description for account.
- max
User DoubleConnections - max user connections.
- read
Only Double - whether the account is readonly. 0 means not a readonly account.
- host string
- db host.
- instance
Id string - instance id.
- password string
- password.
- user
Name string - account name.
- dcdb
Account stringId - ID of the resource.
- description string
- description for account.
- max
User numberConnections - max user connections.
- read
Only number - whether the account is readonly. 0 means not a readonly account.
- host str
- db host.
- instance_
id str - instance id.
- password str
- password.
- user_
name str - account name.
- dcdb_
account_ strid - ID of the resource.
- description str
- description for account.
- max_
user_ floatconnections - max user connections.
- read_
only float - whether the account is readonly. 0 means not a readonly account.
- host String
- db host.
- instance
Id String - instance id.
- password String
- password.
- user
Name String - account name.
- dcdb
Account StringId - ID of the resource.
- description String
- description for account.
- max
User NumberConnections - max user connections.
- read
Only Number - whether the account is readonly. 0 means not a readonly account.
Outputs
All input properties are implicitly available as output properties. Additionally, the DcdbAccount 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 DcdbAccount Resource
Get an existing DcdbAccount 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?: DcdbAccountState, opts?: CustomResourceOptions): DcdbAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dcdb_account_id: Optional[str] = None,
description: Optional[str] = None,
host: Optional[str] = None,
instance_id: Optional[str] = None,
max_user_connections: Optional[float] = None,
password: Optional[str] = None,
read_only: Optional[float] = None,
user_name: Optional[str] = None) -> DcdbAccount
func GetDcdbAccount(ctx *Context, name string, id IDInput, state *DcdbAccountState, opts ...ResourceOption) (*DcdbAccount, error)
public static DcdbAccount Get(string name, Input<string> id, DcdbAccountState? state, CustomResourceOptions? opts = null)
public static DcdbAccount get(String name, Output<String> id, DcdbAccountState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DcdbAccount 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.
- Dcdb
Account stringId - ID of the resource.
- Description string
- description for account.
- Host string
- db host.
- Instance
Id string - instance id.
- Max
User doubleConnections - max user connections.
- Password string
- password.
- Read
Only double - whether the account is readonly. 0 means not a readonly account.
- User
Name string - account name.
- Dcdb
Account stringId - ID of the resource.
- Description string
- description for account.
- Host string
- db host.
- Instance
Id string - instance id.
- Max
User float64Connections - max user connections.
- Password string
- password.
- Read
Only float64 - whether the account is readonly. 0 means not a readonly account.
- User
Name string - account name.
- dcdb
Account StringId - ID of the resource.
- description String
- description for account.
- host String
- db host.
- instance
Id String - instance id.
- max
User DoubleConnections - max user connections.
- password String
- password.
- read
Only Double - whether the account is readonly. 0 means not a readonly account.
- user
Name String - account name.
- dcdb
Account stringId - ID of the resource.
- description string
- description for account.
- host string
- db host.
- instance
Id string - instance id.
- max
User numberConnections - max user connections.
- password string
- password.
- read
Only number - whether the account is readonly. 0 means not a readonly account.
- user
Name string - account name.
- dcdb_
account_ strid - ID of the resource.
- description str
- description for account.
- host str
- db host.
- instance_
id str - instance id.
- max_
user_ floatconnections - max user connections.
- password str
- password.
- read_
only float - whether the account is readonly. 0 means not a readonly account.
- user_
name str - account name.
- dcdb
Account StringId - ID of the resource.
- description String
- description for account.
- host String
- db host.
- instance
Id String - instance id.
- max
User NumberConnections - max user connections.
- password String
- password.
- read
Only Number - whether the account is readonly. 0 means not a readonly account.
- user
Name String - account name.
Import
dcdb account can be imported using the id, e.g.
$ pulumi import tencentcloud:index/dcdbAccount:DcdbAccount 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.