1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. Redis
  6. OciCacheBackup
Viewing docs for Oracle Cloud Infrastructure v4.11.0
published on Friday, May 15, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.11.0
published on Friday, May 15, 2026 by Pulumi

    This resource provides the Oci Cache Backup resource in Oracle Cloud Infrastructure Redis service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/ocicache/latest/OciCacheBackup

    Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/redis

    Creates a new Oracle Cloud Infrastructure Cache Backup.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOciCacheBackup = new oci.redis.OciCacheBackup("test_oci_cache_backup", {
        compartmentId: compartmentId,
        displayName: ociCacheBackupDisplayName,
        sourceClusterId: testRedisCluster.id,
        backupSource: ociCacheBackupBackupSource,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: ociCacheBackupDescription,
        freeformTags: {
            "bar-key": "value",
        },
        retentionPeriodInDays: Number(ociCacheBackupRetentionPeriodInDays),
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_oci_cache_backup = oci.redis.OciCacheBackup("test_oci_cache_backup",
        compartment_id=compartment_id,
        display_name=oci_cache_backup_display_name,
        source_cluster_id=test_redis_cluster["id"],
        backup_source=oci_cache_backup_backup_source,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description=oci_cache_backup_description,
        freeform_tags={
            "bar-key": "value",
        },
        retention_period_in_days=int(oci_cache_backup_retention_period_in_days))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/redis"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redis.NewOciCacheBackup(ctx, "test_oci_cache_backup", &redis.OciCacheBackupArgs{
    			CompartmentId:   pulumi.Any(compartmentId),
    			DisplayName:     pulumi.Any(ociCacheBackupDisplayName),
    			SourceClusterId: pulumi.Any(testRedisCluster.Id),
    			BackupSource:    pulumi.Any(ociCacheBackupBackupSource),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			Description: pulumi.Any(ociCacheBackupDescription),
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    			RetentionPeriodInDays: pulumi.Any(ociCacheBackupRetentionPeriodInDays),
    		})
    		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 testOciCacheBackup = new Oci.Redis.OciCacheBackup("test_oci_cache_backup", new()
        {
            CompartmentId = compartmentId,
            DisplayName = ociCacheBackupDisplayName,
            SourceClusterId = testRedisCluster.Id,
            BackupSource = ociCacheBackupBackupSource,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = ociCacheBackupDescription,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            RetentionPeriodInDays = ociCacheBackupRetentionPeriodInDays,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Redis.OciCacheBackup;
    import com.pulumi.oci.Redis.OciCacheBackupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 testOciCacheBackup = new OciCacheBackup("testOciCacheBackup", OciCacheBackupArgs.builder()
                .compartmentId(compartmentId)
                .displayName(ociCacheBackupDisplayName)
                .sourceClusterId(testRedisCluster.id())
                .backupSource(ociCacheBackupBackupSource)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description(ociCacheBackupDescription)
                .freeformTags(Map.of("bar-key", "value"))
                .retentionPeriodInDays(ociCacheBackupRetentionPeriodInDays)
                .build());
    
        }
    }
    
    resources:
      testOciCacheBackup:
        type: oci:Redis:OciCacheBackup
        name: test_oci_cache_backup
        properties:
          compartmentId: ${compartmentId}
          displayName: ${ociCacheBackupDisplayName}
          sourceClusterId: ${testRedisCluster.id}
          backupSource: ${ociCacheBackupBackupSource}
          definedTags:
            foo-namespace.bar-key: value
          description: ${ociCacheBackupDescription}
          freeformTags:
            bar-key: value
          retentionPeriodInDays: ${ociCacheBackupRetentionPeriodInDays}
    
    Example coming soon!
    

    Create OciCacheBackup Resource

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

    Constructor syntax

    new OciCacheBackup(name: string, args: OciCacheBackupArgs, opts?: CustomResourceOptions);
    @overload
    def OciCacheBackup(resource_name: str,
                       args: OciCacheBackupArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def OciCacheBackup(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       display_name: Optional[str] = None,
                       source_cluster_id: Optional[str] = None,
                       backup_source: Optional[str] = None,
                       defined_tags: Optional[Mapping[str, str]] = None,
                       description: Optional[str] = None,
                       export_to_object_storage_trigger: Optional[int] = None,
                       freeform_tags: Optional[Mapping[str, str]] = None,
                       retention_period_in_days: Optional[int] = None)
    func NewOciCacheBackup(ctx *Context, name string, args OciCacheBackupArgs, opts ...ResourceOption) (*OciCacheBackup, error)
    public OciCacheBackup(string name, OciCacheBackupArgs args, CustomResourceOptions? opts = null)
    public OciCacheBackup(String name, OciCacheBackupArgs args)
    public OciCacheBackup(String name, OciCacheBackupArgs args, CustomResourceOptions options)
    
    type: oci:Redis:OciCacheBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "oci_redis_ocicachebackup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args OciCacheBackupArgs
    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 OciCacheBackupArgs
    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 OciCacheBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OciCacheBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OciCacheBackupArgs
    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 ociCacheBackupResource = new Oci.Redis.OciCacheBackup("ociCacheBackupResource", new()
    {
        CompartmentId = "string",
        DisplayName = "string",
        SourceClusterId = "string",
        BackupSource = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        Description = "string",
        ExportToObjectStorageTrigger = 0,
        FreeformTags = 
        {
            { "string", "string" },
        },
        RetentionPeriodInDays = 0,
    });
    
    example, err := redis.NewOciCacheBackup(ctx, "ociCacheBackupResource", &redis.OciCacheBackupArgs{
    	CompartmentId:   pulumi.String("string"),
    	DisplayName:     pulumi.String("string"),
    	SourceClusterId: pulumi.String("string"),
    	BackupSource:    pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description:                  pulumi.String("string"),
    	ExportToObjectStorageTrigger: pulumi.Int(0),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	RetentionPeriodInDays: pulumi.Int(0),
    })
    
    resource "oci_redis_ocicachebackup" "ociCacheBackupResource" {
      compartment_id    = "string"
      display_name      = "string"
      source_cluster_id = "string"
      backup_source     = "string"
      defined_tags = {
        "string" = "string"
      }
      description                      = "string"
      export_to_object_storage_trigger = 0
      freeform_tags = {
        "string" = "string"
      }
      retention_period_in_days = 0
    }
    
    var ociCacheBackupResource = new OciCacheBackup("ociCacheBackupResource", OciCacheBackupArgs.builder()
        .compartmentId("string")
        .displayName("string")
        .sourceClusterId("string")
        .backupSource("string")
        .definedTags(Map.of("string", "string"))
        .description("string")
        .exportToObjectStorageTrigger(0)
        .freeformTags(Map.of("string", "string"))
        .retentionPeriodInDays(0)
        .build());
    
    oci_cache_backup_resource = oci.redis.OciCacheBackup("ociCacheBackupResource",
        compartment_id="string",
        display_name="string",
        source_cluster_id="string",
        backup_source="string",
        defined_tags={
            "string": "string",
        },
        description="string",
        export_to_object_storage_trigger=0,
        freeform_tags={
            "string": "string",
        },
        retention_period_in_days=0)
    
    const ociCacheBackupResource = new oci.redis.OciCacheBackup("ociCacheBackupResource", {
        compartmentId: "string",
        displayName: "string",
        sourceClusterId: "string",
        backupSource: "string",
        definedTags: {
            string: "string",
        },
        description: "string",
        exportToObjectStorageTrigger: 0,
        freeformTags: {
            string: "string",
        },
        retentionPeriodInDays: 0,
    });
    
    type: oci:Redis:OciCacheBackup
    properties:
        backupSource: string
        compartmentId: string
        definedTags:
            string: string
        description: string
        displayName: string
        exportToObjectStorageTrigger: 0
        freeformTags:
            string: string
        retentionPeriodInDays: 0
        sourceClusterId: string
    

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

    CompartmentId string
    (Updatable) Compartment identifier
    DisplayName string
    (Updatable) Backup display name.
    SourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    BackupSource string
    Specifies whether the backup was created from a replica or primary node
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Backup description
    ExportToObjectStorageTrigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    RetentionPeriodInDays int
    (Updatable) Backup retention period in days.
    CompartmentId string
    (Updatable) Compartment identifier
    DisplayName string
    (Updatable) Backup display name.
    SourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    BackupSource string
    Specifies whether the backup was created from a replica or primary node
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Backup description
    ExportToObjectStorageTrigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    RetentionPeriodInDays int
    (Updatable) Backup retention period in days.
    compartment_id string
    (Updatable) Compartment identifier
    display_name string
    (Updatable) Backup display name.
    source_cluster_id string
    Oracle Cloud Infrastructure Cache cluster identifier
    backup_source string
    Specifies whether the backup was created from a replica or primary node
    defined_tags map(string)
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Backup description
    export_to_object_storage_trigger number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeform_tags map(string)
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retention_period_in_days number
    (Updatable) Backup retention period in days.
    compartmentId String
    (Updatable) Compartment identifier
    displayName String
    (Updatable) Backup display name.
    sourceClusterId String
    Oracle Cloud Infrastructure Cache cluster identifier
    backupSource String
    Specifies whether the backup was created from a replica or primary node
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Backup description
    exportToObjectStorageTrigger Integer

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays Integer
    (Updatable) Backup retention period in days.
    compartmentId string
    (Updatable) Compartment identifier
    displayName string
    (Updatable) Backup display name.
    sourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    backupSource string
    Specifies whether the backup was created from a replica or primary node
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Backup description
    exportToObjectStorageTrigger number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays number
    (Updatable) Backup retention period in days.
    compartment_id str
    (Updatable) Compartment identifier
    display_name str
    (Updatable) Backup display name.
    source_cluster_id str
    Oracle Cloud Infrastructure Cache cluster identifier
    backup_source str
    Specifies whether the backup was created from a replica or primary node
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Backup description
    export_to_object_storage_trigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retention_period_in_days int
    (Updatable) Backup retention period in days.
    compartmentId String
    (Updatable) Compartment identifier
    displayName String
    (Updatable) Backup display name.
    sourceClusterId String
    Oracle Cloud Infrastructure Cache cluster identifier
    backupSource String
    Specifies whether the backup was created from a replica or primary node
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Backup description
    exportToObjectStorageTrigger Number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays Number
    (Updatable) Backup retention period in days.

    Outputs

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

    BackupSizeInGbs double
    Backup size in GB.
    BackupType string
    Backup Type.
    ClusterMemoryInGbs double
    The amount of memory allocated to the cluster, in gigabytes.
    ClusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShardCount int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    SoftwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    State string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    BackupSizeInGbs float64
    Backup size in GB.
    BackupType string
    Backup Type.
    ClusterMemoryInGbs float64
    The amount of memory allocated to the cluster, in gigabytes.
    ClusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShardCount int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    SoftwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    State string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backup_size_in_gbs number
    Backup size in GB.
    backup_type string
    Backup Type.
    cluster_memory_in_gbs number
    The amount of memory allocated to the cluster, in gigabytes.
    cluster_mode string
    Specifies whether the cluster is sharded or non-sharded.
    id string
    The provider-assigned unique ID for this managed resource.
    shard_count number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    software_version string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    state string
    The current state of the backup.
    system_tags map(string)
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created string
    The date and time the backup was created. An RFC3339 formatted datetime string.
    time_updated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs Double
    Backup size in GB.
    backupType String
    Backup Type.
    clusterMemoryInGbs Double
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode String
    Specifies whether the cluster is sharded or non-sharded.
    id String
    The provider-assigned unique ID for this managed resource.
    shardCount Integer
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion String
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    state String
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs number
    Backup size in GB.
    backupType string
    Backup Type.
    clusterMemoryInGbs number
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    id string
    The provider-assigned unique ID for this managed resource.
    shardCount number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    state string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backup_size_in_gbs float
    Backup size in GB.
    backup_type str
    Backup Type.
    cluster_memory_in_gbs float
    The amount of memory allocated to the cluster, in gigabytes.
    cluster_mode str
    Specifies whether the cluster is sharded or non-sharded.
    id str
    The provider-assigned unique ID for this managed resource.
    shard_count int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    software_version str
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    state str
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    time_updated str
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs Number
    Backup size in GB.
    backupType String
    Backup Type.
    clusterMemoryInGbs Number
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode String
    Specifies whether the cluster is sharded or non-sharded.
    id String
    The provider-assigned unique ID for this managed resource.
    shardCount Number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion String
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    state String
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The date and time the backup was updated. An RFC3339 formatted datetime string.

    Look up Existing OciCacheBackup Resource

    Get an existing OciCacheBackup 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?: OciCacheBackupState, opts?: CustomResourceOptions): OciCacheBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_size_in_gbs: Optional[float] = None,
            backup_source: Optional[str] = None,
            backup_type: Optional[str] = None,
            cluster_memory_in_gbs: Optional[float] = None,
            cluster_mode: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            export_to_object_storage_trigger: Optional[int] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            retention_period_in_days: Optional[int] = None,
            shard_count: Optional[int] = None,
            software_version: Optional[str] = None,
            source_cluster_id: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> OciCacheBackup
    func GetOciCacheBackup(ctx *Context, name string, id IDInput, state *OciCacheBackupState, opts ...ResourceOption) (*OciCacheBackup, error)
    public static OciCacheBackup Get(string name, Input<string> id, OciCacheBackupState? state, CustomResourceOptions? opts = null)
    public static OciCacheBackup get(String name, Output<String> id, OciCacheBackupState state, CustomResourceOptions options)
    resources:  _:    type: oci:Redis:OciCacheBackup    get:      id: ${id}
    import {
      to = oci_redis_ocicachebackup.example
      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:
    BackupSizeInGbs double
    Backup size in GB.
    BackupSource string
    Specifies whether the backup was created from a replica or primary node
    BackupType string
    Backup Type.
    ClusterMemoryInGbs double
    The amount of memory allocated to the cluster, in gigabytes.
    ClusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    CompartmentId string
    (Updatable) Compartment identifier
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Backup description
    DisplayName string
    (Updatable) Backup display name.
    ExportToObjectStorageTrigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    RetentionPeriodInDays int
    (Updatable) Backup retention period in days.
    ShardCount int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    SoftwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    SourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    State string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    BackupSizeInGbs float64
    Backup size in GB.
    BackupSource string
    Specifies whether the backup was created from a replica or primary node
    BackupType string
    Backup Type.
    ClusterMemoryInGbs float64
    The amount of memory allocated to the cluster, in gigabytes.
    ClusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    CompartmentId string
    (Updatable) Compartment identifier
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Backup description
    DisplayName string
    (Updatable) Backup display name.
    ExportToObjectStorageTrigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    RetentionPeriodInDays int
    (Updatable) Backup retention period in days.
    ShardCount int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    SoftwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    SourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    State string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backup_size_in_gbs number
    Backup size in GB.
    backup_source string
    Specifies whether the backup was created from a replica or primary node
    backup_type string
    Backup Type.
    cluster_memory_in_gbs number
    The amount of memory allocated to the cluster, in gigabytes.
    cluster_mode string
    Specifies whether the cluster is sharded or non-sharded.
    compartment_id string
    (Updatable) Compartment identifier
    defined_tags map(string)
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Backup description
    display_name string
    (Updatable) Backup display name.
    export_to_object_storage_trigger number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeform_tags map(string)
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retention_period_in_days number
    (Updatable) Backup retention period in days.
    shard_count number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    software_version string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    source_cluster_id string
    Oracle Cloud Infrastructure Cache cluster identifier
    state string
    The current state of the backup.
    system_tags map(string)
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created string
    The date and time the backup was created. An RFC3339 formatted datetime string.
    time_updated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs Double
    Backup size in GB.
    backupSource String
    Specifies whether the backup was created from a replica or primary node
    backupType String
    Backup Type.
    clusterMemoryInGbs Double
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode String
    Specifies whether the cluster is sharded or non-sharded.
    compartmentId String
    (Updatable) Compartment identifier
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Backup description
    displayName String
    (Updatable) Backup display name.
    exportToObjectStorageTrigger Integer

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays Integer
    (Updatable) Backup retention period in days.
    shardCount Integer
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion String
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    sourceClusterId String
    Oracle Cloud Infrastructure Cache cluster identifier
    state String
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs number
    Backup size in GB.
    backupSource string
    Specifies whether the backup was created from a replica or primary node
    backupType string
    Backup Type.
    clusterMemoryInGbs number
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode string
    Specifies whether the cluster is sharded or non-sharded.
    compartmentId string
    (Updatable) Compartment identifier
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Backup description
    displayName string
    (Updatable) Backup display name.
    exportToObjectStorageTrigger number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays number
    (Updatable) Backup retention period in days.
    shardCount number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion string
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    sourceClusterId string
    Oracle Cloud Infrastructure Cache cluster identifier
    state string
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backup_size_in_gbs float
    Backup size in GB.
    backup_source str
    Specifies whether the backup was created from a replica or primary node
    backup_type str
    Backup Type.
    cluster_memory_in_gbs float
    The amount of memory allocated to the cluster, in gigabytes.
    cluster_mode str
    Specifies whether the cluster is sharded or non-sharded.
    compartment_id str
    (Updatable) Compartment identifier
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Backup description
    display_name str
    (Updatable) Backup display name.
    export_to_object_storage_trigger int

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retention_period_in_days int
    (Updatable) Backup retention period in days.
    shard_count int
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    software_version str
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    source_cluster_id str
    Oracle Cloud Infrastructure Cache cluster identifier
    state str
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    time_updated str
    The date and time the backup was updated. An RFC3339 formatted datetime string.
    backupSizeInGbs Number
    Backup size in GB.
    backupSource String
    Specifies whether the backup was created from a replica or primary node
    backupType String
    Backup Type.
    clusterMemoryInGbs Number
    The amount of memory allocated to the cluster, in gigabytes.
    clusterMode String
    Specifies whether the cluster is sharded or non-sharded.
    compartmentId String
    (Updatable) Compartment identifier
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Backup description
    displayName String
    (Updatable) Backup display name.
    exportToObjectStorageTrigger Number

    (Updatable) An optional property when incremented triggers Export To Object Storage. Could be set to any integer value.

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

    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    retentionPeriodInDays Number
    (Updatable) Backup retention period in days.
    shardCount Number
    The number of shards in a sharded cluster. Only applicable when clusterMode is SHARDED.
    softwareVersion String
    The Oracle Cloud Infrastructure Cache engine version that the cluster is running.
    sourceClusterId String
    Oracle Cloud Infrastructure Cache cluster identifier
    state String
    The current state of the backup.
    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 the backup was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The date and time the backup was updated. An RFC3339 formatted datetime string.

    Import

    OciCacheBackups can be imported using the id, e.g.

    $ pulumi import oci:Redis/ociCacheBackup:OciCacheBackup test_oci_cache_backup "id"
    

    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
    Viewing docs for Oracle Cloud Infrastructure v4.11.0
    published on Friday, May 15, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.