import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * 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 (`serviceName`, `regionName`, `containerName`) require resource replacement if changed. * * ## Example Usage * * ### Expire old objects * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const bucket = new ovh.cloudproject.Storage("bucket", { * serviceName: "", * 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 * * An existing lifecycle configuration can be imported using the composite ID `service_name/region_name/container_name`: * * bash * * ```sh * $ pulumi import ovh:index/cloudProjectStorageObjectBucketLifecycleConfiguration:CloudProjectStorageObjectBucketLifecycleConfiguration lifecycle "xxxxxxxxxxxx/GRA/my-bucket" * ``` */ export declare class CloudProjectStorageObjectBucketLifecycleConfiguration extends pulumi.CustomResource { /** * Get an existing CloudProjectStorageObjectBucketLifecycleConfiguration resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CloudProjectStorageObjectBucketLifecycleConfigurationState, opts?: pulumi.CustomResourceOptions): CloudProjectStorageObjectBucketLifecycleConfiguration; /** * Returns true if the given object is an instance of CloudProjectStorageObjectBucketLifecycleConfiguration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CloudProjectStorageObjectBucketLifecycleConfiguration; /** * Name of the storage container. */ readonly containerName: pulumi.Output; /** * Region name of the storage container. */ readonly regionName: pulumi.Output; /** * List of lifecycle rules. */ readonly rules: pulumi.Output; /** * The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ readonly serviceName: pulumi.Output; /** * Create a CloudProjectStorageObjectBucketLifecycleConfiguration resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CloudProjectStorageObjectBucketLifecycleConfigurationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CloudProjectStorageObjectBucketLifecycleConfiguration resources. */ export interface CloudProjectStorageObjectBucketLifecycleConfigurationState { /** * Name of the storage container. */ containerName?: pulumi.Input; /** * Region name of the storage container. */ regionName?: pulumi.Input; /** * List of lifecycle rules. */ rules?: pulumi.Input[]>; /** * The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ serviceName?: pulumi.Input; } /** * The set of arguments for constructing a CloudProjectStorageObjectBucketLifecycleConfiguration resource. */ export interface CloudProjectStorageObjectBucketLifecycleConfigurationArgs { /** * Name of the storage container. */ containerName: pulumi.Input; /** * Region name of the storage container. */ regionName: pulumi.Input; /** * List of lifecycle rules. */ rules: pulumi.Input[]>; /** * The ID of the public cloud project. If omitted, the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used. */ serviceName?: pulumi.Input; }