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

tencentcloud.RedisAccount

Explore with Pulumi AI

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

    Provides a resource to create a redis account

    Example Usage

    Create RedisAccount Resource

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

    Constructor syntax

    new RedisAccount(name: string, args: RedisAccountArgs, opts?: CustomResourceOptions);
    @overload
    def RedisAccount(resource_name: str,
                     args: RedisAccountArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedisAccount(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     account_name: Optional[str] = None,
                     account_password: Optional[str] = None,
                     instance_id: Optional[str] = None,
                     privilege: Optional[str] = None,
                     readonly_policies: Optional[Sequence[str]] = None,
                     redis_account_id: Optional[str] = None,
                     remark: Optional[str] = None)
    func NewRedisAccount(ctx *Context, name string, args RedisAccountArgs, opts ...ResourceOption) (*RedisAccount, error)
    public RedisAccount(string name, RedisAccountArgs args, CustomResourceOptions? opts = null)
    public RedisAccount(String name, RedisAccountArgs args)
    public RedisAccount(String name, RedisAccountArgs args, CustomResourceOptions options)
    
    type: tencentcloud:RedisAccount
    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 RedisAccountArgs
    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 RedisAccountArgs
    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 RedisAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedisAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedisAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RedisAccount 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 RedisAccount resource accepts the following input properties:

    AccountName string
    The account name.
    AccountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    InstanceId string
    The ID of instance.
    Privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    ReadonlyPolicies List<string>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    RedisAccountId string
    ID of the resource.
    Remark string
    Remark.
    AccountName string
    The account name.
    AccountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    InstanceId string
    The ID of instance.
    Privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    ReadonlyPolicies []string
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    RedisAccountId string
    ID of the resource.
    Remark string
    Remark.
    accountName String
    The account name.
    accountPassword String
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId String
    The ID of instance.
    privilege String
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies List<String>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId String
    ID of the resource.
    remark String
    Remark.
    accountName string
    The account name.
    accountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId string
    The ID of instance.
    privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies string[]
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId string
    ID of the resource.
    remark string
    Remark.
    account_name str
    The account name.
    account_password str
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instance_id str
    The ID of instance.
    privilege str
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonly_policies Sequence[str]
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redis_account_id str
    ID of the resource.
    remark str
    Remark.
    accountName String
    The account name.
    accountPassword String
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId String
    The ID of instance.
    privilege String
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies List<String>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId String
    ID of the resource.
    remark String
    Remark.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RedisAccount 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 RedisAccount Resource

    Get an existing RedisAccount 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?: RedisAccountState, opts?: CustomResourceOptions): RedisAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            account_password: Optional[str] = None,
            instance_id: Optional[str] = None,
            privilege: Optional[str] = None,
            readonly_policies: Optional[Sequence[str]] = None,
            redis_account_id: Optional[str] = None,
            remark: Optional[str] = None) -> RedisAccount
    func GetRedisAccount(ctx *Context, name string, id IDInput, state *RedisAccountState, opts ...ResourceOption) (*RedisAccount, error)
    public static RedisAccount Get(string name, Input<string> id, RedisAccountState? state, CustomResourceOptions? opts = null)
    public static RedisAccount get(String name, Output<String> id, RedisAccountState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:RedisAccount    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
    The account name.
    AccountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    InstanceId string
    The ID of instance.
    Privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    ReadonlyPolicies List<string>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    RedisAccountId string
    ID of the resource.
    Remark string
    Remark.
    AccountName string
    The account name.
    AccountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    InstanceId string
    The ID of instance.
    Privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    ReadonlyPolicies []string
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    RedisAccountId string
    ID of the resource.
    Remark string
    Remark.
    accountName String
    The account name.
    accountPassword String
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId String
    The ID of instance.
    privilege String
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies List<String>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId String
    ID of the resource.
    remark String
    Remark.
    accountName string
    The account name.
    accountPassword string
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId string
    The ID of instance.
    privilege string
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies string[]
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId string
    ID of the resource.
    remark string
    Remark.
    account_name str
    The account name.
    account_password str
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instance_id str
    The ID of instance.
    privilege str
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonly_policies Sequence[str]
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redis_account_id str
    ID of the resource.
    remark str
    Remark.
    accountName String
    The account name.
    accountPassword String
    1: Length 8-30 digits, it is recommended to use a password of more than 12 digits; 2: Cannot start with /; 3: Include at least two items: a.Lowercase letters a-z; b.Uppercase letters A-Z c.Numbers 0-9; d.()~!@#$%^&*-+=_|{}[]:;<>,.?/`.
    instanceId String
    The ID of instance.
    privilege String
    Read and write policy: Enter R and RW to indicate read-only, read-write, cannot be empty when modifying operations.
    readonlyPolicies List<String>
    Routing policy: Enter master or replication, which indicates the master node or slave node, cannot be empty when modifying operations.
    redisAccountId String
    ID of the resource.
    remark String
    Remark.

    Import

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

    $ pulumi import tencentcloud:index/redisAccount:RedisAccount example crs-cqdfdzvt#tf_example
    

    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