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

oci.Redis.OciCacheUserGetRedisCluster

Explore with Pulumi AI

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

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

    Gets a list of associated redis cluster for an Oracle Cloud Infrastructure cache user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOciCacheUserGetRedisCluster = new oci.redis.OciCacheUserGetRedisCluster("test_oci_cache_user_get_redis_cluster", {
        ociCacheUserId: testOciCacheUser.id,
        compartmentId: compartmentId,
        displayName: ociCacheUserGetRedisClusterDisplayName,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_oci_cache_user_get_redis_cluster = oci.redis.OciCacheUserGetRedisCluster("test_oci_cache_user_get_redis_cluster",
        oci_cache_user_id=test_oci_cache_user["id"],
        compartment_id=compartment_id,
        display_name=oci_cache_user_get_redis_cluster_display_name)
    
    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.NewOciCacheUserGetRedisCluster(ctx, "test_oci_cache_user_get_redis_cluster", &redis.OciCacheUserGetRedisClusterArgs{
    			OciCacheUserId: pulumi.Any(testOciCacheUser.Id),
    			CompartmentId:  pulumi.Any(compartmentId),
    			DisplayName:    pulumi.Any(ociCacheUserGetRedisClusterDisplayName),
    		})
    		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 testOciCacheUserGetRedisCluster = new Oci.Redis.OciCacheUserGetRedisCluster("test_oci_cache_user_get_redis_cluster", new()
        {
            OciCacheUserId = testOciCacheUser.Id,
            CompartmentId = compartmentId,
            DisplayName = ociCacheUserGetRedisClusterDisplayName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Redis.OciCacheUserGetRedisCluster;
    import com.pulumi.oci.Redis.OciCacheUserGetRedisClusterArgs;
    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 testOciCacheUserGetRedisCluster = new OciCacheUserGetRedisCluster("testOciCacheUserGetRedisCluster", OciCacheUserGetRedisClusterArgs.builder()
                .ociCacheUserId(testOciCacheUser.id())
                .compartmentId(compartmentId)
                .displayName(ociCacheUserGetRedisClusterDisplayName)
                .build());
    
        }
    }
    
    resources:
      testOciCacheUserGetRedisCluster:
        type: oci:Redis:OciCacheUserGetRedisCluster
        name: test_oci_cache_user_get_redis_cluster
        properties:
          ociCacheUserId: ${testOciCacheUser.id}
          compartmentId: ${compartmentId}
          displayName: ${ociCacheUserGetRedisClusterDisplayName}
    

    Create OciCacheUserGetRedisCluster Resource

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

    Constructor syntax

    new OciCacheUserGetRedisCluster(name: string, args: OciCacheUserGetRedisClusterArgs, opts?: CustomResourceOptions);
    @overload
    def OciCacheUserGetRedisCluster(resource_name: str,
                                    args: OciCacheUserGetRedisClusterArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def OciCacheUserGetRedisCluster(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    oci_cache_user_id: Optional[str] = None,
                                    compartment_id: Optional[str] = None,
                                    display_name: Optional[str] = None)
    func NewOciCacheUserGetRedisCluster(ctx *Context, name string, args OciCacheUserGetRedisClusterArgs, opts ...ResourceOption) (*OciCacheUserGetRedisCluster, error)
    public OciCacheUserGetRedisCluster(string name, OciCacheUserGetRedisClusterArgs args, CustomResourceOptions? opts = null)
    public OciCacheUserGetRedisCluster(String name, OciCacheUserGetRedisClusterArgs args)
    public OciCacheUserGetRedisCluster(String name, OciCacheUserGetRedisClusterArgs args, CustomResourceOptions options)
    
    type: oci:Redis:OciCacheUserGetRedisCluster
    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 OciCacheUserGetRedisClusterArgs
    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 OciCacheUserGetRedisClusterArgs
    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 OciCacheUserGetRedisClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OciCacheUserGetRedisClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OciCacheUserGetRedisClusterArgs
    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 ociCacheUserGetRedisClusterResource = new Oci.Redis.OciCacheUserGetRedisCluster("ociCacheUserGetRedisClusterResource", new()
    {
        OciCacheUserId = "string",
        CompartmentId = "string",
        DisplayName = "string",
    });
    
    example, err := redis.NewOciCacheUserGetRedisCluster(ctx, "ociCacheUserGetRedisClusterResource", &redis.OciCacheUserGetRedisClusterArgs{
    	OciCacheUserId: pulumi.String("string"),
    	CompartmentId:  pulumi.String("string"),
    	DisplayName:    pulumi.String("string"),
    })
    
    var ociCacheUserGetRedisClusterResource = new OciCacheUserGetRedisCluster("ociCacheUserGetRedisClusterResource", OciCacheUserGetRedisClusterArgs.builder()
        .ociCacheUserId("string")
        .compartmentId("string")
        .displayName("string")
        .build());
    
    oci_cache_user_get_redis_cluster_resource = oci.redis.OciCacheUserGetRedisCluster("ociCacheUserGetRedisClusterResource",
        oci_cache_user_id="string",
        compartment_id="string",
        display_name="string")
    
    const ociCacheUserGetRedisClusterResource = new oci.redis.OciCacheUserGetRedisCluster("ociCacheUserGetRedisClusterResource", {
        ociCacheUserId: "string",
        compartmentId: "string",
        displayName: "string",
    });
    
    type: oci:Redis:OciCacheUserGetRedisCluster
    properties:
        compartmentId: string
        displayName: string
        ociCacheUserId: string
    

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

    OciCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    OciCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    ociCacheUserId String

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    ociCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId string
    The ID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the entire display name given.
    oci_cache_user_id str

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartment_id str
    The ID of the compartment in which to list resources.
    display_name str
    A filter to return only resources that match the entire display name given.
    ociCacheUserId String

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    OciCacheClusters List<OciCacheUserGetRedisClusterOciCacheCluster>
    Id string
    The provider-assigned unique ID for this managed resource.
    OciCacheClusters []OciCacheUserGetRedisClusterOciCacheCluster
    id String
    The provider-assigned unique ID for this managed resource.
    ociCacheClusters List<OciCacheUserGetClusterOciCacheCluster>
    id string
    The provider-assigned unique ID for this managed resource.
    ociCacheClusters OciCacheUserGetRedisClusterOciCacheCluster[]
    id str
    The provider-assigned unique ID for this managed resource.
    oci_cache_clusters Sequence[OciCacheUserGetRedisClusterOciCacheCluster]
    id String
    The provider-assigned unique ID for this managed resource.
    ociCacheClusters List<Property Map>

    Look up Existing OciCacheUserGetRedisCluster Resource

    Get an existing OciCacheUserGetRedisCluster 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?: OciCacheUserGetRedisClusterState, opts?: CustomResourceOptions): OciCacheUserGetRedisCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            display_name: Optional[str] = None,
            oci_cache_clusters: Optional[Sequence[OciCacheUserGetRedisClusterOciCacheClusterArgs]] = None,
            oci_cache_user_id: Optional[str] = None) -> OciCacheUserGetRedisCluster
    func GetOciCacheUserGetRedisCluster(ctx *Context, name string, id IDInput, state *OciCacheUserGetRedisClusterState, opts ...ResourceOption) (*OciCacheUserGetRedisCluster, error)
    public static OciCacheUserGetRedisCluster Get(string name, Input<string> id, OciCacheUserGetRedisClusterState? state, CustomResourceOptions? opts = null)
    public static OciCacheUserGetRedisCluster get(String name, Output<String> id, OciCacheUserGetRedisClusterState state, CustomResourceOptions options)
    resources:  _:    type: oci:Redis:OciCacheUserGetRedisCluster    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:
    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    OciCacheClusters List<OciCacheUserGetRedisClusterOciCacheCluster>
    OciCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    CompartmentId string
    The ID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    OciCacheClusters []OciCacheUserGetRedisClusterOciCacheClusterArgs
    OciCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    ociCacheClusters List<OciCacheUserGetClusterOciCacheCluster>
    ociCacheUserId String

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId string
    The ID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the entire display name given.
    ociCacheClusters OciCacheUserGetRedisClusterOciCacheCluster[]
    ociCacheUserId string

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartment_id str
    The ID of the compartment in which to list resources.
    display_name str
    A filter to return only resources that match the entire display name given.
    oci_cache_clusters Sequence[OciCacheUserGetRedisClusterOciCacheClusterArgs]
    oci_cache_user_id str

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    compartmentId String
    The ID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the entire display name given.
    ociCacheClusters List<Property Map>
    ociCacheUserId String

    A filter to return only resources, that match with the given Oracle Cloud Infrastructure cache user ID (OCID).

    ** 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

    Supporting Types

    OciCacheUserGetRedisClusterOciCacheCluster, OciCacheUserGetRedisClusterOciCacheClusterArgs

    OciCacheClusterId string
    OCID of the OciCacheCluster
    OciCacheClusterId string
    OCID of the OciCacheCluster
    ociCacheClusterId String
    OCID of the OciCacheCluster
    ociCacheClusterId string
    OCID of the OciCacheCluster
    oci_cache_cluster_id str
    OCID of the OciCacheCluster
    ociCacheClusterId String
    OCID of the OciCacheCluster

    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