Provides a resource to manage tos bucket lifecycle
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.tos.BucketLifecycle("foo", {
bucketName: "tflybtest5",
rules: [
{
expiration: {
days: 122,
},
filter: {
greaterThanIncludeEqual: "Enabled",
lessThanIncludeEqual: "Disabled",
objectSizeGreaterThan: 1024,
objectSizeLessThan: 10485760,
},
id: "rule1",
nonCurrentVersionExpiration: {
nonCurrentDays: 90,
},
nonCurrentVersionTransitions: [
{
nonCurrentDays: 30,
storageClass: "IA",
},
{
nonCurrentDays: 31,
storageClass: "ARCHIVE",
},
],
prefix: "documents/",
status: "Enabled",
tags: [
{
key: "example1",
value: "example-value1",
},
{
key: "example2",
value: "example-value2",
},
],
transitions: [
{
days: 7,
storageClass: "IA",
},
{
days: 30,
storageClass: "ARCHIVE",
},
],
},
{
expiration: {
days: 90,
},
id: "rule2",
nonCurrentVersionExpiration: {
nonCurrentDays: 30,
},
nonCurrentVersionTransitions: [{
nonCurrentDays: 7,
storageClass: "IA",
}],
prefix: "logs/",
status: "Enabled",
},
{
abortIncompleteMultipartUpload: {
daysAfterInitiation: 1,
},
expiration: {
date: "2025-12-31T00:00:00.000Z",
},
id: "rule3",
prefix: "temp/",
status: "Disabled",
},
],
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.tos.BucketLifecycle("foo",
bucket_name="tflybtest5",
rules=[
volcengine.tos.BucketLifecycleRuleArgs(
expiration=volcengine.tos.BucketLifecycleRuleExpirationArgs(
days=122,
),
filter=volcengine.tos.BucketLifecycleRuleFilterArgs(
greater_than_include_equal="Enabled",
less_than_include_equal="Disabled",
object_size_greater_than=1024,
object_size_less_than=10485760,
),
id="rule1",
non_current_version_expiration=volcengine.tos.BucketLifecycleRuleNonCurrentVersionExpirationArgs(
non_current_days=90,
),
non_current_version_transitions=[
volcengine.tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs(
non_current_days=30,
storage_class="IA",
),
volcengine.tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs(
non_current_days=31,
storage_class="ARCHIVE",
),
],
prefix="documents/",
status="Enabled",
tags=[
volcengine.tos.BucketLifecycleRuleTagArgs(
key="example1",
value="example-value1",
),
volcengine.tos.BucketLifecycleRuleTagArgs(
key="example2",
value="example-value2",
),
],
transitions=[
volcengine.tos.BucketLifecycleRuleTransitionArgs(
days=7,
storage_class="IA",
),
volcengine.tos.BucketLifecycleRuleTransitionArgs(
days=30,
storage_class="ARCHIVE",
),
],
),
volcengine.tos.BucketLifecycleRuleArgs(
expiration=volcengine.tos.BucketLifecycleRuleExpirationArgs(
days=90,
),
id="rule2",
non_current_version_expiration=volcengine.tos.BucketLifecycleRuleNonCurrentVersionExpirationArgs(
non_current_days=30,
),
non_current_version_transitions=[volcengine.tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs(
non_current_days=7,
storage_class="IA",
)],
prefix="logs/",
status="Enabled",
),
volcengine.tos.BucketLifecycleRuleArgs(
abort_incomplete_multipart_upload=volcengine.tos.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs(
days_after_initiation=1,
),
expiration=volcengine.tos.BucketLifecycleRuleExpirationArgs(
date="2025-12-31T00:00:00.000Z",
),
id="rule3",
prefix="temp/",
status="Disabled",
),
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tos"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tos.NewBucketLifecycle(ctx, "foo", &tos.BucketLifecycleArgs{
BucketName: pulumi.String("tflybtest5"),
Rules: tos.BucketLifecycleRuleArray{
&tos.BucketLifecycleRuleArgs{
Expiration: &tos.BucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(122),
},
Filter: &tos.BucketLifecycleRuleFilterArgs{
GreaterThanIncludeEqual: pulumi.String("Enabled"),
LessThanIncludeEqual: pulumi.String("Disabled"),
ObjectSizeGreaterThan: pulumi.Int(1024),
ObjectSizeLessThan: pulumi.Int(10485760),
},
Id: pulumi.String("rule1"),
NonCurrentVersionExpiration: &tos.BucketLifecycleRuleNonCurrentVersionExpirationArgs{
NonCurrentDays: pulumi.Int(90),
},
NonCurrentVersionTransitions: tos.BucketLifecycleRuleNonCurrentVersionTransitionArray{
&tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs{
NonCurrentDays: pulumi.Int(30),
StorageClass: pulumi.String("IA"),
},
&tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs{
NonCurrentDays: pulumi.Int(31),
StorageClass: pulumi.String("ARCHIVE"),
},
},
Prefix: pulumi.String("documents/"),
Status: pulumi.String("Enabled"),
Tags: tos.BucketLifecycleRuleTagArray{
&tos.BucketLifecycleRuleTagArgs{
Key: pulumi.String("example1"),
Value: pulumi.String("example-value1"),
},
&tos.BucketLifecycleRuleTagArgs{
Key: pulumi.String("example2"),
Value: pulumi.String("example-value2"),
},
},
Transitions: tos.BucketLifecycleRuleTransitionArray{
&tos.BucketLifecycleRuleTransitionArgs{
Days: pulumi.Int(7),
StorageClass: pulumi.String("IA"),
},
&tos.BucketLifecycleRuleTransitionArgs{
Days: pulumi.Int(30),
StorageClass: pulumi.String("ARCHIVE"),
},
},
},
&tos.BucketLifecycleRuleArgs{
Expiration: &tos.BucketLifecycleRuleExpirationArgs{
Days: pulumi.Int(90),
},
Id: pulumi.String("rule2"),
NonCurrentVersionExpiration: &tos.BucketLifecycleRuleNonCurrentVersionExpirationArgs{
NonCurrentDays: pulumi.Int(30),
},
NonCurrentVersionTransitions: tos.BucketLifecycleRuleNonCurrentVersionTransitionArray{
&tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs{
NonCurrentDays: pulumi.Int(7),
StorageClass: pulumi.String("IA"),
},
},
Prefix: pulumi.String("logs/"),
Status: pulumi.String("Enabled"),
},
&tos.BucketLifecycleRuleArgs{
AbortIncompleteMultipartUpload: &tos.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs{
DaysAfterInitiation: pulumi.Int(1),
},
Expiration: &tos.BucketLifecycleRuleExpirationArgs{
Date: pulumi.String("2025-12-31T00:00:00.000Z"),
},
Id: pulumi.String("rule3"),
Prefix: pulumi.String("temp/"),
Status: pulumi.String("Disabled"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Tos.BucketLifecycle("foo", new()
{
BucketName = "tflybtest5",
Rules = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleArgs
{
Expiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleExpirationArgs
{
Days = 122,
},
Filter = new Volcengine.Tos.Inputs.BucketLifecycleRuleFilterArgs
{
GreaterThanIncludeEqual = "Enabled",
LessThanIncludeEqual = "Disabled",
ObjectSizeGreaterThan = 1024,
ObjectSizeLessThan = 10485760,
},
Id = "rule1",
NonCurrentVersionExpiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionExpirationArgs
{
NonCurrentDays = 90,
},
NonCurrentVersionTransitions = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionTransitionArgs
{
NonCurrentDays = 30,
StorageClass = "IA",
},
new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionTransitionArgs
{
NonCurrentDays = 31,
StorageClass = "ARCHIVE",
},
},
Prefix = "documents/",
Status = "Enabled",
Tags = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleTagArgs
{
Key = "example1",
Value = "example-value1",
},
new Volcengine.Tos.Inputs.BucketLifecycleRuleTagArgs
{
Key = "example2",
Value = "example-value2",
},
},
Transitions = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleTransitionArgs
{
Days = 7,
StorageClass = "IA",
},
new Volcengine.Tos.Inputs.BucketLifecycleRuleTransitionArgs
{
Days = 30,
StorageClass = "ARCHIVE",
},
},
},
new Volcengine.Tos.Inputs.BucketLifecycleRuleArgs
{
Expiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleExpirationArgs
{
Days = 90,
},
Id = "rule2",
NonCurrentVersionExpiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionExpirationArgs
{
NonCurrentDays = 30,
},
NonCurrentVersionTransitions = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionTransitionArgs
{
NonCurrentDays = 7,
StorageClass = "IA",
},
},
Prefix = "logs/",
Status = "Enabled",
},
new Volcengine.Tos.Inputs.BucketLifecycleRuleArgs
{
AbortIncompleteMultipartUpload = new Volcengine.Tos.Inputs.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs
{
DaysAfterInitiation = 1,
},
Expiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleExpirationArgs
{
Date = "2025-12-31T00:00:00.000Z",
},
Id = "rule3",
Prefix = "temp/",
Status = "Disabled",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tos.BucketLifecycle;
import com.pulumi.volcengine.tos.BucketLifecycleArgs;
import com.pulumi.volcengine.tos.inputs.BucketLifecycleRuleArgs;
import com.pulumi.volcengine.tos.inputs.BucketLifecycleRuleExpirationArgs;
import com.pulumi.volcengine.tos.inputs.BucketLifecycleRuleFilterArgs;
import com.pulumi.volcengine.tos.inputs.BucketLifecycleRuleNonCurrentVersionExpirationArgs;
import com.pulumi.volcengine.tos.inputs.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs;
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 foo = new BucketLifecycle("foo", BucketLifecycleArgs.builder()
.bucketName("tflybtest5")
.rules(
BucketLifecycleRuleArgs.builder()
.expiration(BucketLifecycleRuleExpirationArgs.builder()
.days(122)
.build())
.filter(BucketLifecycleRuleFilterArgs.builder()
.greaterThanIncludeEqual("Enabled")
.lessThanIncludeEqual("Disabled")
.objectSizeGreaterThan(1024)
.objectSizeLessThan(10485760)
.build())
.id("rule1")
.nonCurrentVersionExpiration(BucketLifecycleRuleNonCurrentVersionExpirationArgs.builder()
.nonCurrentDays(90)
.build())
.nonCurrentVersionTransitions(
BucketLifecycleRuleNonCurrentVersionTransitionArgs.builder()
.nonCurrentDays(30)
.storageClass("IA")
.build(),
BucketLifecycleRuleNonCurrentVersionTransitionArgs.builder()
.nonCurrentDays(31)
.storageClass("ARCHIVE")
.build())
.prefix("documents/")
.status("Enabled")
.tags(
BucketLifecycleRuleTagArgs.builder()
.key("example1")
.value("example-value1")
.build(),
BucketLifecycleRuleTagArgs.builder()
.key("example2")
.value("example-value2")
.build())
.transitions(
BucketLifecycleRuleTransitionArgs.builder()
.days(7)
.storageClass("IA")
.build(),
BucketLifecycleRuleTransitionArgs.builder()
.days(30)
.storageClass("ARCHIVE")
.build())
.build(),
BucketLifecycleRuleArgs.builder()
.expiration(BucketLifecycleRuleExpirationArgs.builder()
.days(90)
.build())
.id("rule2")
.nonCurrentVersionExpiration(BucketLifecycleRuleNonCurrentVersionExpirationArgs.builder()
.nonCurrentDays(30)
.build())
.nonCurrentVersionTransitions(BucketLifecycleRuleNonCurrentVersionTransitionArgs.builder()
.nonCurrentDays(7)
.storageClass("IA")
.build())
.prefix("logs/")
.status("Enabled")
.build(),
BucketLifecycleRuleArgs.builder()
.abortIncompleteMultipartUpload(BucketLifecycleRuleAbortIncompleteMultipartUploadArgs.builder()
.daysAfterInitiation(1)
.build())
.expiration(BucketLifecycleRuleExpirationArgs.builder()
.date("2025-12-31T00:00:00.000Z")
.build())
.id("rule3")
.prefix("temp/")
.status("Disabled")
.build())
.build());
}
}
resources:
foo:
type: volcengine:tos:BucketLifecycle
properties:
bucketName: tflybtest5
rules:
- expiration:
days: 122
filter:
greaterThanIncludeEqual: Enabled
lessThanIncludeEqual: Disabled
objectSizeGreaterThan: 1024
objectSizeLessThan: 1.048576e+07
id: rule1
nonCurrentVersionExpiration:
nonCurrentDays: 90
nonCurrentVersionTransitions:
- nonCurrentDays: 30
storageClass: IA
- nonCurrentDays: 31
storageClass: ARCHIVE
prefix: documents/
status: Enabled
tags:
- key: example1
value: example-value1
- key: example2
value: example-value2
transitions:
- days: 7
storageClass: IA
- days: 30
storageClass: ARCHIVE
- expiration:
days: 90
id: rule2
nonCurrentVersionExpiration:
nonCurrentDays: 30
nonCurrentVersionTransitions:
- nonCurrentDays: 7
storageClass: IA
prefix: logs/
status: Enabled
- abortIncompleteMultipartUpload:
daysAfterInitiation: 1
expiration:
date: 2025-12-31T00:00:00.000Z
id: rule3
prefix: temp/
status: Disabled
Create BucketLifecycle Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketLifecycle(name: string, args: BucketLifecycleArgs, opts?: CustomResourceOptions);@overload
def BucketLifecycle(resource_name: str,
args: BucketLifecycleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BucketLifecycle(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None)func NewBucketLifecycle(ctx *Context, name string, args BucketLifecycleArgs, opts ...ResourceOption) (*BucketLifecycle, error)public BucketLifecycle(string name, BucketLifecycleArgs args, CustomResourceOptions? opts = null)
public BucketLifecycle(String name, BucketLifecycleArgs args)
public BucketLifecycle(String name, BucketLifecycleArgs args, CustomResourceOptions options)
type: volcengine:tos:BucketLifecycle
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 BucketLifecycleArgs
- 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 BucketLifecycleArgs
- 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 BucketLifecycleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketLifecycleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketLifecycleArgs
- 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 bucketLifecycleResource = new Volcengine.Tos.BucketLifecycle("bucketLifecycleResource", new()
{
BucketName = "string",
Rules = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleArgs
{
Status = "string",
AbortIncompleteMultipartUpload = new Volcengine.Tos.Inputs.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs
{
DaysAfterInitiation = 0,
},
Expiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleExpirationArgs
{
Date = "string",
Days = 0,
},
Filter = new Volcengine.Tos.Inputs.BucketLifecycleRuleFilterArgs
{
GreaterThanIncludeEqual = "string",
LessThanIncludeEqual = "string",
ObjectSizeGreaterThan = 0,
ObjectSizeLessThan = 0,
},
Id = "string",
NonCurrentVersionExpiration = new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionExpirationArgs
{
NonCurrentDays = 0,
},
NonCurrentVersionTransitions = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleNonCurrentVersionTransitionArgs
{
NonCurrentDays = 0,
StorageClass = "string",
},
},
Prefix = "string",
Tags = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleTagArgs
{
Key = "string",
Value = "string",
},
},
Transitions = new[]
{
new Volcengine.Tos.Inputs.BucketLifecycleRuleTransitionArgs
{
Date = "string",
Days = 0,
StorageClass = "string",
},
},
},
},
});
example, err := tos.NewBucketLifecycle(ctx, "bucketLifecycleResource", &tos.BucketLifecycleArgs{
BucketName: pulumi.String("string"),
Rules: tos.BucketLifecycleRuleArray{
&tos.BucketLifecycleRuleArgs{
Status: pulumi.String("string"),
AbortIncompleteMultipartUpload: &tos.BucketLifecycleRuleAbortIncompleteMultipartUploadArgs{
DaysAfterInitiation: pulumi.Int(0),
},
Expiration: &tos.BucketLifecycleRuleExpirationArgs{
Date: pulumi.String("string"),
Days: pulumi.Int(0),
},
Filter: &tos.BucketLifecycleRuleFilterArgs{
GreaterThanIncludeEqual: pulumi.String("string"),
LessThanIncludeEqual: pulumi.String("string"),
ObjectSizeGreaterThan: pulumi.Int(0),
ObjectSizeLessThan: pulumi.Int(0),
},
Id: pulumi.String("string"),
NonCurrentVersionExpiration: &tos.BucketLifecycleRuleNonCurrentVersionExpirationArgs{
NonCurrentDays: pulumi.Int(0),
},
NonCurrentVersionTransitions: tos.BucketLifecycleRuleNonCurrentVersionTransitionArray{
&tos.BucketLifecycleRuleNonCurrentVersionTransitionArgs{
NonCurrentDays: pulumi.Int(0),
StorageClass: pulumi.String("string"),
},
},
Prefix: pulumi.String("string"),
Tags: tos.BucketLifecycleRuleTagArray{
&tos.BucketLifecycleRuleTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Transitions: tos.BucketLifecycleRuleTransitionArray{
&tos.BucketLifecycleRuleTransitionArgs{
Date: pulumi.String("string"),
Days: pulumi.Int(0),
StorageClass: pulumi.String("string"),
},
},
},
},
})
var bucketLifecycleResource = new BucketLifecycle("bucketLifecycleResource", BucketLifecycleArgs.builder()
.bucketName("string")
.rules(BucketLifecycleRuleArgs.builder()
.status("string")
.abortIncompleteMultipartUpload(BucketLifecycleRuleAbortIncompleteMultipartUploadArgs.builder()
.daysAfterInitiation(0)
.build())
.expiration(BucketLifecycleRuleExpirationArgs.builder()
.date("string")
.days(0)
.build())
.filter(BucketLifecycleRuleFilterArgs.builder()
.greaterThanIncludeEqual("string")
.lessThanIncludeEqual("string")
.objectSizeGreaterThan(0)
.objectSizeLessThan(0)
.build())
.id("string")
.nonCurrentVersionExpiration(BucketLifecycleRuleNonCurrentVersionExpirationArgs.builder()
.nonCurrentDays(0)
.build())
.nonCurrentVersionTransitions(BucketLifecycleRuleNonCurrentVersionTransitionArgs.builder()
.nonCurrentDays(0)
.storageClass("string")
.build())
.prefix("string")
.tags(BucketLifecycleRuleTagArgs.builder()
.key("string")
.value("string")
.build())
.transitions(BucketLifecycleRuleTransitionArgs.builder()
.date("string")
.days(0)
.storageClass("string")
.build())
.build())
.build());
bucket_lifecycle_resource = volcengine.tos.BucketLifecycle("bucketLifecycleResource",
bucket_name="string",
rules=[{
"status": "string",
"abort_incomplete_multipart_upload": {
"days_after_initiation": 0,
},
"expiration": {
"date": "string",
"days": 0,
},
"filter": {
"greater_than_include_equal": "string",
"less_than_include_equal": "string",
"object_size_greater_than": 0,
"object_size_less_than": 0,
},
"id": "string",
"non_current_version_expiration": {
"non_current_days": 0,
},
"non_current_version_transitions": [{
"non_current_days": 0,
"storage_class": "string",
}],
"prefix": "string",
"tags": [{
"key": "string",
"value": "string",
}],
"transitions": [{
"date": "string",
"days": 0,
"storage_class": "string",
}],
}])
const bucketLifecycleResource = new volcengine.tos.BucketLifecycle("bucketLifecycleResource", {
bucketName: "string",
rules: [{
status: "string",
abortIncompleteMultipartUpload: {
daysAfterInitiation: 0,
},
expiration: {
date: "string",
days: 0,
},
filter: {
greaterThanIncludeEqual: "string",
lessThanIncludeEqual: "string",
objectSizeGreaterThan: 0,
objectSizeLessThan: 0,
},
id: "string",
nonCurrentVersionExpiration: {
nonCurrentDays: 0,
},
nonCurrentVersionTransitions: [{
nonCurrentDays: 0,
storageClass: "string",
}],
prefix: "string",
tags: [{
key: "string",
value: "string",
}],
transitions: [{
date: "string",
days: 0,
storageClass: "string",
}],
}],
});
type: volcengine:tos:BucketLifecycle
properties:
bucketName: string
rules:
- abortIncompleteMultipartUpload:
daysAfterInitiation: 0
expiration:
date: string
days: 0
filter:
greaterThanIncludeEqual: string
lessThanIncludeEqual: string
objectSizeGreaterThan: 0
objectSizeLessThan: 0
id: string
nonCurrentVersionExpiration:
nonCurrentDays: 0
nonCurrentVersionTransitions:
- nonCurrentDays: 0
storageClass: string
prefix: string
status: string
tags:
- key: string
value: string
transitions:
- date: string
days: 0
storageClass: string
BucketLifecycle 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 BucketLifecycle resource accepts the following input properties:
- Bucket
Name string - The name of the TOS bucket.
- Rules
List<Bucket
Lifecycle Rule> - The lifecycle rules of the bucket.
- Bucket
Name string - The name of the TOS bucket.
- Rules
[]Bucket
Lifecycle Rule Args - The lifecycle rules of the bucket.
- bucket
Name String - The name of the TOS bucket.
- rules
List<Bucket
Lifecycle Rule> - The lifecycle rules of the bucket.
- bucket
Name string - The name of the TOS bucket.
- rules
Bucket
Lifecycle Rule[] - The lifecycle rules of the bucket.
- bucket_
name str - The name of the TOS bucket.
- rules
Sequence[Bucket
Lifecycle Rule Args] - The lifecycle rules of the bucket.
- bucket
Name String - The name of the TOS bucket.
- rules List<Property Map>
- The lifecycle rules of the bucket.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketLifecycle 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 BucketLifecycle Resource
Get an existing BucketLifecycle 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?: BucketLifecycleState, opts?: CustomResourceOptions): BucketLifecycle@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None) -> BucketLifecyclefunc GetBucketLifecycle(ctx *Context, name string, id IDInput, state *BucketLifecycleState, opts ...ResourceOption) (*BucketLifecycle, error)public static BucketLifecycle Get(string name, Input<string> id, BucketLifecycleState? state, CustomResourceOptions? opts = null)public static BucketLifecycle get(String name, Output<String> id, BucketLifecycleState state, CustomResourceOptions options)resources: _: type: volcengine:tos:BucketLifecycle 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.
- Bucket
Name string - The name of the TOS bucket.
- Rules
List<Bucket
Lifecycle Rule> - The lifecycle rules of the bucket.
- Bucket
Name string - The name of the TOS bucket.
- Rules
[]Bucket
Lifecycle Rule Args - The lifecycle rules of the bucket.
- bucket
Name String - The name of the TOS bucket.
- rules
List<Bucket
Lifecycle Rule> - The lifecycle rules of the bucket.
- bucket
Name string - The name of the TOS bucket.
- rules
Bucket
Lifecycle Rule[] - The lifecycle rules of the bucket.
- bucket_
name str - The name of the TOS bucket.
- rules
Sequence[Bucket
Lifecycle Rule Args] - The lifecycle rules of the bucket.
- bucket
Name String - The name of the TOS bucket.
- rules List<Property Map>
- The lifecycle rules of the bucket.
Supporting Types
BucketLifecycleRule, BucketLifecycleRuleArgs
- Status string
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- Abort
Incomplete BucketMultipart Upload Lifecycle Rule Abort Incomplete Multipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- Expiration
Bucket
Lifecycle Rule Expiration - The expiration configuration of the lifecycle rule.
- Filter
Bucket
Lifecycle Rule Filter - The filter configuration of the lifecycle rule.
- Id string
- The ID of the lifecycle rule.
- Non
Current BucketVersion Expiration Lifecycle Rule Non Current Version Expiration - The non-current version expiration configuration of the lifecycle rule.
- Non
Current List<BucketVersion Transitions Lifecycle Rule Non Current Version Transition> - The non-current version transition configuration of the lifecycle rule.
- Prefix string
- The prefix of the lifecycle rule.
-
List<Bucket
Lifecycle Rule Tag> - The tag filters.
- Transitions
List<Bucket
Lifecycle Rule Transition> - The transition configuration of the lifecycle rule.
- Status string
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- Abort
Incomplete BucketMultipart Upload Lifecycle Rule Abort Incomplete Multipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- Expiration
Bucket
Lifecycle Rule Expiration - The expiration configuration of the lifecycle rule.
- Filter
Bucket
Lifecycle Rule Filter - The filter configuration of the lifecycle rule.
- Id string
- The ID of the lifecycle rule.
- Non
Current BucketVersion Expiration Lifecycle Rule Non Current Version Expiration - The non-current version expiration configuration of the lifecycle rule.
- Non
Current []BucketVersion Transitions Lifecycle Rule Non Current Version Transition - The non-current version transition configuration of the lifecycle rule.
- Prefix string
- The prefix of the lifecycle rule.
-
[]Bucket
Lifecycle Rule Tag - The tag filters.
- Transitions
[]Bucket
Lifecycle Rule Transition - The transition configuration of the lifecycle rule.
- status String
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- abort
Incomplete BucketMultipart Upload Lifecycle Rule Abort Incomplete Multipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- expiration
Bucket
Lifecycle Rule Expiration - The expiration configuration of the lifecycle rule.
- filter
Bucket
Lifecycle Rule Filter - The filter configuration of the lifecycle rule.
- id String
- The ID of the lifecycle rule.
- non
Current BucketVersion Expiration Lifecycle Rule Non Current Version Expiration - The non-current version expiration configuration of the lifecycle rule.
- non
Current List<BucketVersion Transitions Lifecycle Rule Non Current Version Transition> - The non-current version transition configuration of the lifecycle rule.
- prefix String
- The prefix of the lifecycle rule.
-
List<Bucket
Lifecycle Rule Tag> - The tag filters.
- transitions
List<Bucket
Lifecycle Rule Transition> - The transition configuration of the lifecycle rule.
- status string
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- abort
Incomplete BucketMultipart Upload Lifecycle Rule Abort Incomplete Multipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- expiration
Bucket
Lifecycle Rule Expiration - The expiration configuration of the lifecycle rule.
- filter
Bucket
Lifecycle Rule Filter - The filter configuration of the lifecycle rule.
- id string
- The ID of the lifecycle rule.
- non
Current BucketVersion Expiration Lifecycle Rule Non Current Version Expiration - The non-current version expiration configuration of the lifecycle rule.
- non
Current BucketVersion Transitions Lifecycle Rule Non Current Version Transition[] - The non-current version transition configuration of the lifecycle rule.
- prefix string
- The prefix of the lifecycle rule.
-
Bucket
Lifecycle Rule Tag[] - The tag filters.
- transitions
Bucket
Lifecycle Rule Transition[] - The transition configuration of the lifecycle rule.
- status str
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- abort_
incomplete_ Bucketmultipart_ upload Lifecycle Rule Abort Incomplete Multipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- expiration
Bucket
Lifecycle Rule Expiration - The expiration configuration of the lifecycle rule.
- filter
Bucket
Lifecycle Rule Filter - The filter configuration of the lifecycle rule.
- id str
- The ID of the lifecycle rule.
- non_
current_ Bucketversion_ expiration Lifecycle Rule Non Current Version Expiration - The non-current version expiration configuration of the lifecycle rule.
- non_
current_ Sequence[Bucketversion_ transitions Lifecycle Rule Non Current Version Transition] - The non-current version transition configuration of the lifecycle rule.
- prefix str
- The prefix of the lifecycle rule.
-
Sequence[Bucket
Lifecycle Rule Tag] - The tag filters.
- transitions
Sequence[Bucket
Lifecycle Rule Transition] - The transition configuration of the lifecycle rule.
- status String
- The status of the lifecycle rule. Valid values: Enabled, Disabled.
- abort
Incomplete Property MapMultipart Upload - The abort incomplete multipart upload configuration of the lifecycle rule.
- expiration Property Map
- The expiration configuration of the lifecycle rule.
- filter Property Map
- The filter configuration of the lifecycle rule.
- id String
- The ID of the lifecycle rule.
- non
Current Property MapVersion Expiration - The non-current version expiration configuration of the lifecycle rule.
- non
Current List<Property Map>Version Transitions - The non-current version transition configuration of the lifecycle rule.
- prefix String
- The prefix of the lifecycle rule.
- List<Property Map>
- The tag filters.
- transitions List<Property Map>
- The transition configuration of the lifecycle rule.
BucketLifecycleRuleAbortIncompleteMultipartUpload, BucketLifecycleRuleAbortIncompleteMultipartUploadArgs
- Days
After intInitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
- Days
After intInitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
- days
After IntegerInitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
- days
After numberInitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
- days_
after_ intinitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
- days
After NumberInitiation - The number of days after initiation when the incomplete multipart upload should be aborted.
BucketLifecycleRuleExpiration, BucketLifecycleRuleExpirationArgs
BucketLifecycleRuleFilter, BucketLifecycleRuleFilterArgs
- Greater
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- Less
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- Object
Size intGreater Than - The minimum object size in bytes for the rule to apply.
- Object
Size intLess Than - The maximum object size in bytes for the rule to apply.
- Greater
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- Less
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- Object
Size intGreater Than - The minimum object size in bytes for the rule to apply.
- Object
Size intLess Than - The maximum object size in bytes for the rule to apply.
- greater
Than StringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- less
Than StringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- object
Size IntegerGreater Than - The minimum object size in bytes for the rule to apply.
- object
Size IntegerLess Than - The maximum object size in bytes for the rule to apply.
- greater
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- less
Than stringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- object
Size numberGreater Than - The minimum object size in bytes for the rule to apply.
- object
Size numberLess Than - The maximum object size in bytes for the rule to apply.
- greater_
than_ strinclude_ equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- less_
than_ strinclude_ equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- object_
size_ intgreater_ than - The minimum object size in bytes for the rule to apply.
- object_
size_ intless_ than - The maximum object size in bytes for the rule to apply.
- greater
Than StringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- less
Than StringInclude Equal - Whether to enable equal conditions. The value can only be "Enabled" or "Disabled". If not configured, it will default to "Disabled".
- object
Size NumberGreater Than - The minimum object size in bytes for the rule to apply.
- object
Size NumberLess Than - The maximum object size in bytes for the rule to apply.
BucketLifecycleRuleNonCurrentVersionExpiration, BucketLifecycleRuleNonCurrentVersionExpirationArgs
- Non
Current intDays - The number of days after object creation when the non-current version expiration takes effect.
- Non
Current intDays - The number of days after object creation when the non-current version expiration takes effect.
- non
Current IntegerDays - The number of days after object creation when the non-current version expiration takes effect.
- non
Current numberDays - The number of days after object creation when the non-current version expiration takes effect.
- non_
current_ intdays - The number of days after object creation when the non-current version expiration takes effect.
- non
Current NumberDays - The number of days after object creation when the non-current version expiration takes effect.
BucketLifecycleRuleNonCurrentVersionTransition, BucketLifecycleRuleNonCurrentVersionTransitionArgs
- Non
Current intDays - The number of days after object creation when the non-current version transition takes effect.
- Storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- Non
Current intDays - The number of days after object creation when the non-current version transition takes effect.
- Storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- non
Current IntegerDays - The number of days after object creation when the non-current version transition takes effect.
- storage
Class String - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- non
Current numberDays - The number of days after object creation when the non-current version transition takes effect.
- storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- non_
current_ intdays - The number of days after object creation when the non-current version transition takes effect.
- storage_
class str - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- non
Current NumberDays - The number of days after object creation when the non-current version transition takes effect.
- storage
Class String - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
BucketLifecycleRuleTag, BucketLifecycleRuleTagArgs
BucketLifecycleRuleTransition, BucketLifecycleRuleTransitionArgs
- Date string
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- Days int
- The number of days after object creation when the transition takes effect.
- Storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- Date string
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- Days int
- The number of days after object creation when the transition takes effect.
- Storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- date String
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- days Integer
- The number of days after object creation when the transition takes effect.
- storage
Class String - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- date string
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- days number
- The number of days after object creation when the transition takes effect.
- storage
Class string - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- date str
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- days int
- The number of days after object creation when the transition takes effect.
- storage_
class str - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
- date String
- The date when the transition takes effect. Format: 2023-01-01T00:00:00.000Z.
- days Number
- The number of days after object creation when the transition takes effect.
- storage
Class String - The storage class to transition to. Valid values: IA, ARCHIVE, COLD_ARCHIVE.
Import
TosBucketLifecycle can be imported using the bucketName, e.g.
$ pulumi import volcengine:tos/bucketLifecycle:BucketLifecycle default bucket_name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
