1. Packages
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. redis
  6. Account
Viewing docs for bytepluscc v0.0.25
published on Thursday, May 7, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.25
published on Thursday, May 7, 2026 by Byteplus

    Redis Cache Database supports creating multiple accounts. You can select different roles when creating an account. Each role grants different permissions, helping you manage the database with greater precision and enhance data security.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const redisAccountDemo = new bytepluscc.redis.Account("RedisAccountDemo", {
        instanceId: "redis-mlrfiqivjttxxxxx",
        accountName: "ccapi_test_1",
        description: "this is a test",
        password: "******",
        roleName: "Administrator",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    redis_account_demo = bytepluscc.redis.Account("RedisAccountDemo",
        instance_id="redis-mlrfiqivjttxxxxx",
        account_name="ccapi_test_1",
        description="this is a test",
        password="******",
        role_name="Administrator")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/redis"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redis.NewAccount(ctx, "RedisAccountDemo", &redis.AccountArgs{
    			InstanceId:  pulumi.String("redis-mlrfiqivjttxxxxx"),
    			AccountName: pulumi.String("ccapi_test_1"),
    			Description: pulumi.String("this is a test"),
    			Password:    pulumi.String("******"),
    			RoleName:    pulumi.String("Administrator"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var redisAccountDemo = new Bytepluscc.Redis.Account("RedisAccountDemo", new()
        {
            InstanceId = "redis-mlrfiqivjttxxxxx",
            AccountName = "ccapi_test_1",
            Description = "this is a test",
            Password = "******",
            RoleName = "Administrator",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.redis.Account;
    import com.byteplus.bytepluscc.redis.AccountArgs;
    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 redisAccountDemo = new Account("redisAccountDemo", AccountArgs.builder()
                .instanceId("redis-mlrfiqivjttxxxxx")
                .accountName("ccapi_test_1")
                .description("this is a test")
                .password("******")
                .roleName("Administrator")
                .build());
    
        }
    }
    
    resources:
      redisAccountDemo:
        type: bytepluscc:redis:Account
        name: RedisAccountDemo
        properties:
          instanceId: redis-mlrfiqivjttxxxxx
          accountName: ccapi_test_1
          description: this is a test
          password: '******'
          roleName: Administrator
    

    Create Account Resource

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

    Constructor syntax

    new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                args: AccountArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_name: Optional[str] = None,
                instance_id: Optional[str] = None,
                password: Optional[str] = None,
                role_name: Optional[str] = None,
                description: Optional[str] = None)
    func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
    public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
    public Account(String name, AccountArgs args)
    public Account(String name, AccountArgs args, CustomResourceOptions options)
    
    type: bytepluscc:redis:Account
    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 AccountArgs
    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 AccountArgs
    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 AccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var byteplusccAccountResource = new Bytepluscc.Redis.Account("byteplusccAccountResource", new()
    {
        AccountName = "string",
        InstanceId = "string",
        Password = "string",
        RoleName = "string",
        Description = "string",
    });
    
    example, err := redis.NewAccount(ctx, "byteplusccAccountResource", &redis.AccountArgs{
    	AccountName: pulumi.String("string"),
    	InstanceId:  pulumi.String("string"),
    	Password:    pulumi.String("string"),
    	RoleName:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var byteplusccAccountResource = new com.byteplus.bytepluscc.redis.Account("byteplusccAccountResource", com.byteplus.bytepluscc.redis.AccountArgs.builder()
        .accountName("string")
        .instanceId("string")
        .password("string")
        .roleName("string")
        .description("string")
        .build());
    
    bytepluscc_account_resource = bytepluscc.redis.Account("byteplusccAccountResource",
        account_name="string",
        instance_id="string",
        password="string",
        role_name="string",
        description="string")
    
    const byteplusccAccountResource = new bytepluscc.redis.Account("byteplusccAccountResource", {
        accountName: "string",
        instanceId: "string",
        password: "string",
        roleName: "string",
        description: "string",
    });
    
    type: bytepluscc:redis:Account
    properties:
        accountName: string
        description: string
        instanceId: string
        password: string
        roleName: string
    

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

    AccountName string
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    InstanceId string
    Instance ID.
    Password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    RoleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    Description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    AccountName string
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    InstanceId string
    Instance ID.
    Password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    RoleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    Description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    accountName String
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    instanceId String
    Instance ID.
    password String
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName String
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    description String
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    accountName string
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    instanceId string
    Instance ID.
    password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    account_name str
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    instance_id str
    Instance ID.
    password str
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    role_name str
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    description str
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    accountName String
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    instanceId String
    Instance ID.
    password String
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName String
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    description String
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.

    Outputs

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

    AccountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    Id string
    The provider-assigned unique ID for this managed resource.
    AccountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    Id string
    The provider-assigned unique ID for this managed resource.
    accountStatus String
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    id String
    The provider-assigned unique ID for this managed resource.
    accountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    id string
    The provider-assigned unique ID for this managed resource.
    account_status str
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    id str
    The provider-assigned unique ID for this managed resource.
    accountStatus String
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Account Resource

    Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            account_status: Optional[str] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            password: Optional[str] = None,
            role_name: Optional[str] = None) -> Account
    func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
    public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
    public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:redis:Account    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. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    AccountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    Description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    InstanceId string
    Instance ID.
    Password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    RoleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    AccountName string
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    AccountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    Description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    InstanceId string
    Instance ID.
    Password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    RoleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    accountName String
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    accountStatus String
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    description String
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    instanceId String
    Instance ID.
    password String
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName String
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    accountName string
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    accountStatus string
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    description string
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    instanceId string
    Instance ID.
    password string
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName string
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    account_name str
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    account_status str
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    description str
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    instance_id str
    Instance ID.
    password str
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    role_name str
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.
    accountName String
    Account name. The name must meet the following requirements: It must start with a lowercase letter. It must end with a lowercase letter or number. The length must be 2–16 characters. It can only contain lowercase letters, numbers, and underscores (_).
    accountStatus String
    Account status. The value range is as follows: Available: Available. Unavailable: Unavailable.
    description String
    Account description, up to 256 characters. Note: If this parameter is empty, no account description is set.
    instanceId String
    Instance ID.
    password String
    Account password. The password must meet the following requirements: Length of 8–32 characters. Must include at least two of the following: uppercase letters, lowercase letters, numbers, or special characters. Supported special characters: ()`~!@#$%^&*-+=_|{}[];<>,.?
    roleName String
    Account role. The following default roles are supported: Administrator: Allows all Redis instance-supported commands on all Keys. ReadWrite: Allows all commands except admin class commands on all Keys. ReadOnly: Allows all read class commands on all Keys. NotDangerous: Allows all commands except dangerous class commands on all Keys. Note: For details on the specific commands supported by each role's ACL rules, see ACL syntax.

    Import

    $ pulumi import bytepluscc:redis/account:Account example "instance_id|account_name"
    

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.25
    published on Thursday, May 7, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.