1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Redis
  5. RedisClusterAttachOciCacheUser
Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi

oci.Redis.RedisClusterAttachOciCacheUser

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi

    This resource provides the Redis Cluster Attach Oci Cache User resource in Oracle Cloud Infrastructure Redis service.

    Attach existing Oracle Cloud Infrastructure cache users to a redis cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRedisClusterAttachOciCacheUser = new oci.redis.RedisClusterAttachOciCacheUser("test_redis_cluster_attach_oci_cache_user", {
        ociCacheUsers: redisClusterAttachOciCacheUserOciCacheUsers,
        redisClusterId: testRedisCluster.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_redis_cluster_attach_oci_cache_user = oci.redis.RedisClusterAttachOciCacheUser("test_redis_cluster_attach_oci_cache_user",
        oci_cache_users=redis_cluster_attach_oci_cache_user_oci_cache_users,
        redis_cluster_id=test_redis_cluster["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/redis"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redis.NewRedisClusterAttachOciCacheUser(ctx, "test_redis_cluster_attach_oci_cache_user", &redis.RedisClusterAttachOciCacheUserArgs{
    			OciCacheUsers:  pulumi.Any(redisClusterAttachOciCacheUserOciCacheUsers),
    			RedisClusterId: pulumi.Any(testRedisCluster.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testRedisClusterAttachOciCacheUser = new Oci.Redis.RedisClusterAttachOciCacheUser("test_redis_cluster_attach_oci_cache_user", new()
        {
            OciCacheUsers = redisClusterAttachOciCacheUserOciCacheUsers,
            RedisClusterId = testRedisCluster.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Redis.RedisClusterAttachOciCacheUser;
    import com.pulumi.oci.Redis.RedisClusterAttachOciCacheUserArgs;
    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 testRedisClusterAttachOciCacheUser = new RedisClusterAttachOciCacheUser("testRedisClusterAttachOciCacheUser", RedisClusterAttachOciCacheUserArgs.builder()
                .ociCacheUsers(redisClusterAttachOciCacheUserOciCacheUsers)
                .redisClusterId(testRedisCluster.id())
                .build());
    
        }
    }
    
    resources:
      testRedisClusterAttachOciCacheUser:
        type: oci:Redis:RedisClusterAttachOciCacheUser
        name: test_redis_cluster_attach_oci_cache_user
        properties:
          ociCacheUsers: ${redisClusterAttachOciCacheUserOciCacheUsers}
          redisClusterId: ${testRedisCluster.id}
    

    Create RedisClusterAttachOciCacheUser Resource

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

    Constructor syntax

    new RedisClusterAttachOciCacheUser(name: string, args: RedisClusterAttachOciCacheUserArgs, opts?: CustomResourceOptions);
    @overload
    def RedisClusterAttachOciCacheUser(resource_name: str,
                                       args: RedisClusterAttachOciCacheUserArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedisClusterAttachOciCacheUser(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       oci_cache_users: Optional[Sequence[str]] = None,
                                       redis_cluster_id: Optional[str] = None)
    func NewRedisClusterAttachOciCacheUser(ctx *Context, name string, args RedisClusterAttachOciCacheUserArgs, opts ...ResourceOption) (*RedisClusterAttachOciCacheUser, error)
    public RedisClusterAttachOciCacheUser(string name, RedisClusterAttachOciCacheUserArgs args, CustomResourceOptions? opts = null)
    public RedisClusterAttachOciCacheUser(String name, RedisClusterAttachOciCacheUserArgs args)
    public RedisClusterAttachOciCacheUser(String name, RedisClusterAttachOciCacheUserArgs args, CustomResourceOptions options)
    
    type: oci:Redis:RedisClusterAttachOciCacheUser
    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 RedisClusterAttachOciCacheUserArgs
    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 RedisClusterAttachOciCacheUserArgs
    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 RedisClusterAttachOciCacheUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedisClusterAttachOciCacheUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedisClusterAttachOciCacheUserArgs
    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 redisClusterAttachOciCacheUserResource = new Oci.Redis.RedisClusterAttachOciCacheUser("redisClusterAttachOciCacheUserResource", new()
    {
        OciCacheUsers = new[]
        {
            "string",
        },
        RedisClusterId = "string",
    });
    
    example, err := redis.NewRedisClusterAttachOciCacheUser(ctx, "redisClusterAttachOciCacheUserResource", &redis.RedisClusterAttachOciCacheUserArgs{
    	OciCacheUsers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RedisClusterId: pulumi.String("string"),
    })
    
    var redisClusterAttachOciCacheUserResource = new RedisClusterAttachOciCacheUser("redisClusterAttachOciCacheUserResource", RedisClusterAttachOciCacheUserArgs.builder()
        .ociCacheUsers("string")
        .redisClusterId("string")
        .build());
    
    redis_cluster_attach_oci_cache_user_resource = oci.redis.RedisClusterAttachOciCacheUser("redisClusterAttachOciCacheUserResource",
        oci_cache_users=["string"],
        redis_cluster_id="string")
    
    const redisClusterAttachOciCacheUserResource = new oci.redis.RedisClusterAttachOciCacheUser("redisClusterAttachOciCacheUserResource", {
        ociCacheUsers: ["string"],
        redisClusterId: "string",
    });
    
    type: oci:Redis:RedisClusterAttachOciCacheUser
    properties:
        ociCacheUsers:
            - string
        redisClusterId: string
    

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

    OciCacheUsers List<string>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    RedisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    OciCacheUsers []string
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    RedisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers List<String>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId String

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers string[]
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    oci_cache_users Sequence[str]
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redis_cluster_id str

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers List<String>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId String

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

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

    Get an existing RedisClusterAttachOciCacheUser 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?: RedisClusterAttachOciCacheUserState, opts?: CustomResourceOptions): RedisClusterAttachOciCacheUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            oci_cache_users: Optional[Sequence[str]] = None,
            redis_cluster_id: Optional[str] = None) -> RedisClusterAttachOciCacheUser
    func GetRedisClusterAttachOciCacheUser(ctx *Context, name string, id IDInput, state *RedisClusterAttachOciCacheUserState, opts ...ResourceOption) (*RedisClusterAttachOciCacheUser, error)
    public static RedisClusterAttachOciCacheUser Get(string name, Input<string> id, RedisClusterAttachOciCacheUserState? state, CustomResourceOptions? opts = null)
    public static RedisClusterAttachOciCacheUser get(String name, Output<String> id, RedisClusterAttachOciCacheUserState state, CustomResourceOptions options)
    resources:  _:    type: oci:Redis:RedisClusterAttachOciCacheUser    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:
    OciCacheUsers List<string>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    RedisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    OciCacheUsers []string
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    RedisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers List<String>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId String

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers string[]
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId string

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    oci_cache_users Sequence[str]
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redis_cluster_id str

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ociCacheUsers List<String>
    List of Oracle Cloud Infrastructure cache user unique IDs (OCIDs).
    redisClusterId String

    The OCID of the cluster.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Import is not supported for this resource.

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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.3.0 published on Thursday, Jul 17, 2025 by Pulumi