1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectStorageObjectBucketLifecycleConfiguration
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud

    Manage the S3™* compatible lifecycle configuration for an OVHcloud Object Storage bucket.

    (* S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud’s service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.)

    Lifecycle rules let you automatically expire objects, transition them to a cheaper storage class, or clean up incomplete multipart uploads based on age, prefix, tags, or object size.

    Note: This resource uses a PUT/DELETE API — there is no separate create vs update endpoint. Creating and updating both call PUT. Destroying calls DELETE which removes the entire lifecycle configuration from the bucket.

    Note: All three identity attributes (service_name, region_name, container_name) require resource replacement if changed.

    Example Usage

    Expire old objects

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const bucket = new ovh.cloudproject.Storage("bucket", {
        serviceName: "<public cloud project ID>",
        regionName: "GRA",
        name: "my-versioned-bucket",
        versioning: {
            status: "enabled",
        },
    });
    const lifecycle = new ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("lifecycle", {
        serviceName: bucket.serviceName,
        regionName: bucket.regionName,
        containerName: bucket.name,
        rules: [{
            id: "expire-old-objects",
            status: "enabled",
            expiration: {
                days: 365,
            },
        }],
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    bucket = ovh.cloudproject.Storage("bucket",
        service_name="<public cloud project ID>",
        region_name="GRA",
        name="my-versioned-bucket",
        versioning={
            "status": "enabled",
        })
    lifecycle = ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("lifecycle",
        service_name=bucket.service_name,
        region_name=bucket.region_name,
        container_name=bucket.name,
        rules=[{
            "id": "expire-old-objects",
            "status": "enabled",
            "expiration": {
                "days": 365,
            },
        }])
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		bucket, err := cloudproject.NewStorage(ctx, "bucket", &cloudproject.StorageArgs{
    			ServiceName: pulumi.String("<public cloud project ID>"),
    			RegionName:  pulumi.String("GRA"),
    			Name:        pulumi.String("my-versioned-bucket"),
    			Versioning: &cloudproject.StorageVersioningArgs{
    				Status: pulumi.String("enabled"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ovh.NewCloudProjectStorageObjectBucketLifecycleConfiguration(ctx, "lifecycle", &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationArgs{
    			ServiceName:   bucket.ServiceName,
    			RegionName:    bucket.RegionName,
    			ContainerName: bucket.Name,
    			Rules: ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArray{
    				&ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs{
    					Id:     pulumi.String("expire-old-objects"),
    					Status: pulumi.String("enabled"),
    					Expiration: &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs{
    						Days: pulumi.Float64(365),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var bucket = new Ovh.CloudProject.Storage("bucket", new()
        {
            ServiceName = "<public cloud project ID>",
            RegionName = "GRA",
            Name = "my-versioned-bucket",
            Versioning = new Ovh.CloudProject.Inputs.StorageVersioningArgs
            {
                Status = "enabled",
            },
        });
    
        var lifecycle = new Ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("lifecycle", new()
        {
            ServiceName = bucket.ServiceName,
            RegionName = bucket.RegionName,
            ContainerName = bucket.Name,
            Rules = new[]
            {
                new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs
                {
                    Id = "expire-old-objects",
                    Status = "enabled",
                    Expiration = new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs
                    {
                        Days = 365,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudProject.Storage;
    import com.ovhcloud.pulumi.ovh.CloudProject.StorageArgs;
    import com.pulumi.ovh.CloudProject.inputs.StorageVersioningArgs;
    import com.ovhcloud.pulumi.ovh.CloudProjectStorageObjectBucketLifecycleConfiguration;
    import com.ovhcloud.pulumi.ovh.CloudProjectStorageObjectBucketLifecycleConfigurationArgs;
    import com.pulumi.ovh.inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs;
    import com.pulumi.ovh.inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs;
    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 bucket = new Storage("bucket", StorageArgs.builder()
                .serviceName("<public cloud project ID>")
                .regionName("GRA")
                .name("my-versioned-bucket")
                .versioning(StorageVersioningArgs.builder()
                    .status("enabled")
                    .build())
                .build());
    
            var lifecycle = new CloudProjectStorageObjectBucketLifecycleConfiguration("lifecycle", CloudProjectStorageObjectBucketLifecycleConfigurationArgs.builder()
                .serviceName(bucket.serviceName())
                .regionName(bucket.regionName())
                .containerName(bucket.name())
                .rules(CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs.builder()
                    .id("expire-old-objects")
                    .status("enabled")
                    .expiration(CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs.builder()
                        .days(365.0)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      bucket:
        type: ovh:CloudProject:Storage
        properties:
          serviceName: <public cloud project ID>
          regionName: GRA
          name: my-versioned-bucket
          versioning:
            status: enabled
      lifecycle:
        type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration
        properties:
          serviceName: ${bucket.serviceName}
          regionName: ${bucket.regionName}
          containerName: ${bucket.name}
          rules:
            - id: expire-old-objects
              status: enabled
              expiration:
                days: 365
    

    Archive logs

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      lifecycle:
        type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration
        properties:
          serviceName: <public cloud project ID>
          regionName: GRA
          containerName: my-bucket
          rules:
            - id: transition-to-standard-ia
              status: enabled
              filter:
                prefix: archive/
              transitions:
                - days: 90
                  storageClass: STANDARD_IA
            - id: transition-to-standard-ia-delayed
              status: enabled
              filter:
                prefix: archive/
              transitions:
                - days: 180
                  storageClass: DEEP_ARCHIVE
            - id: expire-logs
              status: enabled
              filter:
                prefix: logs/
                objectSizeGreaterThan: 1.048576e+06
              expiration:
                days: 30
            - id: abort-multipart
              status: enabled
              abort_incomplete_multipart_upload:
                daysAfterInitiation: 7
    

    Noncurrent cleaning

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      lifecycle:
        type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration
        properties:
          serviceName: <public cloud project ID>
          regionName: GRA
          containerName: my-bucket
          rules:
            - id: noncurrent-version-expiration
              status: enabled
              noncurrent_version_expiration:
                noncurrentDays: 30
                newerNoncurrentVersions: 3
            - id: noncurrent-version-transition
              status: enabled
              noncurrent_version_transitions:
                - noncurrentDays: 14
                  storageClass: STANDARD_IA
    

    Create CloudProjectStorageObjectBucketLifecycleConfiguration Resource

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

    Constructor syntax

    new CloudProjectStorageObjectBucketLifecycleConfiguration(name: string, args: CloudProjectStorageObjectBucketLifecycleConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def CloudProjectStorageObjectBucketLifecycleConfiguration(resource_name: str,
                                                              args: CloudProjectStorageObjectBucketLifecycleConfigurationArgs,
                                                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudProjectStorageObjectBucketLifecycleConfiguration(resource_name: str,
                                                              opts: Optional[ResourceOptions] = None,
                                                              container_name: Optional[str] = None,
                                                              region_name: Optional[str] = None,
                                                              rules: Optional[Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs]] = None,
                                                              service_name: Optional[str] = None)
    func NewCloudProjectStorageObjectBucketLifecycleConfiguration(ctx *Context, name string, args CloudProjectStorageObjectBucketLifecycleConfigurationArgs, opts ...ResourceOption) (*CloudProjectStorageObjectBucketLifecycleConfiguration, error)
    public CloudProjectStorageObjectBucketLifecycleConfiguration(string name, CloudProjectStorageObjectBucketLifecycleConfigurationArgs args, CustomResourceOptions? opts = null)
    public CloudProjectStorageObjectBucketLifecycleConfiguration(String name, CloudProjectStorageObjectBucketLifecycleConfigurationArgs args)
    public CloudProjectStorageObjectBucketLifecycleConfiguration(String name, CloudProjectStorageObjectBucketLifecycleConfigurationArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CloudProjectStorageObjectBucketLifecycleConfigurationArgs
    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 CloudProjectStorageObjectBucketLifecycleConfigurationArgs
    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 CloudProjectStorageObjectBucketLifecycleConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudProjectStorageObjectBucketLifecycleConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudProjectStorageObjectBucketLifecycleConfigurationArgs
    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 cloudProjectStorageObjectBucketLifecycleConfigurationResource = new Ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("cloudProjectStorageObjectBucketLifecycleConfigurationResource", new()
    {
        ContainerName = "string",
        RegionName = "string",
        Rules = new[]
        {
            new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs
            {
                Status = "string",
                AbortIncompleteMultipartUpload = new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUploadArgs
                {
                    DaysAfterInitiation = 0,
                },
                Expiration = new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs
                {
                    Date = "string",
                    Days = 0,
                    ExpiredObjectDeleteMarker = false,
                },
                Filter = new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilterArgs
                {
                    ObjectSizeGreaterThan = 0,
                    ObjectSizeLessThan = 0,
                    Prefix = "string",
                    Tags = 
                    {
                        { "string", "string" },
                    },
                },
                Id = "string",
                NoncurrentVersionExpiration = new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpirationArgs
                {
                    NewerNoncurrentVersions = 0,
                    NoncurrentDays = 0,
                },
                NoncurrentVersionTransitions = new[]
                {
                    new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransitionArgs
                    {
                        NewerNoncurrentVersions = 0,
                        NoncurrentDays = 0,
                        StorageClass = "string",
                    },
                },
                Transitions = new[]
                {
                    new Ovh.Inputs.CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransitionArgs
                    {
                        StorageClass = "string",
                        Date = "string",
                        Days = 0,
                    },
                },
            },
        },
        ServiceName = "string",
    });
    
    example, err := ovh.NewCloudProjectStorageObjectBucketLifecycleConfiguration(ctx, "cloudProjectStorageObjectBucketLifecycleConfigurationResource", &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationArgs{
    	ContainerName: pulumi.String("string"),
    	RegionName:    pulumi.String("string"),
    	Rules: ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArray{
    		&ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs{
    			Status: pulumi.String("string"),
    			AbortIncompleteMultipartUpload: &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUploadArgs{
    				DaysAfterInitiation: pulumi.Float64(0),
    			},
    			Expiration: &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs{
    				Date:                      pulumi.String("string"),
    				Days:                      pulumi.Float64(0),
    				ExpiredObjectDeleteMarker: pulumi.Bool(false),
    			},
    			Filter: &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilterArgs{
    				ObjectSizeGreaterThan: pulumi.Float64(0),
    				ObjectSizeLessThan:    pulumi.Float64(0),
    				Prefix:                pulumi.String("string"),
    				Tags: pulumi.StringMap{
    					"string": pulumi.String("string"),
    				},
    			},
    			Id: pulumi.String("string"),
    			NoncurrentVersionExpiration: &ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpirationArgs{
    				NewerNoncurrentVersions: pulumi.Float64(0),
    				NoncurrentDays:          pulumi.Float64(0),
    			},
    			NoncurrentVersionTransitions: ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransitionArray{
    				&ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransitionArgs{
    					NewerNoncurrentVersions: pulumi.Float64(0),
    					NoncurrentDays:          pulumi.Float64(0),
    					StorageClass:            pulumi.String("string"),
    				},
    			},
    			Transitions: ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransitionArray{
    				&ovh.CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransitionArgs{
    					StorageClass: pulumi.String("string"),
    					Date:         pulumi.String("string"),
    					Days:         pulumi.Float64(0),
    				},
    			},
    		},
    	},
    	ServiceName: pulumi.String("string"),
    })
    
    var cloudProjectStorageObjectBucketLifecycleConfigurationResource = new CloudProjectStorageObjectBucketLifecycleConfiguration("cloudProjectStorageObjectBucketLifecycleConfigurationResource", CloudProjectStorageObjectBucketLifecycleConfigurationArgs.builder()
        .containerName("string")
        .regionName("string")
        .rules(CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs.builder()
            .status("string")
            .abortIncompleteMultipartUpload(CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUploadArgs.builder()
                .daysAfterInitiation(0.0)
                .build())
            .expiration(CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs.builder()
                .date("string")
                .days(0.0)
                .expiredObjectDeleteMarker(false)
                .build())
            .filter(CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilterArgs.builder()
                .objectSizeGreaterThan(0.0)
                .objectSizeLessThan(0.0)
                .prefix("string")
                .tags(Map.of("string", "string"))
                .build())
            .id("string")
            .noncurrentVersionExpiration(CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpirationArgs.builder()
                .newerNoncurrentVersions(0.0)
                .noncurrentDays(0.0)
                .build())
            .noncurrentVersionTransitions(CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransitionArgs.builder()
                .newerNoncurrentVersions(0.0)
                .noncurrentDays(0.0)
                .storageClass("string")
                .build())
            .transitions(CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransitionArgs.builder()
                .storageClass("string")
                .date("string")
                .days(0.0)
                .build())
            .build())
        .serviceName("string")
        .build());
    
    cloud_project_storage_object_bucket_lifecycle_configuration_resource = ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("cloudProjectStorageObjectBucketLifecycleConfigurationResource",
        container_name="string",
        region_name="string",
        rules=[{
            "status": "string",
            "abort_incomplete_multipart_upload": {
                "days_after_initiation": 0,
            },
            "expiration": {
                "date": "string",
                "days": 0,
                "expired_object_delete_marker": False,
            },
            "filter": {
                "object_size_greater_than": 0,
                "object_size_less_than": 0,
                "prefix": "string",
                "tags": {
                    "string": "string",
                },
            },
            "id": "string",
            "noncurrent_version_expiration": {
                "newer_noncurrent_versions": 0,
                "noncurrent_days": 0,
            },
            "noncurrent_version_transitions": [{
                "newer_noncurrent_versions": 0,
                "noncurrent_days": 0,
                "storage_class": "string",
            }],
            "transitions": [{
                "storage_class": "string",
                "date": "string",
                "days": 0,
            }],
        }],
        service_name="string")
    
    const cloudProjectStorageObjectBucketLifecycleConfigurationResource = new ovh.CloudProjectStorageObjectBucketLifecycleConfiguration("cloudProjectStorageObjectBucketLifecycleConfigurationResource", {
        containerName: "string",
        regionName: "string",
        rules: [{
            status: "string",
            abortIncompleteMultipartUpload: {
                daysAfterInitiation: 0,
            },
            expiration: {
                date: "string",
                days: 0,
                expiredObjectDeleteMarker: false,
            },
            filter: {
                objectSizeGreaterThan: 0,
                objectSizeLessThan: 0,
                prefix: "string",
                tags: {
                    string: "string",
                },
            },
            id: "string",
            noncurrentVersionExpiration: {
                newerNoncurrentVersions: 0,
                noncurrentDays: 0,
            },
            noncurrentVersionTransitions: [{
                newerNoncurrentVersions: 0,
                noncurrentDays: 0,
                storageClass: "string",
            }],
            transitions: [{
                storageClass: "string",
                date: "string",
                days: 0,
            }],
        }],
        serviceName: "string",
    });
    
    type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration
    properties:
        containerName: string
        regionName: string
        rules:
            - abortIncompleteMultipartUpload:
                daysAfterInitiation: 0
              expiration:
                date: string
                days: 0
                expiredObjectDeleteMarker: false
              filter:
                objectSizeGreaterThan: 0
                objectSizeLessThan: 0
                prefix: string
                tags:
                    string: string
              id: string
              noncurrentVersionExpiration:
                newerNoncurrentVersions: 0
                noncurrentDays: 0
              noncurrentVersionTransitions:
                - newerNoncurrentVersions: 0
                  noncurrentDays: 0
                  storageClass: string
              status: string
              transitions:
                - date: string
                  days: 0
                  storageClass: string
        serviceName: string
    

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

    ContainerName string
    Name of the storage container.
    RegionName string
    Region name of the storage container.
    Rules List<CloudProjectStorageObjectBucketLifecycleConfigurationRule>
    List of lifecycle rules.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ContainerName string
    Name of the storage container.
    RegionName string
    Region name of the storage container.
    Rules []CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs
    List of lifecycle rules.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName String
    Name of the storage container.
    regionName String
    Region name of the storage container.
    rules List<CloudProjectStorageObjectBucketLifecycleConfigurationRule>
    List of lifecycle rules.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName string
    Name of the storage container.
    regionName string
    Region name of the storage container.
    rules CloudProjectStorageObjectBucketLifecycleConfigurationRule[]
    List of lifecycle rules.
    serviceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    container_name str
    Name of the storage container.
    region_name str
    Region name of the storage container.
    rules Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs]
    List of lifecycle rules.
    service_name str
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName String
    Name of the storage container.
    regionName String
    Region name of the storage container.
    rules List<Property Map>
    List of lifecycle rules.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CloudProjectStorageObjectBucketLifecycleConfiguration Resource

    Get an existing CloudProjectStorageObjectBucketLifecycleConfiguration 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?: CloudProjectStorageObjectBucketLifecycleConfigurationState, opts?: CustomResourceOptions): CloudProjectStorageObjectBucketLifecycleConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_name: Optional[str] = None,
            region_name: Optional[str] = None,
            rules: Optional[Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs]] = None,
            service_name: Optional[str] = None) -> CloudProjectStorageObjectBucketLifecycleConfiguration
    func GetCloudProjectStorageObjectBucketLifecycleConfiguration(ctx *Context, name string, id IDInput, state *CloudProjectStorageObjectBucketLifecycleConfigurationState, opts ...ResourceOption) (*CloudProjectStorageObjectBucketLifecycleConfiguration, error)
    public static CloudProjectStorageObjectBucketLifecycleConfiguration Get(string name, Input<string> id, CloudProjectStorageObjectBucketLifecycleConfigurationState? state, CustomResourceOptions? opts = null)
    public static CloudProjectStorageObjectBucketLifecycleConfiguration get(String name, Output<String> id, CloudProjectStorageObjectBucketLifecycleConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudProjectStorageObjectBucketLifecycleConfiguration    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ContainerName string
    Name of the storage container.
    RegionName string
    Region name of the storage container.
    Rules List<CloudProjectStorageObjectBucketLifecycleConfigurationRule>
    List of lifecycle rules.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ContainerName string
    Name of the storage container.
    RegionName string
    Region name of the storage container.
    Rules []CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs
    List of lifecycle rules.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName String
    Name of the storage container.
    regionName String
    Region name of the storage container.
    rules List<CloudProjectStorageObjectBucketLifecycleConfigurationRule>
    List of lifecycle rules.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName string
    Name of the storage container.
    regionName string
    Region name of the storage container.
    rules CloudProjectStorageObjectBucketLifecycleConfigurationRule[]
    List of lifecycle rules.
    serviceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    container_name str
    Name of the storage container.
    region_name str
    Region name of the storage container.
    rules Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs]
    List of lifecycle rules.
    service_name str
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    containerName String
    Name of the storage container.
    regionName String
    Region name of the storage container.
    rules List<Property Map>
    List of lifecycle rules.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    Supporting Types

    CloudProjectStorageObjectBucketLifecycleConfigurationRule, CloudProjectStorageObjectBucketLifecycleConfigurationRuleArgs

    Status string
    Rule status. Accepted values: enabled, disabled.
    AbortIncompleteMultipartUpload CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload
    Configuration for aborting incomplete multipart uploads.
    Expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration
    Configuration for expiring current object versions.
    Filter CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    Id string
    Rule ID. If omitted, generated by the server.
    NoncurrentVersionExpiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration
    Configuration for expiring noncurrent object versions (requires versioning).
    NoncurrentVersionTransitions List<CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition>
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    Transitions List<CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition>
    Configuration for transitioning current object versions to a different storage class.
    Status string
    Rule status. Accepted values: enabled, disabled.
    AbortIncompleteMultipartUpload CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload
    Configuration for aborting incomplete multipart uploads.
    Expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration
    Configuration for expiring current object versions.
    Filter CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    Id string
    Rule ID. If omitted, generated by the server.
    NoncurrentVersionExpiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration
    Configuration for expiring noncurrent object versions (requires versioning).
    NoncurrentVersionTransitions []CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    Transitions []CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition
    Configuration for transitioning current object versions to a different storage class.
    status String
    Rule status. Accepted values: enabled, disabled.
    abortIncompleteMultipartUpload CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload
    Configuration for aborting incomplete multipart uploads.
    expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration
    Configuration for expiring current object versions.
    filter CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    id String
    Rule ID. If omitted, generated by the server.
    noncurrentVersionExpiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration
    Configuration for expiring noncurrent object versions (requires versioning).
    noncurrentVersionTransitions List<CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition>
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    transitions List<CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition>
    Configuration for transitioning current object versions to a different storage class.
    status string
    Rule status. Accepted values: enabled, disabled.
    abortIncompleteMultipartUpload CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload
    Configuration for aborting incomplete multipart uploads.
    expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration
    Configuration for expiring current object versions.
    filter CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    id string
    Rule ID. If omitted, generated by the server.
    noncurrentVersionExpiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration
    Configuration for expiring noncurrent object versions (requires versioning).
    noncurrentVersionTransitions CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition[]
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    transitions CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition[]
    Configuration for transitioning current object versions to a different storage class.
    status str
    Rule status. Accepted values: enabled, disabled.
    abort_incomplete_multipart_upload CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload
    Configuration for aborting incomplete multipart uploads.
    expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration
    Configuration for expiring current object versions.
    filter CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    id str
    Rule ID. If omitted, generated by the server.
    noncurrent_version_expiration CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration
    Configuration for expiring noncurrent object versions (requires versioning).
    noncurrent_version_transitions Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition]
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    transitions Sequence[CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition]
    Configuration for transitioning current object versions to a different storage class.
    status String
    Rule status. Accepted values: enabled, disabled.
    abortIncompleteMultipartUpload Property Map
    Configuration for aborting incomplete multipart uploads.
    expiration Property Map
    Configuration for expiring current object versions.
    filter Property Map
    Filters that identify the objects the rule applies to. If omitted, the rule applies to all objects.
    id String
    Rule ID. If omitted, generated by the server.
    noncurrentVersionExpiration Property Map
    Configuration for expiring noncurrent object versions (requires versioning).
    noncurrentVersionTransitions List<Property Map>
    Configuration for transitioning noncurrent object versions to a different storage class (requires versioning).
    transitions List<Property Map>
    Configuration for transitioning current object versions to a different storage class.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUpload, CloudProjectStorageObjectBucketLifecycleConfigurationRuleAbortIncompleteMultipartUploadArgs

    DaysAfterInitiation double
    Number of days after initiation before an incomplete multipart upload is aborted.
    DaysAfterInitiation float64
    Number of days after initiation before an incomplete multipart upload is aborted.
    daysAfterInitiation Double
    Number of days after initiation before an incomplete multipart upload is aborted.
    daysAfterInitiation number
    Number of days after initiation before an incomplete multipart upload is aborted.
    days_after_initiation float
    Number of days after initiation before an incomplete multipart upload is aborted.
    daysAfterInitiation Number
    Number of days after initiation before an incomplete multipart upload is aborted.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpiration, CloudProjectStorageObjectBucketLifecycleConfigurationRuleExpirationArgs

    Date string
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    Days double
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    ExpiredObjectDeleteMarker bool
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.
    Date string
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    Days float64
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    ExpiredObjectDeleteMarker bool
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.
    date String
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    days Double
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    expiredObjectDeleteMarker Boolean
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.
    date string
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    days number
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    expiredObjectDeleteMarker boolean
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.
    date str
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    days float
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    expired_object_delete_marker bool
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.
    date String
    ISO 8601 date after which objects are deleted (e.g. 2026-01-01). Mutually exclusive with days and expired_object_delete_marker.
    days Number
    Number of days after creation before the object is deleted. Mutually exclusive with date and expired_object_delete_marker.
    expiredObjectDeleteMarker Boolean
    If true, delete markers with no noncurrent versions are automatically removed. Cannot be specified with days or date.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilter, CloudProjectStorageObjectBucketLifecycleConfigurationRuleFilterArgs

    ObjectSizeGreaterThan double
    Minimum object size in bytes to which the rule applies.
    ObjectSizeLessThan double
    Maximum object size in bytes to which the rule applies.
    Prefix string
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    Tags Dictionary<string, string>
    Tags filter — the rule applies only to objects with all the specified tags.
    ObjectSizeGreaterThan float64
    Minimum object size in bytes to which the rule applies.
    ObjectSizeLessThan float64
    Maximum object size in bytes to which the rule applies.
    Prefix string
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    Tags map[string]string
    Tags filter — the rule applies only to objects with all the specified tags.
    objectSizeGreaterThan Double
    Minimum object size in bytes to which the rule applies.
    objectSizeLessThan Double
    Maximum object size in bytes to which the rule applies.
    prefix String
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    tags Map<String,String>
    Tags filter — the rule applies only to objects with all the specified tags.
    objectSizeGreaterThan number
    Minimum object size in bytes to which the rule applies.
    objectSizeLessThan number
    Maximum object size in bytes to which the rule applies.
    prefix string
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    tags {[key: string]: string}
    Tags filter — the rule applies only to objects with all the specified tags.
    object_size_greater_than float
    Minimum object size in bytes to which the rule applies.
    object_size_less_than float
    Maximum object size in bytes to which the rule applies.
    prefix str
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    tags Mapping[str, str]
    Tags filter — the rule applies only to objects with all the specified tags.
    objectSizeGreaterThan Number
    Minimum object size in bytes to which the rule applies.
    objectSizeLessThan Number
    Maximum object size in bytes to which the rule applies.
    prefix String
    Prefix filter — the rule applies only to objects whose key starts with this prefix.
    tags Map<String>
    Tags filter — the rule applies only to objects with all the specified tags.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpiration, CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionExpirationArgs

    NewerNoncurrentVersions double
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    NoncurrentDays double
    Number of days after an object becomes noncurrent before it is deleted.
    NewerNoncurrentVersions float64
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    NoncurrentDays float64
    Number of days after an object becomes noncurrent before it is deleted.
    newerNoncurrentVersions Double
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    noncurrentDays Double
    Number of days after an object becomes noncurrent before it is deleted.
    newerNoncurrentVersions number
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    noncurrentDays number
    Number of days after an object becomes noncurrent before it is deleted.
    newer_noncurrent_versions float
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    noncurrent_days float
    Number of days after an object becomes noncurrent before it is deleted.
    newerNoncurrentVersions Number
    Number of noncurrent versions to retain. All noncurrent versions beyond this count are permanently deleted.
    noncurrentDays Number
    Number of days after an object becomes noncurrent before it is deleted.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransition, CloudProjectStorageObjectBucketLifecycleConfigurationRuleNoncurrentVersionTransitionArgs

    NewerNoncurrentVersions double
    Number of noncurrent versions to retain in the same storage class before transitioning.
    NoncurrentDays double
    Number of days after an object becomes noncurrent before it is transitioned.
    StorageClass string
    The storage class to transition noncurrent objects to.
    NewerNoncurrentVersions float64
    Number of noncurrent versions to retain in the same storage class before transitioning.
    NoncurrentDays float64
    Number of days after an object becomes noncurrent before it is transitioned.
    StorageClass string
    The storage class to transition noncurrent objects to.
    newerNoncurrentVersions Double
    Number of noncurrent versions to retain in the same storage class before transitioning.
    noncurrentDays Double
    Number of days after an object becomes noncurrent before it is transitioned.
    storageClass String
    The storage class to transition noncurrent objects to.
    newerNoncurrentVersions number
    Number of noncurrent versions to retain in the same storage class before transitioning.
    noncurrentDays number
    Number of days after an object becomes noncurrent before it is transitioned.
    storageClass string
    The storage class to transition noncurrent objects to.
    newer_noncurrent_versions float
    Number of noncurrent versions to retain in the same storage class before transitioning.
    noncurrent_days float
    Number of days after an object becomes noncurrent before it is transitioned.
    storage_class str
    The storage class to transition noncurrent objects to.
    newerNoncurrentVersions Number
    Number of noncurrent versions to retain in the same storage class before transitioning.
    noncurrentDays Number
    Number of days after an object becomes noncurrent before it is transitioned.
    storageClass String
    The storage class to transition noncurrent objects to.

    CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransition, CloudProjectStorageObjectBucketLifecycleConfigurationRuleTransitionArgs

    StorageClass string
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    Date string
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    Days double
    Number of days after creation before objects are transitioned. Mutually exclusive with date.
    StorageClass string
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    Date string
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    Days float64
    Number of days after creation before objects are transitioned. Mutually exclusive with date.
    storageClass String
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    date String
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    days Double
    Number of days after creation before objects are transitioned. Mutually exclusive with date.
    storageClass string
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    date string
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    days number
    Number of days after creation before objects are transitioned. Mutually exclusive with date.
    storage_class str
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    date str
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    days float
    Number of days after creation before objects are transitioned. Mutually exclusive with date.
    storageClass String
    The storage class to transition objects to. Accepted values: STANDARD, STANDARD_IA, GLACIER_IR, DEEP_ARCHIVE.
    date String
    ISO 8601 date after which objects are transitioned (e.g. 2026-01-01). Mutually exclusive with days.
    days Number
    Number of days after creation before objects are transitioned. Mutually exclusive with date.

    Import

    An existing lifecycle configuration can be imported using the composite ID service_name/region_name/container_name:

    bash

    $ pulumi import ovh:index/cloudProjectStorageObjectBucketLifecycleConfiguration:CloudProjectStorageObjectBucketLifecycleConfiguration lifecycle "xxxxxxxxxxxx/GRA/my-bucket"
    

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.12.0
    published on Thursday, Mar 12, 2026 by OVHcloud
      Try Pulumi Cloud free. Your team will thank you.