1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ObjectStorage
  5. ObjectLifecyclePolicy
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

oci.ObjectStorage.ObjectLifecyclePolicy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

    This resource provides the Object Lifecycle Policy resource in Oracle Cloud Infrastructure Object Storage service.

    Creates or replaces the object lifecycle policy for the bucket.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testObjectLifecyclePolicy = new Oci.ObjectStorage.ObjectLifecyclePolicy("testObjectLifecyclePolicy", new()
        {
            Bucket = @var.Object_lifecycle_policy_bucket,
            Namespace = @var.Object_lifecycle_policy_namespace,
            Rules = new[]
            {
                new Oci.ObjectStorage.Inputs.ObjectLifecyclePolicyRuleArgs
                {
                    Action = @var.Object_lifecycle_policy_rules_action,
                    IsEnabled = @var.Object_lifecycle_policy_rules_is_enabled,
                    Name = @var.Object_lifecycle_policy_rules_name,
                    TimeAmount = @var.Object_lifecycle_policy_rules_time_amount,
                    TimeUnit = @var.Object_lifecycle_policy_rules_time_unit,
                    ObjectNameFilter = new Oci.ObjectStorage.Inputs.ObjectLifecyclePolicyRuleObjectNameFilterArgs
                    {
                        ExclusionPatterns = @var.Object_lifecycle_policy_rules_object_name_filter_exclusion_patterns,
                        InclusionPatterns = @var.Object_lifecycle_policy_rules_object_name_filter_inclusion_patterns,
                        InclusionPrefixes = @var.Object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes,
                    },
                    Target = @var.Object_lifecycle_policy_rules_target,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ObjectStorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ObjectStorage.NewObjectLifecyclePolicy(ctx, "testObjectLifecyclePolicy", &ObjectStorage.ObjectLifecyclePolicyArgs{
    			Bucket:    pulumi.Any(_var.Object_lifecycle_policy_bucket),
    			Namespace: pulumi.Any(_var.Object_lifecycle_policy_namespace),
    			Rules: objectstorage.ObjectLifecyclePolicyRuleArray{
    				&objectstorage.ObjectLifecyclePolicyRuleArgs{
    					Action:     pulumi.Any(_var.Object_lifecycle_policy_rules_action),
    					IsEnabled:  pulumi.Any(_var.Object_lifecycle_policy_rules_is_enabled),
    					Name:       pulumi.Any(_var.Object_lifecycle_policy_rules_name),
    					TimeAmount: pulumi.Any(_var.Object_lifecycle_policy_rules_time_amount),
    					TimeUnit:   pulumi.Any(_var.Object_lifecycle_policy_rules_time_unit),
    					ObjectNameFilter: &objectstorage.ObjectLifecyclePolicyRuleObjectNameFilterArgs{
    						ExclusionPatterns: pulumi.Any(_var.Object_lifecycle_policy_rules_object_name_filter_exclusion_patterns),
    						InclusionPatterns: pulumi.Any(_var.Object_lifecycle_policy_rules_object_name_filter_inclusion_patterns),
    						InclusionPrefixes: pulumi.Any(_var.Object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes),
    					},
    					Target: pulumi.Any(_var.Object_lifecycle_policy_rules_target),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ObjectStorage.ObjectLifecyclePolicy;
    import com.pulumi.oci.ObjectStorage.ObjectLifecyclePolicyArgs;
    import com.pulumi.oci.ObjectStorage.inputs.ObjectLifecyclePolicyRuleArgs;
    import com.pulumi.oci.ObjectStorage.inputs.ObjectLifecyclePolicyRuleObjectNameFilterArgs;
    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 testObjectLifecyclePolicy = new ObjectLifecyclePolicy("testObjectLifecyclePolicy", ObjectLifecyclePolicyArgs.builder()        
                .bucket(var_.object_lifecycle_policy_bucket())
                .namespace(var_.object_lifecycle_policy_namespace())
                .rules(ObjectLifecyclePolicyRuleArgs.builder()
                    .action(var_.object_lifecycle_policy_rules_action())
                    .isEnabled(var_.object_lifecycle_policy_rules_is_enabled())
                    .name(var_.object_lifecycle_policy_rules_name())
                    .timeAmount(var_.object_lifecycle_policy_rules_time_amount())
                    .timeUnit(var_.object_lifecycle_policy_rules_time_unit())
                    .objectNameFilter(ObjectLifecyclePolicyRuleObjectNameFilterArgs.builder()
                        .exclusionPatterns(var_.object_lifecycle_policy_rules_object_name_filter_exclusion_patterns())
                        .inclusionPatterns(var_.object_lifecycle_policy_rules_object_name_filter_inclusion_patterns())
                        .inclusionPrefixes(var_.object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes())
                        .build())
                    .target(var_.object_lifecycle_policy_rules_target())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_object_lifecycle_policy = oci.object_storage.ObjectLifecyclePolicy("testObjectLifecyclePolicy",
        bucket=var["object_lifecycle_policy_bucket"],
        namespace=var["object_lifecycle_policy_namespace"],
        rules=[oci.object_storage.ObjectLifecyclePolicyRuleArgs(
            action=var["object_lifecycle_policy_rules_action"],
            is_enabled=var["object_lifecycle_policy_rules_is_enabled"],
            name=var["object_lifecycle_policy_rules_name"],
            time_amount=var["object_lifecycle_policy_rules_time_amount"],
            time_unit=var["object_lifecycle_policy_rules_time_unit"],
            object_name_filter=oci.object_storage.ObjectLifecyclePolicyRuleObjectNameFilterArgs(
                exclusion_patterns=var["object_lifecycle_policy_rules_object_name_filter_exclusion_patterns"],
                inclusion_patterns=var["object_lifecycle_policy_rules_object_name_filter_inclusion_patterns"],
                inclusion_prefixes=var["object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes"],
            ),
            target=var["object_lifecycle_policy_rules_target"],
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testObjectLifecyclePolicy = new oci.objectstorage.ObjectLifecyclePolicy("testObjectLifecyclePolicy", {
        bucket: _var.object_lifecycle_policy_bucket,
        namespace: _var.object_lifecycle_policy_namespace,
        rules: [{
            action: _var.object_lifecycle_policy_rules_action,
            isEnabled: _var.object_lifecycle_policy_rules_is_enabled,
            name: _var.object_lifecycle_policy_rules_name,
            timeAmount: _var.object_lifecycle_policy_rules_time_amount,
            timeUnit: _var.object_lifecycle_policy_rules_time_unit,
            objectNameFilter: {
                exclusionPatterns: _var.object_lifecycle_policy_rules_object_name_filter_exclusion_patterns,
                inclusionPatterns: _var.object_lifecycle_policy_rules_object_name_filter_inclusion_patterns,
                inclusionPrefixes: _var.object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes,
            },
            target: _var.object_lifecycle_policy_rules_target,
        }],
    });
    
    resources:
      testObjectLifecyclePolicy:
        type: oci:ObjectStorage:ObjectLifecyclePolicy
        properties:
          #Required
          bucket: ${var.object_lifecycle_policy_bucket}
          namespace: ${var.object_lifecycle_policy_namespace}
          #Optional
          rules:
            - action: ${var.object_lifecycle_policy_rules_action}
              isEnabled: ${var.object_lifecycle_policy_rules_is_enabled}
              name: ${var.object_lifecycle_policy_rules_name}
              timeAmount: ${var.object_lifecycle_policy_rules_time_amount}
              timeUnit: ${var.object_lifecycle_policy_rules_time_unit}
              objectNameFilter:
                exclusionPatterns: ${var.object_lifecycle_policy_rules_object_name_filter_exclusion_patterns}
                inclusionPatterns: ${var.object_lifecycle_policy_rules_object_name_filter_inclusion_patterns}
                inclusionPrefixes: ${var.object_lifecycle_policy_rules_object_name_filter_inclusion_prefixes}
              target: ${var.object_lifecycle_policy_rules_target}
    

    Create ObjectLifecyclePolicy Resource

    new ObjectLifecyclePolicy(name: string, args: ObjectLifecyclePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ObjectLifecyclePolicy(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              bucket: Optional[str] = None,
                              namespace: Optional[str] = None,
                              rules: Optional[Sequence[_objectstorage.ObjectLifecyclePolicyRuleArgs]] = None)
    @overload
    def ObjectLifecyclePolicy(resource_name: str,
                              args: ObjectLifecyclePolicyArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewObjectLifecyclePolicy(ctx *Context, name string, args ObjectLifecyclePolicyArgs, opts ...ResourceOption) (*ObjectLifecyclePolicy, error)
    public ObjectLifecyclePolicy(string name, ObjectLifecyclePolicyArgs args, CustomResourceOptions? opts = null)
    public ObjectLifecyclePolicy(String name, ObjectLifecyclePolicyArgs args)
    public ObjectLifecyclePolicy(String name, ObjectLifecyclePolicyArgs args, CustomResourceOptions options)
    
    type: oci:ObjectStorage:ObjectLifecyclePolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ObjectLifecyclePolicyArgs
    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 ObjectLifecyclePolicyArgs
    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 ObjectLifecyclePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObjectLifecyclePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObjectLifecyclePolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ObjectLifecyclePolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ObjectLifecyclePolicy resource accepts the following input properties:

    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    Rules List<ObjectLifecyclePolicyRule>
    (Updatable) The bucket's set of lifecycle policy rules.
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    Rules []ObjectLifecyclePolicyRuleArgs
    (Updatable) The bucket's set of lifecycle policy rules.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    rules List<ObjectLifecyclePolicyRule>
    (Updatable) The bucket's set of lifecycle policy rules.
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace string
    The Object Storage namespace used for the request.
    rules ObjectLifecyclePolicyRule[]
    (Updatable) The bucket's set of lifecycle policy rules.
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace str
    The Object Storage namespace used for the request.
    rules ObjectLifecyclePolicyRuleArgs]
    (Updatable) The bucket's set of lifecycle policy rules.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    rules List<Property Map>
    (Updatable) The bucket's set of lifecycle policy rules.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TimeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    Id string
    The provider-assigned unique ID for this managed resource.
    TimeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    id String
    The provider-assigned unique ID for this managed resource.
    timeCreated String
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    id string
    The provider-assigned unique ID for this managed resource.
    timeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    id str
    The provider-assigned unique ID for this managed resource.
    time_created str
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    id String
    The provider-assigned unique ID for this managed resource.
    timeCreated String
    The date and time the object lifecycle policy was created, as described in RFC 3339.

    Look up Existing ObjectLifecyclePolicy Resource

    Get an existing ObjectLifecyclePolicy 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?: ObjectLifecyclePolicyState, opts?: CustomResourceOptions): ObjectLifecyclePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket: Optional[str] = None,
            namespace: Optional[str] = None,
            rules: Optional[Sequence[_objectstorage.ObjectLifecyclePolicyRuleArgs]] = None,
            time_created: Optional[str] = None) -> ObjectLifecyclePolicy
    func GetObjectLifecyclePolicy(ctx *Context, name string, id IDInput, state *ObjectLifecyclePolicyState, opts ...ResourceOption) (*ObjectLifecyclePolicy, error)
    public static ObjectLifecyclePolicy Get(string name, Input<string> id, ObjectLifecyclePolicyState? state, CustomResourceOptions? opts = null)
    public static ObjectLifecyclePolicy get(String name, Output<String> id, ObjectLifecyclePolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    Rules List<ObjectLifecyclePolicyRule>
    (Updatable) The bucket's set of lifecycle policy rules.
    TimeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    Bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    Namespace string
    The Object Storage namespace used for the request.
    Rules []ObjectLifecyclePolicyRuleArgs
    (Updatable) The bucket's set of lifecycle policy rules.
    TimeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    rules List<ObjectLifecyclePolicyRule>
    (Updatable) The bucket's set of lifecycle policy rules.
    timeCreated String
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    bucket string
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace string
    The Object Storage namespace used for the request.
    rules ObjectLifecyclePolicyRule[]
    (Updatable) The bucket's set of lifecycle policy rules.
    timeCreated string
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    bucket str
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace str
    The Object Storage namespace used for the request.
    rules ObjectLifecyclePolicyRuleArgs]
    (Updatable) The bucket's set of lifecycle policy rules.
    time_created str
    The date and time the object lifecycle policy was created, as described in RFC 3339.
    bucket String
    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1
    namespace String
    The Object Storage namespace used for the request.
    rules List<Property Map>
    (Updatable) The bucket's set of lifecycle policy rules.
    timeCreated String
    The date and time the object lifecycle policy was created, as described in RFC 3339.

    Supporting Types

    ObjectLifecyclePolicyRule, ObjectLifecyclePolicyRuleArgs

    Action string
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    IsEnabled bool
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    Name string
    (Updatable) The name of the lifecycle rule to be applied.
    TimeAmount string
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    TimeUnit string

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    ObjectNameFilter ObjectLifecyclePolicyRuleObjectNameFilter
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    Target string
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.
    Action string
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    IsEnabled bool
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    Name string
    (Updatable) The name of the lifecycle rule to be applied.
    TimeAmount string
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    TimeUnit string

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    ObjectNameFilter ObjectLifecyclePolicyRuleObjectNameFilter
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    Target string
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.
    action String
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    isEnabled Boolean
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    name String
    (Updatable) The name of the lifecycle rule to be applied.
    timeAmount String
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    timeUnit String

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    objectNameFilter ObjectLifecyclePolicyRuleObjectNameFilter
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    target String
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.
    action string
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    isEnabled boolean
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    name string
    (Updatable) The name of the lifecycle rule to be applied.
    timeAmount string
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    timeUnit string

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    objectNameFilter ObjectLifecyclePolicyRuleObjectNameFilter
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    target string
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.
    action str
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    is_enabled bool
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    name str
    (Updatable) The name of the lifecycle rule to be applied.
    time_amount str
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    time_unit str

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    object_name_filter ObjectLifecyclePolicyRuleObjectNameFilter
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    target str
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.
    action String
    (Updatable) The action of the object lifecycle policy rule. Rules using the action 'ARCHIVE' move objects from Standard and InfrequentAccess storage tiers into the Archive storage tier. Rules using the action 'INFREQUENT_ACCESS' move objects from Standard storage tier into the Infrequent Access Storage tier. Objects that are already in InfrequentAccess tier or in Archive tier are left untouched. Rules using the action 'DELETE' permanently delete objects from buckets. Rules using 'ABORT' abort the uncommitted multipart-uploads and permanently delete their parts from buckets.
    isEnabled Boolean
    (Updatable) A Boolean that determines whether this rule is currently enabled.
    name String
    (Updatable) The name of the lifecycle rule to be applied.
    timeAmount String
    (Updatable) Specifies the age of objects to apply the rule to. The timeAmount is interpreted in units defined by the timeUnit parameter, and is calculated in relation to each object's Last-Modified time.
    timeUnit String

    (Updatable) The unit that should be used to interpret timeAmount. Days are defined as starting and ending at midnight UTC. Years are defined as 365.2425 days long and likewise round up to the next midnight UTC.

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

    objectNameFilter Property Map
    (Updatable) A filter that compares object names to a set of prefixes or patterns to determine if a rule applies to a given object. The filter can contain include glob patterns, exclude glob patterns and inclusion prefixes. The inclusion prefixes property is kept for backward compatibility. It is recommended to use inclusion patterns instead of prefixes. Exclusions take precedence over inclusions.
    target String
    (Updatable) The target of the object lifecycle policy rule. The values of target can be either "objects", "multipart-uploads" or "previous-object-versions". This field when declared as "objects" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for objects. This field when declared as "previous-object-versions" is used to specify ARCHIVE, INFREQUENT_ACCESS or DELETE rule for previous versions of existing objects. This field when declared as "multipart-uploads" is used to specify the ABORT (only) rule for uncommitted multipart-uploads.

    ObjectLifecyclePolicyRuleObjectNameFilter, ObjectLifecyclePolicyRuleObjectNameFilterArgs

    ExclusionPatterns List<string>

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    InclusionPatterns List<string>

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    InclusionPrefixes List<string>
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.
    ExclusionPatterns []string

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    InclusionPatterns []string

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    InclusionPrefixes []string
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.
    exclusionPatterns List<String>

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPatterns List<String>

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPrefixes List<String>
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.
    exclusionPatterns string[]

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPatterns string[]

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPrefixes string[]
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.
    exclusion_patterns Sequence[str]

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusion_patterns Sequence[str]

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusion_prefixes Sequence[str]
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.
    exclusionPatterns List<String>

    (Updatable) An array of glob patterns to match the object names to exclude. An empty array is ignored. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPatterns List<String>

    (Updatable) An array of glob patterns to match the object names to include. An empty array includes all objects in the bucket. Exclusion patterns take precedence over inclusion patterns. A Glob pattern is a sequence of characters to match text. Any character that appears in the pattern, other than the special pattern characters described below, matches itself. Glob patterns must be between 1 and 1024 characters.

    The special pattern characters have the following meanings:

    \ Escapes the following character

    •       Matches any string of characters. ?           Matches any single character . [...]       Matches a group of characters. A group of characters can be: A set of characters, for example: [Zafg9@]. This matches any character in the brackets. A range of characters, for example: [a-z]. This matches any character in the range. [a-f] is equivalent to [abcdef]. For character ranges only the CHARACTER-CHARACTER pattern is supported. [ab-yz] is not valid [a-mn-z] is not valid Character ranges can not start with ^ or : To include a '-' in the range, make it the first or last character.
      
    inclusionPrefixes List<String>
    (Updatable) An array of object name prefixes that the rule will apply to. An empty array means to include all objects.

    Import

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

     $ pulumi import oci:ObjectStorage/objectLifecyclePolicy:ObjectLifecyclePolicy test_object_lifecycle_policy "n/{namespaceName}/b/{bucketName}/l"
    

    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 v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi