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

oci.Redis.getOciCacheUsers

Explore with Pulumi AI

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

    This data source provides the list of Oci Cache Users in Oracle Cloud Infrastructure Redis service.

    Lists the Oracle Cloud Infrastructure Cache users based on the supplied parameters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOciCacheUsers = oci.Redis.getOciCacheUsers({
        compartmentId: compartmentId,
        name: ociCacheUserName,
        state: ociCacheUserState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_oci_cache_users = oci.Redis.get_oci_cache_users(compartment_id=compartment_id,
        name=oci_cache_user_name,
        state=oci_cache_user_state)
    
    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.GetOciCacheUsers(ctx, &redis.GetOciCacheUsersArgs{
    			CompartmentId: pulumi.StringRef(compartmentId),
    			Name:          pulumi.StringRef(ociCacheUserName),
    			State:         pulumi.StringRef(ociCacheUserState),
    		}, nil)
    		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 testOciCacheUsers = Oci.Redis.GetOciCacheUsers.Invoke(new()
        {
            CompartmentId = compartmentId,
            Name = ociCacheUserName,
            State = ociCacheUserState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Redis.RedisFunctions;
    import com.pulumi.oci.Redis.inputs.GetOciCacheUsersArgs;
    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) {
            final var testOciCacheUsers = RedisFunctions.getOciCacheUsers(GetOciCacheUsersArgs.builder()
                .compartmentId(compartmentId)
                .name(ociCacheUserName)
                .state(ociCacheUserState)
                .build());
    
        }
    }
    
    variables:
      testOciCacheUsers:
        fn::invoke:
          function: oci:Redis:getOciCacheUsers
          arguments:
            compartmentId: ${compartmentId}
            name: ${ociCacheUserName}
            state: ${ociCacheUserState}
    

    Using getOciCacheUsers

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getOciCacheUsers(args: GetOciCacheUsersArgs, opts?: InvokeOptions): Promise<GetOciCacheUsersResult>
    function getOciCacheUsersOutput(args: GetOciCacheUsersOutputArgs, opts?: InvokeOptions): Output<GetOciCacheUsersResult>
    def get_oci_cache_users(compartment_id: Optional[str] = None,
                            filters: Optional[Sequence[GetOciCacheUsersFilter]] = None,
                            name: Optional[str] = None,
                            state: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetOciCacheUsersResult
    def get_oci_cache_users_output(compartment_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOciCacheUsersFilterArgs]]]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            state: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetOciCacheUsersResult]
    func GetOciCacheUsers(ctx *Context, args *GetOciCacheUsersArgs, opts ...InvokeOption) (*GetOciCacheUsersResult, error)
    func GetOciCacheUsersOutput(ctx *Context, args *GetOciCacheUsersOutputArgs, opts ...InvokeOption) GetOciCacheUsersResultOutput

    > Note: This function is named GetOciCacheUsers in the Go SDK.

    public static class GetOciCacheUsers 
    {
        public static Task<GetOciCacheUsersResult> InvokeAsync(GetOciCacheUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetOciCacheUsersResult> Invoke(GetOciCacheUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOciCacheUsersResult> getOciCacheUsers(GetOciCacheUsersArgs args, InvokeOptions options)
    public static Output<GetOciCacheUsersResult> getOciCacheUsers(GetOciCacheUsersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Redis/getOciCacheUsers:getOciCacheUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    Filters List<GetOciCacheUsersFilter>
    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    State string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    CompartmentId string
    The ID of the compartment in which to list resources.
    Filters []GetOciCacheUsersFilter
    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    State string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    filters List<GetOciCacheUsersFilter>
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state String
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    compartmentId string
    The ID of the compartment in which to list resources.
    filters GetOciCacheUsersFilter[]
    name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    compartment_id str
    The ID of the compartment in which to list resources.
    filters Sequence[GetOciCacheUsersFilter]
    name str
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state str
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    compartmentId String
    The ID of the compartment in which to list resources.
    filters List<Property Map>
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state String
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.

    getOciCacheUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    OciCacheUserCollections List<GetOciCacheUsersOciCacheUserCollection>
    The list of oci_cache_user_collection.
    CompartmentId string
    Oracle Cloud Infrastructure Cache user compartment ID.
    Filters List<GetOciCacheUsersFilter>
    Name string
    Oracle Cloud Infrastructure Cache user name.
    State string
    Oracle Cloud Infrastructure Cache user lifecycle state.
    Id string
    The provider-assigned unique ID for this managed resource.
    OciCacheUserCollections []GetOciCacheUsersOciCacheUserCollection
    The list of oci_cache_user_collection.
    CompartmentId string
    Oracle Cloud Infrastructure Cache user compartment ID.
    Filters []GetOciCacheUsersFilter
    Name string
    Oracle Cloud Infrastructure Cache user name.
    State string
    Oracle Cloud Infrastructure Cache user lifecycle state.
    id String
    The provider-assigned unique ID for this managed resource.
    ociCacheUserCollections List<GetOciCacheUsersOciCacheUserCollection>
    The list of oci_cache_user_collection.
    compartmentId String
    Oracle Cloud Infrastructure Cache user compartment ID.
    filters List<GetOciCacheUsersFilter>
    name String
    Oracle Cloud Infrastructure Cache user name.
    state String
    Oracle Cloud Infrastructure Cache user lifecycle state.
    id string
    The provider-assigned unique ID for this managed resource.
    ociCacheUserCollections GetOciCacheUsersOciCacheUserCollection[]
    The list of oci_cache_user_collection.
    compartmentId string
    Oracle Cloud Infrastructure Cache user compartment ID.
    filters GetOciCacheUsersFilter[]
    name string
    Oracle Cloud Infrastructure Cache user name.
    state string
    Oracle Cloud Infrastructure Cache user lifecycle state.
    id str
    The provider-assigned unique ID for this managed resource.
    oci_cache_user_collections Sequence[GetOciCacheUsersOciCacheUserCollection]
    The list of oci_cache_user_collection.
    compartment_id str
    Oracle Cloud Infrastructure Cache user compartment ID.
    filters Sequence[GetOciCacheUsersFilter]
    name str
    Oracle Cloud Infrastructure Cache user name.
    state str
    Oracle Cloud Infrastructure Cache user lifecycle state.
    id String
    The provider-assigned unique ID for this managed resource.
    ociCacheUserCollections List<Property Map>
    The list of oci_cache_user_collection.
    compartmentId String
    Oracle Cloud Infrastructure Cache user compartment ID.
    filters List<Property Map>
    name String
    Oracle Cloud Infrastructure Cache user name.
    state String
    Oracle Cloud Infrastructure Cache user lifecycle state.

    Supporting Types

    GetOciCacheUsersFilter

    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    Values List<string>
    Regex bool
    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    Values []string
    Regex bool
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    values List<String>
    regex Boolean
    name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    values string[]
    regex boolean
    name str
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    values Sequence[str]
    regex bool
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    values List<String>
    regex Boolean

    GetOciCacheUsersOciCacheUserCollection

    GetOciCacheUsersOciCacheUserCollectionItem

    AuthenticationType string
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of Oracle Cloud Infrastructure cache user.
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    Oracle Cloud Infrastructure Cache user unique ID.
    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    State string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    Status string
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time, when the Oracle Cloud Infrastructure cache user was created.
    AuthenticationType string
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    CompartmentId string
    The ID of the compartment in which to list resources.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of Oracle Cloud Infrastructure cache user.
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    Oracle Cloud Infrastructure Cache user unique ID.
    Name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    State string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    Status string
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time, when the Oracle Cloud Infrastructure cache user was created.
    authenticationType String
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of Oracle Cloud Infrastructure cache user.
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    Oracle Cloud Infrastructure Cache user unique ID.
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state String
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    status String
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time, when the Oracle Cloud Infrastructure cache user was created.
    authenticationType string
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    compartmentId string
    The ID of the compartment in which to list resources.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    Description of Oracle Cloud Infrastructure cache user.
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    Oracle Cloud Infrastructure Cache user unique ID.
    name string
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state string
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    status string
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time, when the Oracle Cloud Infrastructure cache user was created.
    authentication_type str
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    compartment_id str
    The ID of the compartment in which to list resources.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    Description of Oracle Cloud Infrastructure cache user.
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    Oracle Cloud Infrastructure Cache user unique ID.
    name str
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state str
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    status str
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time, when the Oracle Cloud Infrastructure cache user was created.
    authenticationType String
    This is Authentication Type of Oracle Cloud Infrastructure cache user
    compartmentId String
    The ID of the compartment in which to list resources.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of Oracle Cloud Infrastructure cache user.
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    Oracle Cloud Infrastructure Cache user unique ID.
    name String
    A filter to return the resources that match with the given Oracle Cloud Infrastructure cache user name.
    state String
    A filter to return the resources, whose lifecycleState matches with the given lifecycleState.
    status String
    Oracle Cloud Infrastructure Cache user status. ON enables and OFF disables the Oracle Cloud Infrastructure cache user to login to the cluster.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time, when the Oracle Cloud Infrastructure cache user was created.

    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