1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. oss
  5. Bucket
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi

alicloud.oss.Bucket

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi

    Provides a resource to create a oss bucket and set its attribution.

    NOTE: The bucket namespace is shared by all users of the OSS system. Please set bucket name as unique as possible.

    Example Usage

    Private Bucket

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_acl = new AliCloud.Oss.Bucket("bucket-acl", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"example-value-{result}"),
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-acl", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-value-%v", result), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_acl = new Bucket("bucket-acl", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("example-value-%s", result)))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_acl = alicloud.oss.Bucket("bucket-acl",
        acl="private",
        bucket=default.result.apply(lambda result: f"example-value-{result}"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_acl = new alicloud.oss.Bucket("bucket-acl", {
        acl: "private",
        bucket: pulumi.interpolate`example-value-${_default.result}`,
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-acl:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: example-value-${default.result}
    

    Static Website

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_website = new AliCloud.Oss.Bucket("bucket-website", new()
        {
            BucketName = @default.Result.Apply(result => $"example-value-{result}"),
            Website = new AliCloud.Oss.Inputs.BucketWebsiteArgs
            {
                ErrorDocument = "error.html",
                IndexDocument = "index.html",
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-website", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-value-%v", result), nil
    			}).(pulumi.StringOutput),
    			Website: &oss.BucketWebsiteArgs{
    				ErrorDocument: pulumi.String("error.html"),
    				IndexDocument: pulumi.String("index.html"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketWebsiteArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_website = new Bucket("bucket-website", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("example-value-%s", result)))
                .website(BucketWebsiteArgs.builder()
                    .errorDocument("error.html")
                    .indexDocument("index.html")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_website = alicloud.oss.Bucket("bucket-website",
        bucket=default.result.apply(lambda result: f"example-value-{result}"),
        website=alicloud.oss.BucketWebsiteArgs(
            error_document="error.html",
            index_document="index.html",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_website = new alicloud.oss.Bucket("bucket-website", {
        bucket: pulumi.interpolate`example-value-${_default.result}`,
        website: {
            errorDocument: "error.html",
            indexDocument: "index.html",
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-website:
        type: alicloud:oss:Bucket
        properties:
          bucket: example-value-${default.result}
          website:
            errorDocument: error.html
            indexDocument: index.html
    

    Enable Logging

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_target = new AliCloud.Oss.Bucket("bucket-target", new()
        {
            BucketName = @default.Result.Apply(result => $"example-value-{result}"),
            Acl = "public-read",
        });
    
        var bucket_logging = new AliCloud.Oss.Bucket("bucket-logging", new()
        {
            BucketName = @default.Result.Apply(result => $"example-logging-{result}"),
            Logging = new AliCloud.Oss.Inputs.BucketLoggingArgs
            {
                TargetBucket = bucket_target.Id,
                TargetPrefix = "log/",
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-target", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-value-%v", result), nil
    			}).(pulumi.StringOutput),
    			Acl: pulumi.String("public-read"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-logging", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-logging-%v", result), nil
    			}).(pulumi.StringOutput),
    			Logging: &oss.BucketLoggingArgs{
    				TargetBucket: bucket_target.ID(),
    				TargetPrefix: pulumi.String("log/"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketLoggingArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_target = new Bucket("bucket-target", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("example-value-%s", result)))
                .acl("public-read")
                .build());
    
            var bucket_logging = new Bucket("bucket-logging", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("example-logging-%s", result)))
                .logging(BucketLoggingArgs.builder()
                    .targetBucket(bucket_target.id())
                    .targetPrefix("log/")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_target = alicloud.oss.Bucket("bucket-target",
        bucket=default.result.apply(lambda result: f"example-value-{result}"),
        acl="public-read")
    bucket_logging = alicloud.oss.Bucket("bucket-logging",
        bucket=default.result.apply(lambda result: f"example-logging-{result}"),
        logging=alicloud.oss.BucketLoggingArgs(
            target_bucket=bucket_target.id,
            target_prefix="log/",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_target = new alicloud.oss.Bucket("bucket-target", {
        bucket: pulumi.interpolate`example-value-${_default.result}`,
        acl: "public-read",
    });
    const bucket_logging = new alicloud.oss.Bucket("bucket-logging", {
        bucket: pulumi.interpolate`example-logging-${_default.result}`,
        logging: {
            targetBucket: bucket_target.id,
            targetPrefix: "log/",
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-target:
        type: alicloud:oss:Bucket
        properties:
          bucket: example-value-${default.result}
          acl: public-read
      bucket-logging:
        type: alicloud:oss:Bucket
        properties:
          bucket: example-logging-${default.result}
          logging:
            targetBucket: ${["bucket-target"].id}
            targetPrefix: log/
    

    Referer configuration

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_referer = new AliCloud.Oss.Bucket("bucket-referer", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"example-value-{result}"),
            RefererConfig = new AliCloud.Oss.Inputs.BucketRefererConfigArgs
            {
                AllowEmpty = false,
                Referers = new[]
                {
                    "http://www.aliyun.com",
                    "https://www.aliyun.com",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-referer", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-value-%v", result), nil
    			}).(pulumi.StringOutput),
    			RefererConfig: &oss.BucketRefererConfigArgs{
    				AllowEmpty: pulumi.Bool(false),
    				Referers: pulumi.StringArray{
    					pulumi.String("http://www.aliyun.com"),
    					pulumi.String("https://www.aliyun.com"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketRefererConfigArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_referer = new Bucket("bucket-referer", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("example-value-%s", result)))
                .refererConfig(BucketRefererConfigArgs.builder()
                    .allowEmpty(false)
                    .referers(                
                        "http://www.aliyun.com",
                        "https://www.aliyun.com")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_referer = alicloud.oss.Bucket("bucket-referer",
        acl="private",
        bucket=default.result.apply(lambda result: f"example-value-{result}"),
        referer_config=alicloud.oss.BucketRefererConfigArgs(
            allow_empty=False,
            referers=[
                "http://www.aliyun.com",
                "https://www.aliyun.com",
            ],
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_referer = new alicloud.oss.Bucket("bucket-referer", {
        acl: "private",
        bucket: pulumi.interpolate`example-value-${_default.result}`,
        refererConfig: {
            allowEmpty: false,
            referers: [
                "http://www.aliyun.com",
                "https://www.aliyun.com",
            ],
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-referer:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: example-value-${default.result}
          refererConfig:
            allowEmpty: false
            referers:
              - http://www.aliyun.com
              - https://www.aliyun.com
    

    Set lifecycle rule

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_lifecycle1 = new AliCloud.Oss.Bucket("bucket-lifecycle1", new()
        {
            Acl = "public-read",
            BucketName = @default.Result.Apply(result => $"example-lifecycle1-{result}"),
            LifecycleRules = new[]
            {
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    Enabled = true,
                    Expirations = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleExpirationArgs
                        {
                            Days = 365,
                        },
                    },
                    Id = "rule-days",
                    Prefix = "path1/",
                },
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    Enabled = true,
                    Expirations = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleExpirationArgs
                        {
                            Date = "2018-01-12",
                        },
                    },
                    Id = "rule-date",
                    Prefix = "path2/",
                },
            },
        });
    
        var bucket_lifecycle2 = new AliCloud.Oss.Bucket("bucket-lifecycle2", new()
        {
            Acl = "public-read",
            BucketName = @default.Result.Apply(result => $"example-lifecycle2-{result}"),
            LifecycleRules = new[]
            {
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    Enabled = true,
                    Id = "rule-days-transition",
                    Prefix = "path3/",
                    Transitions = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleTransitionArgs
                        {
                            Days = 3,
                            StorageClass = "IA",
                        },
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleTransitionArgs
                        {
                            Days = 30,
                            StorageClass = "Archive",
                        },
                    },
                },
            },
        });
    
        var bucket_lifecycle3 = new AliCloud.Oss.Bucket("bucket-lifecycle3", new()
        {
            Acl = "public-read",
            BucketName = @default.Result.Apply(result => $"example-lifecycle3-{result}"),
            LifecycleRules = new[]
            {
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    Enabled = true,
                    Id = "rule-days-transition",
                    Prefix = "path3/",
                    Transitions = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleTransitionArgs
                        {
                            CreatedBeforeDate = "2022-11-11",
                            StorageClass = "IA",
                        },
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleTransitionArgs
                        {
                            CreatedBeforeDate = "2021-11-11",
                            StorageClass = "Archive",
                        },
                    },
                },
            },
        });
    
        var bucket_lifecycle4 = new AliCloud.Oss.Bucket("bucket-lifecycle4", new()
        {
            Acl = "public-read",
            BucketName = @default.Result.Apply(result => $"example-lifecycle4-{result}"),
            LifecycleRules = new[]
            {
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    AbortMultipartUploads = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleAbortMultipartUploadArgs
                        {
                            Days = 128,
                        },
                    },
                    Enabled = true,
                    Id = "rule-abort-multipart-upload",
                    Prefix = "path3/",
                },
            },
        });
    
        var bucket_versioning_lifecycle = new AliCloud.Oss.Bucket("bucket-versioning-lifecycle", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"example-lifecycle5-{result}"),
            LifecycleRules = new[]
            {
                new AliCloud.Oss.Inputs.BucketLifecycleRuleArgs
                {
                    Enabled = true,
                    Expirations = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleExpirationArgs
                        {
                            ExpiredObjectDeleteMarker = true,
                        },
                    },
                    Id = "rule-versioning",
                    NoncurrentVersionExpirations = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleNoncurrentVersionExpirationArgs
                        {
                            Days = 240,
                        },
                    },
                    NoncurrentVersionTransitions = new[]
                    {
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleNoncurrentVersionTransitionArgs
                        {
                            Days = 180,
                            StorageClass = "Archive",
                        },
                        new AliCloud.Oss.Inputs.BucketLifecycleRuleNoncurrentVersionTransitionArgs
                        {
                            Days = 60,
                            StorageClass = "IA",
                        },
                    },
                    Prefix = "path1/",
                },
            },
            Versioning = new AliCloud.Oss.Inputs.BucketVersioningArgs
            {
                Status = "Enabled",
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-lifecycle1", &oss.BucketArgs{
    			Acl: pulumi.String("public-read"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-lifecycle1-%v", result), nil
    			}).(pulumi.StringOutput),
    			LifecycleRules: oss.BucketLifecycleRuleArray{
    				&oss.BucketLifecycleRuleArgs{
    					Enabled: pulumi.Bool(true),
    					Expirations: oss.BucketLifecycleRuleExpirationArray{
    						&oss.BucketLifecycleRuleExpirationArgs{
    							Days: pulumi.Int(365),
    						},
    					},
    					Id:     pulumi.String("rule-days"),
    					Prefix: pulumi.String("path1/"),
    				},
    				&oss.BucketLifecycleRuleArgs{
    					Enabled: pulumi.Bool(true),
    					Expirations: oss.BucketLifecycleRuleExpirationArray{
    						&oss.BucketLifecycleRuleExpirationArgs{
    							Date: pulumi.String("2018-01-12"),
    						},
    					},
    					Id:     pulumi.String("rule-date"),
    					Prefix: pulumi.String("path2/"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-lifecycle2", &oss.BucketArgs{
    			Acl: pulumi.String("public-read"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-lifecycle2-%v", result), nil
    			}).(pulumi.StringOutput),
    			LifecycleRules: oss.BucketLifecycleRuleArray{
    				&oss.BucketLifecycleRuleArgs{
    					Enabled: pulumi.Bool(true),
    					Id:      pulumi.String("rule-days-transition"),
    					Prefix:  pulumi.String("path3/"),
    					Transitions: oss.BucketLifecycleRuleTransitionArray{
    						&oss.BucketLifecycleRuleTransitionArgs{
    							Days:         pulumi.Int(3),
    							StorageClass: pulumi.String("IA"),
    						},
    						&oss.BucketLifecycleRuleTransitionArgs{
    							Days:         pulumi.Int(30),
    							StorageClass: pulumi.String("Archive"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-lifecycle3", &oss.BucketArgs{
    			Acl: pulumi.String("public-read"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-lifecycle3-%v", result), nil
    			}).(pulumi.StringOutput),
    			LifecycleRules: oss.BucketLifecycleRuleArray{
    				&oss.BucketLifecycleRuleArgs{
    					Enabled: pulumi.Bool(true),
    					Id:      pulumi.String("rule-days-transition"),
    					Prefix:  pulumi.String("path3/"),
    					Transitions: oss.BucketLifecycleRuleTransitionArray{
    						&oss.BucketLifecycleRuleTransitionArgs{
    							CreatedBeforeDate: pulumi.String("2022-11-11"),
    							StorageClass:      pulumi.String("IA"),
    						},
    						&oss.BucketLifecycleRuleTransitionArgs{
    							CreatedBeforeDate: pulumi.String("2021-11-11"),
    							StorageClass:      pulumi.String("Archive"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-lifecycle4", &oss.BucketArgs{
    			Acl: pulumi.String("public-read"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-lifecycle4-%v", result), nil
    			}).(pulumi.StringOutput),
    			LifecycleRules: oss.BucketLifecycleRuleArray{
    				&oss.BucketLifecycleRuleArgs{
    					AbortMultipartUploads: oss.BucketLifecycleRuleAbortMultipartUploadArray{
    						&oss.BucketLifecycleRuleAbortMultipartUploadArgs{
    							Days: pulumi.Int(128),
    						},
    					},
    					Enabled: pulumi.Bool(true),
    					Id:      pulumi.String("rule-abort-multipart-upload"),
    					Prefix:  pulumi.String("path3/"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-versioning-lifecycle", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-lifecycle5-%v", result), nil
    			}).(pulumi.StringOutput),
    			LifecycleRules: oss.BucketLifecycleRuleArray{
    				&oss.BucketLifecycleRuleArgs{
    					Enabled: pulumi.Bool(true),
    					Expirations: oss.BucketLifecycleRuleExpirationArray{
    						&oss.BucketLifecycleRuleExpirationArgs{
    							ExpiredObjectDeleteMarker: pulumi.Bool(true),
    						},
    					},
    					Id: pulumi.String("rule-versioning"),
    					NoncurrentVersionExpirations: oss.BucketLifecycleRuleNoncurrentVersionExpirationArray{
    						&oss.BucketLifecycleRuleNoncurrentVersionExpirationArgs{
    							Days: pulumi.Int(240),
    						},
    					},
    					NoncurrentVersionTransitions: oss.BucketLifecycleRuleNoncurrentVersionTransitionArray{
    						&oss.BucketLifecycleRuleNoncurrentVersionTransitionArgs{
    							Days:         pulumi.Int(180),
    							StorageClass: pulumi.String("Archive"),
    						},
    						&oss.BucketLifecycleRuleNoncurrentVersionTransitionArgs{
    							Days:         pulumi.Int(60),
    							StorageClass: pulumi.String("IA"),
    						},
    					},
    					Prefix: pulumi.String("path1/"),
    				},
    			},
    			Versioning: &oss.BucketVersioningArgs{
    				Status: pulumi.String("Enabled"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketLifecycleRuleArgs;
    import com.pulumi.alicloud.oss.inputs.BucketVersioningArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_lifecycle1 = new Bucket("bucket-lifecycle1", BucketArgs.builder()        
                .acl("public-read")
                .bucket(default_.result().applyValue(result -> String.format("example-lifecycle1-%s", result)))
                .lifecycleRules(            
                    BucketLifecycleRuleArgs.builder()
                        .enabled(true)
                        .expirations(BucketLifecycleRuleExpirationArgs.builder()
                            .days(365)
                            .build())
                        .id("rule-days")
                        .prefix("path1/")
                        .build(),
                    BucketLifecycleRuleArgs.builder()
                        .enabled(true)
                        .expirations(BucketLifecycleRuleExpirationArgs.builder()
                            .date("2018-01-12")
                            .build())
                        .id("rule-date")
                        .prefix("path2/")
                        .build())
                .build());
    
            var bucket_lifecycle2 = new Bucket("bucket-lifecycle2", BucketArgs.builder()        
                .acl("public-read")
                .bucket(default_.result().applyValue(result -> String.format("example-lifecycle2-%s", result)))
                .lifecycleRules(BucketLifecycleRuleArgs.builder()
                    .enabled(true)
                    .id("rule-days-transition")
                    .prefix("path3/")
                    .transitions(                
                        BucketLifecycleRuleTransitionArgs.builder()
                            .days("3")
                            .storageClass("IA")
                            .build(),
                        BucketLifecycleRuleTransitionArgs.builder()
                            .days("30")
                            .storageClass("Archive")
                            .build())
                    .build())
                .build());
    
            var bucket_lifecycle3 = new Bucket("bucket-lifecycle3", BucketArgs.builder()        
                .acl("public-read")
                .bucket(default_.result().applyValue(result -> String.format("example-lifecycle3-%s", result)))
                .lifecycleRules(BucketLifecycleRuleArgs.builder()
                    .enabled(true)
                    .id("rule-days-transition")
                    .prefix("path3/")
                    .transitions(                
                        BucketLifecycleRuleTransitionArgs.builder()
                            .createdBeforeDate("2022-11-11")
                            .storageClass("IA")
                            .build(),
                        BucketLifecycleRuleTransitionArgs.builder()
                            .createdBeforeDate("2021-11-11")
                            .storageClass("Archive")
                            .build())
                    .build())
                .build());
    
            var bucket_lifecycle4 = new Bucket("bucket-lifecycle4", BucketArgs.builder()        
                .acl("public-read")
                .bucket(default_.result().applyValue(result -> String.format("example-lifecycle4-%s", result)))
                .lifecycleRules(BucketLifecycleRuleArgs.builder()
                    .abortMultipartUploads(BucketLifecycleRuleAbortMultipartUploadArgs.builder()
                        .days(128)
                        .build())
                    .enabled(true)
                    .id("rule-abort-multipart-upload")
                    .prefix("path3/")
                    .build())
                .build());
    
            var bucket_versioning_lifecycle = new Bucket("bucket-versioning-lifecycle", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("example-lifecycle5-%s", result)))
                .lifecycleRules(BucketLifecycleRuleArgs.builder()
                    .enabled(true)
                    .expirations(BucketLifecycleRuleExpirationArgs.builder()
                        .expiredObjectDeleteMarker(true)
                        .build())
                    .id("rule-versioning")
                    .noncurrentVersionExpirations(BucketLifecycleRuleNoncurrentVersionExpirationArgs.builder()
                        .days(240)
                        .build())
                    .noncurrentVersionTransitions(                
                        BucketLifecycleRuleNoncurrentVersionTransitionArgs.builder()
                            .days(180)
                            .storageClass("Archive")
                            .build(),
                        BucketLifecycleRuleNoncurrentVersionTransitionArgs.builder()
                            .days(60)
                            .storageClass("IA")
                            .build())
                    .prefix("path1/")
                    .build())
                .versioning(BucketVersioningArgs.builder()
                    .status("Enabled")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_lifecycle1 = alicloud.oss.Bucket("bucket-lifecycle1",
        acl="public-read",
        bucket=default.result.apply(lambda result: f"example-lifecycle1-{result}"),
        lifecycle_rules=[
            alicloud.oss.BucketLifecycleRuleArgs(
                enabled=True,
                expirations=[alicloud.oss.BucketLifecycleRuleExpirationArgs(
                    days=365,
                )],
                id="rule-days",
                prefix="path1/",
            ),
            alicloud.oss.BucketLifecycleRuleArgs(
                enabled=True,
                expirations=[alicloud.oss.BucketLifecycleRuleExpirationArgs(
                    date="2018-01-12",
                )],
                id="rule-date",
                prefix="path2/",
            ),
        ])
    bucket_lifecycle2 = alicloud.oss.Bucket("bucket-lifecycle2",
        acl="public-read",
        bucket=default.result.apply(lambda result: f"example-lifecycle2-{result}"),
        lifecycle_rules=[alicloud.oss.BucketLifecycleRuleArgs(
            enabled=True,
            id="rule-days-transition",
            prefix="path3/",
            transitions=[
                alicloud.oss.BucketLifecycleRuleTransitionArgs(
                    days=3,
                    storage_class="IA",
                ),
                alicloud.oss.BucketLifecycleRuleTransitionArgs(
                    days=30,
                    storage_class="Archive",
                ),
            ],
        )])
    bucket_lifecycle3 = alicloud.oss.Bucket("bucket-lifecycle3",
        acl="public-read",
        bucket=default.result.apply(lambda result: f"example-lifecycle3-{result}"),
        lifecycle_rules=[alicloud.oss.BucketLifecycleRuleArgs(
            enabled=True,
            id="rule-days-transition",
            prefix="path3/",
            transitions=[
                alicloud.oss.BucketLifecycleRuleTransitionArgs(
                    created_before_date="2022-11-11",
                    storage_class="IA",
                ),
                alicloud.oss.BucketLifecycleRuleTransitionArgs(
                    created_before_date="2021-11-11",
                    storage_class="Archive",
                ),
            ],
        )])
    bucket_lifecycle4 = alicloud.oss.Bucket("bucket-lifecycle4",
        acl="public-read",
        bucket=default.result.apply(lambda result: f"example-lifecycle4-{result}"),
        lifecycle_rules=[alicloud.oss.BucketLifecycleRuleArgs(
            abort_multipart_uploads=[alicloud.oss.BucketLifecycleRuleAbortMultipartUploadArgs(
                days=128,
            )],
            enabled=True,
            id="rule-abort-multipart-upload",
            prefix="path3/",
        )])
    bucket_versioning_lifecycle = alicloud.oss.Bucket("bucket-versioning-lifecycle",
        acl="private",
        bucket=default.result.apply(lambda result: f"example-lifecycle5-{result}"),
        lifecycle_rules=[alicloud.oss.BucketLifecycleRuleArgs(
            enabled=True,
            expirations=[alicloud.oss.BucketLifecycleRuleExpirationArgs(
                expired_object_delete_marker=True,
            )],
            id="rule-versioning",
            noncurrent_version_expirations=[alicloud.oss.BucketLifecycleRuleNoncurrentVersionExpirationArgs(
                days=240,
            )],
            noncurrent_version_transitions=[
                alicloud.oss.BucketLifecycleRuleNoncurrentVersionTransitionArgs(
                    days=180,
                    storage_class="Archive",
                ),
                alicloud.oss.BucketLifecycleRuleNoncurrentVersionTransitionArgs(
                    days=60,
                    storage_class="IA",
                ),
            ],
            prefix="path1/",
        )],
        versioning=alicloud.oss.BucketVersioningArgs(
            status="Enabled",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_lifecycle1 = new alicloud.oss.Bucket("bucket-lifecycle1", {
        acl: "public-read",
        bucket: pulumi.interpolate`example-lifecycle1-${_default.result}`,
        lifecycleRules: [
            {
                enabled: true,
                expirations: [{
                    days: 365,
                }],
                id: "rule-days",
                prefix: "path1/",
            },
            {
                enabled: true,
                expirations: [{
                    date: "2018-01-12",
                }],
                id: "rule-date",
                prefix: "path2/",
            },
        ],
    });
    const bucket_lifecycle2 = new alicloud.oss.Bucket("bucket-lifecycle2", {
        acl: "public-read",
        bucket: pulumi.interpolate`example-lifecycle2-${_default.result}`,
        lifecycleRules: [{
            enabled: true,
            id: "rule-days-transition",
            prefix: "path3/",
            transitions: [
                {
                    days: 3,
                    storageClass: "IA",
                },
                {
                    days: 30,
                    storageClass: "Archive",
                },
            ],
        }],
    });
    const bucket_lifecycle3 = new alicloud.oss.Bucket("bucket-lifecycle3", {
        acl: "public-read",
        bucket: pulumi.interpolate`example-lifecycle3-${_default.result}`,
        lifecycleRules: [{
            enabled: true,
            id: "rule-days-transition",
            prefix: "path3/",
            transitions: [
                {
                    createdBeforeDate: "2022-11-11",
                    storageClass: "IA",
                },
                {
                    createdBeforeDate: "2021-11-11",
                    storageClass: "Archive",
                },
            ],
        }],
    });
    const bucket_lifecycle4 = new alicloud.oss.Bucket("bucket-lifecycle4", {
        acl: "public-read",
        bucket: pulumi.interpolate`example-lifecycle4-${_default.result}`,
        lifecycleRules: [{
            abortMultipartUploads: [{
                days: 128,
            }],
            enabled: true,
            id: "rule-abort-multipart-upload",
            prefix: "path3/",
        }],
    });
    const bucket_versioning_lifecycle = new alicloud.oss.Bucket("bucket-versioning-lifecycle", {
        acl: "private",
        bucket: pulumi.interpolate`example-lifecycle5-${_default.result}`,
        lifecycleRules: [{
            enabled: true,
            expirations: [{
                expiredObjectDeleteMarker: true,
            }],
            id: "rule-versioning",
            noncurrentVersionExpirations: [{
                days: 240,
            }],
            noncurrentVersionTransitions: [
                {
                    days: 180,
                    storageClass: "Archive",
                },
                {
                    days: 60,
                    storageClass: "IA",
                },
            ],
            prefix: "path1/",
        }],
        versioning: {
            status: "Enabled",
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-lifecycle1:
        type: alicloud:oss:Bucket
        properties:
          acl: public-read
          bucket: example-lifecycle1-${default.result}
          lifecycleRules:
            - enabled: true
              expirations:
                - days: 365
              id: rule-days
              prefix: path1/
            - enabled: true
              expirations:
                - date: 2018-01-12
              id: rule-date
              prefix: path2/
      bucket-lifecycle2:
        type: alicloud:oss:Bucket
        properties:
          acl: public-read
          bucket: example-lifecycle2-${default.result}
          lifecycleRules:
            - enabled: true
              id: rule-days-transition
              prefix: path3/
              transitions:
                - days: '3'
                  storageClass: IA
                - days: '30'
                  storageClass: Archive
      bucket-lifecycle3:
        type: alicloud:oss:Bucket
        properties:
          acl: public-read
          bucket: example-lifecycle3-${default.result}
          lifecycleRules:
            - enabled: true
              id: rule-days-transition
              prefix: path3/
              transitions:
                - createdBeforeDate: 2022-11-11
                  storageClass: IA
                - createdBeforeDate: 2021-11-11
                  storageClass: Archive
      bucket-lifecycle4:
        type: alicloud:oss:Bucket
        properties:
          acl: public-read
          bucket: example-lifecycle4-${default.result}
          lifecycleRules:
            - abortMultipartUploads:
                - days: 128
              enabled: true
              id: rule-abort-multipart-upload
              prefix: path3/
      bucket-versioning-lifecycle:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: example-lifecycle5-${default.result}
          lifecycleRules:
            - enabled: true
              expirations:
                - expiredObjectDeleteMarker: true
              id: rule-versioning
              noncurrentVersionExpirations:
                - days: 240
              noncurrentVersionTransitions:
                - days: 180
                  storageClass: Archive
                - days: 60
                  storageClass: IA
              prefix: path1/
          versioning:
            status: Enabled
    

    Set bucket policy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_policy = new AliCloud.Oss.Bucket("bucket-policy", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"example-policy-{result}"),
            Policy = @"  {""Statement"":
          [{""Action"":
              [""oss:PutObject"", ""oss:GetObject"", ""oss:DeleteBucket""],
            ""Effect"":""Allow"",
            ""Resource"":
                [""acs:oss:*:*:*""]}],
       ""Version"":""1""}
      
    ",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-policy", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-policy-%v", result), nil
    			}).(pulumi.StringOutput),
    			Policy: pulumi.String("  {\"Statement\":\n      [{\"Action\":\n          [\"oss:PutObject\", \"oss:GetObject\", \"oss:DeleteBucket\"],\n        \"Effect\":\"Allow\",\n        \"Resource\":\n            [\"acs:oss:*:*:*\"]}],\n   \"Version\":\"1\"}\n  \n"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_policy = new Bucket("bucket-policy", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("example-policy-%s", result)))
                .policy("""
      {"Statement":
          [{"Action":
              ["oss:PutObject", "oss:GetObject", "oss:DeleteBucket"],
            "Effect":"Allow",
            "Resource":
                ["acs:oss:*:*:*"]}],
       "Version":"1"}
      
                """)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_policy = alicloud.oss.Bucket("bucket-policy",
        acl="private",
        bucket=default.result.apply(lambda result: f"example-policy-{result}"),
        policy="""  {"Statement":
          [{"Action":
              ["oss:PutObject", "oss:GetObject", "oss:DeleteBucket"],
            "Effect":"Allow",
            "Resource":
                ["acs:oss:*:*:*"]}],
       "Version":"1"}
      
    """)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_policy = new alicloud.oss.Bucket("bucket-policy", {
        acl: "private",
        bucket: pulumi.interpolate`example-policy-${_default.result}`,
        policy: `  {"Statement":
          [{"Action":
              ["oss:PutObject", "oss:GetObject", "oss:DeleteBucket"],
            "Effect":"Allow",
            "Resource":
                ["acs:oss:*:*:*"]}],
       "Version":"1"}
      
    `,
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-policy:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: example-policy-${default.result}
          policy: "  {\"Statement\":\n      [{\"Action\":\n          [\"oss:PutObject\", \"oss:GetObject\", \"oss:DeleteBucket\"],\n        \"Effect\":\"Allow\",\n        \"Resource\":\n            [\"acs:oss:*:*:*\"]}],\n   \"Version\":\"1\"}\n  \n"
    

    IA Bucket

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultRandomInteger = new Random.RandomInteger("defaultRandomInteger", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultBucket = new AliCloud.Oss.Bucket("defaultBucket", new()
        {
            BucketName = defaultRandomInteger.Result.Apply(result => $"example-{result}"),
            StorageClass = "IA",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultRandomInteger, err := random.NewRandomInteger(ctx, "defaultRandomInteger", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "defaultBucket", &oss.BucketArgs{
    			Bucket: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("example-%v", result), nil
    			}).(pulumi.StringOutput),
    			StorageClass: pulumi.String("IA"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    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 defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()        
                .bucket(defaultRandomInteger.result().applyValue(result -> String.format("example-%s", result)))
                .storageClass("IA")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default_random_integer = random.RandomInteger("defaultRandomInteger",
        max=99999,
        min=10000)
    default_bucket = alicloud.oss.Bucket("defaultBucket",
        bucket=default_random_integer.result.apply(lambda result: f"example-{result}"),
        storage_class="IA")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const defaultRandomInteger = new random.RandomInteger("defaultRandomInteger", {
        max: 99999,
        min: 10000,
    });
    const defaultBucket = new alicloud.oss.Bucket("defaultBucket", {
        bucket: pulumi.interpolate`example-${defaultRandomInteger.result}`,
        storageClass: "IA",
    });
    
    resources:
      defaultRandomInteger:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      defaultBucket:
        type: alicloud:oss:Bucket
        properties:
          bucket: example-${defaultRandomInteger.result}
          storageClass: IA
    

    Set bucket server-side encryption rule

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_sserule = new AliCloud.Oss.Bucket("bucket-sserule", new()
        {
            BucketName = @default.Result.Apply(result => $"terraform-example-{result}"),
            Acl = "private",
            ServerSideEncryptionRule = new AliCloud.Oss.Inputs.BucketServerSideEncryptionRuleArgs
            {
                SseAlgorithm = "AES256",
            },
        });
    
        var kms = new AliCloud.Kms.Key("kms", new()
        {
            Description = "terraform-example",
            PendingWindowInDays = 7,
            Status = "Enabled",
        });
    
        var bucket_kms = new AliCloud.Oss.Bucket("bucket-kms", new()
        {
            BucketName = @default.Result.Apply(result => $"terraform-example-kms-{result}"),
            Acl = "private",
            ServerSideEncryptionRule = new AliCloud.Oss.Inputs.BucketServerSideEncryptionRuleArgs
            {
                SseAlgorithm = "KMS",
                KmsMasterKeyId = kms.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-sserule", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			Acl: pulumi.String("private"),
    			ServerSideEncryptionRule: &oss.BucketServerSideEncryptionRuleArgs{
    				SseAlgorithm: pulumi.String("AES256"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		kms, err := kms.NewKey(ctx, "kms", &kms.KeyArgs{
    			Description:         pulumi.String("terraform-example"),
    			PendingWindowInDays: pulumi.Int(7),
    			Status:              pulumi.String("Enabled"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-kms", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-kms-%v", result), nil
    			}).(pulumi.StringOutput),
    			Acl: pulumi.String("private"),
    			ServerSideEncryptionRule: &oss.BucketServerSideEncryptionRuleArgs{
    				SseAlgorithm:   pulumi.String("KMS"),
    				KmsMasterKeyId: kms.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketServerSideEncryptionRuleArgs;
    import com.pulumi.alicloud.kms.Key;
    import com.pulumi.alicloud.kms.KeyArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_sserule = new Bucket("bucket-sserule", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .acl("private")
                .serverSideEncryptionRule(BucketServerSideEncryptionRuleArgs.builder()
                    .sseAlgorithm("AES256")
                    .build())
                .build());
    
            var kms = new Key("kms", KeyArgs.builder()        
                .description("terraform-example")
                .pendingWindowInDays("7")
                .status("Enabled")
                .build());
    
            var bucket_kms = new Bucket("bucket-kms", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-kms-%s", result)))
                .acl("private")
                .serverSideEncryptionRule(BucketServerSideEncryptionRuleArgs.builder()
                    .sseAlgorithm("KMS")
                    .kmsMasterKeyId(kms.id())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_sserule = alicloud.oss.Bucket("bucket-sserule",
        bucket=default.result.apply(lambda result: f"terraform-example-{result}"),
        acl="private",
        server_side_encryption_rule=alicloud.oss.BucketServerSideEncryptionRuleArgs(
            sse_algorithm="AES256",
        ))
    kms = alicloud.kms.Key("kms",
        description="terraform-example",
        pending_window_in_days=7,
        status="Enabled")
    bucket_kms = alicloud.oss.Bucket("bucket-kms",
        bucket=default.result.apply(lambda result: f"terraform-example-kms-{result}"),
        acl="private",
        server_side_encryption_rule=alicloud.oss.BucketServerSideEncryptionRuleArgs(
            sse_algorithm="KMS",
            kms_master_key_id=kms.id,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_sserule = new alicloud.oss.Bucket("bucket-sserule", {
        bucket: pulumi.interpolate`terraform-example-${_default.result}`,
        acl: "private",
        serverSideEncryptionRule: {
            sseAlgorithm: "AES256",
        },
    });
    const kms = new alicloud.kms.Key("kms", {
        description: "terraform-example",
        pendingWindowInDays: 7,
        status: "Enabled",
    });
    const bucket_kms = new alicloud.oss.Bucket("bucket-kms", {
        bucket: pulumi.interpolate`terraform-example-kms-${_default.result}`,
        acl: "private",
        serverSideEncryptionRule: {
            sseAlgorithm: "KMS",
            kmsMasterKeyId: kms.id,
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-sserule:
        type: alicloud:oss:Bucket
        properties:
          bucket: terraform-example-${default.result}
          acl: private
          serverSideEncryptionRule:
            sseAlgorithm: AES256
      kms:
        type: alicloud:kms:Key
        properties:
          description: terraform-example
          pendingWindowInDays: '7'
          status: Enabled
      bucket-kms:
        type: alicloud:oss:Bucket
        properties:
          bucket: terraform-example-kms-${default.result}
          acl: private
          serverSideEncryptionRule:
            sseAlgorithm: KMS
            kmsMasterKeyId: ${kms.id}
    

    Set bucket tags

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_tags = new AliCloud.Oss.Bucket("bucket-tags", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"terraform-example-{result}"),
            Tags = 
            {
                { "key1", "value1" },
                { "key2", "value2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-tags", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			Tags: pulumi.AnyMap{
    				"key1": pulumi.Any("value1"),
    				"key2": pulumi.Any("value2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_tags = new Bucket("bucket-tags", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .tags(Map.ofEntries(
                    Map.entry("key1", "value1"),
                    Map.entry("key2", "value2")
                ))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_tags = alicloud.oss.Bucket("bucket-tags",
        acl="private",
        bucket=default.result.apply(lambda result: f"terraform-example-{result}"),
        tags={
            "key1": "value1",
            "key2": "value2",
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_tags = new alicloud.oss.Bucket("bucket-tags", {
        acl: "private",
        bucket: pulumi.interpolate`terraform-example-${_default.result}`,
        tags: {
            key1: "value1",
            key2: "value2",
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-tags:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: terraform-example-${default.result}
          tags:
            key1: value1
            key2: value2
    

    Enable bucket versioning

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_versioning = new AliCloud.Oss.Bucket("bucket-versioning", new()
        {
            Acl = "private",
            BucketName = @default.Result.Apply(result => $"terraform-example-{result}"),
            Versioning = new AliCloud.Oss.Inputs.BucketVersioningArgs
            {
                Status = "Enabled",
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-versioning", &oss.BucketArgs{
    			Acl: pulumi.String("private"),
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			Versioning: &oss.BucketVersioningArgs{
    				Status: pulumi.String("Enabled"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketVersioningArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_versioning = new Bucket("bucket-versioning", BucketArgs.builder()        
                .acl("private")
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .versioning(BucketVersioningArgs.builder()
                    .status("Enabled")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_versioning = alicloud.oss.Bucket("bucket-versioning",
        acl="private",
        bucket=default.result.apply(lambda result: f"terraform-example-{result}"),
        versioning=alicloud.oss.BucketVersioningArgs(
            status="Enabled",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_versioning = new alicloud.oss.Bucket("bucket-versioning", {
        acl: "private",
        bucket: pulumi.interpolate`terraform-example-${_default.result}`,
        versioning: {
            status: "Enabled",
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-versioning:
        type: alicloud:oss:Bucket
        properties:
          acl: private
          bucket: terraform-example-${default.result}
          versioning:
            status: Enabled
    

    Set bucket redundancy type

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_redundancytype = new AliCloud.Oss.Bucket("bucket-redundancytype", new()
        {
            BucketName = @default.Result.Apply(result => $"terraform-example-{result}"),
            RedundancyType = "ZRS",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-redundancytype", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			RedundancyType: pulumi.String("ZRS"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_redundancytype = new Bucket("bucket-redundancytype", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .redundancyType("ZRS")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_redundancytype = alicloud.oss.Bucket("bucket-redundancytype",
        bucket=default.result.apply(lambda result: f"terraform-example-{result}"),
        redundancy_type="ZRS")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_redundancytype = new alicloud.oss.Bucket("bucket-redundancytype", {
        bucket: pulumi.interpolate`terraform-example-${_default.result}`,
        redundancyType: "ZRS",
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-redundancytype:
        type: alicloud:oss:Bucket
        properties:
          bucket: terraform-example-${default.result}
          redundancyType: ZRS
    

    Set bucket accelerate configuration

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Random.RandomInteger("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var bucket_accelerate = new AliCloud.Oss.Bucket("bucket-accelerate", new()
        {
            BucketName = @default.Result.Apply(result => $"terraform-example-{result}"),
            TransferAcceleration = new AliCloud.Oss.Inputs.BucketTransferAccelerationArgs
            {
                Enabled = false,
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucket(ctx, "bucket-accelerate", &oss.BucketArgs{
    			Bucket: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			TransferAcceleration: &oss.BucketTransferAccelerationArgs{
    				Enabled: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.oss.Bucket;
    import com.pulumi.alicloud.oss.BucketArgs;
    import com.pulumi.alicloud.oss.inputs.BucketTransferAccelerationArgs;
    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 default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var bucket_accelerate = new Bucket("bucket-accelerate", BucketArgs.builder()        
                .bucket(default_.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .transferAcceleration(BucketTransferAccelerationArgs.builder()
                    .enabled(false)
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default = random.RandomInteger("default",
        max=99999,
        min=10000)
    bucket_accelerate = alicloud.oss.Bucket("bucket-accelerate",
        bucket=default.result.apply(lambda result: f"terraform-example-{result}"),
        transfer_acceleration=alicloud.oss.BucketTransferAccelerationArgs(
            enabled=False,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const _default = new random.RandomInteger("default", {
        max: 99999,
        min: 10000,
    });
    const bucket_accelerate = new alicloud.oss.Bucket("bucket-accelerate", {
        bucket: pulumi.interpolate`terraform-example-${_default.result}`,
        transferAcceleration: {
            enabled: false,
        },
    });
    
    resources:
      default:
        type: random:RandomInteger
        properties:
          max: 99999
          min: 10000
      bucket-accelerate:
        type: alicloud:oss:Bucket
        properties:
          bucket: terraform-example-${default.result}
          transferAcceleration:
            enabled: false
    

    Create Bucket Resource

    new Bucket(name: string, args?: BucketArgs, opts?: CustomResourceOptions);
    @overload
    def Bucket(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               acl: Optional[str] = None,
               bucket: Optional[str] = None,
               cors_rules: Optional[Sequence[BucketCorsRuleArgs]] = None,
               force_destroy: Optional[bool] = None,
               lifecycle_rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None,
               logging: Optional[BucketLoggingArgs] = None,
               logging_isenable: Optional[bool] = None,
               policy: Optional[str] = None,
               redundancy_type: Optional[str] = None,
               referer_config: Optional[BucketRefererConfigArgs] = None,
               server_side_encryption_rule: Optional[BucketServerSideEncryptionRuleArgs] = None,
               storage_class: Optional[str] = None,
               tags: Optional[Mapping[str, Any]] = None,
               transfer_acceleration: Optional[BucketTransferAccelerationArgs] = None,
               versioning: Optional[BucketVersioningArgs] = None,
               website: Optional[BucketWebsiteArgs] = None)
    @overload
    def Bucket(resource_name: str,
               args: Optional[BucketArgs] = None,
               opts: Optional[ResourceOptions] = None)
    func NewBucket(ctx *Context, name string, args *BucketArgs, opts ...ResourceOption) (*Bucket, error)
    public Bucket(string name, BucketArgs? args = null, CustomResourceOptions? opts = null)
    public Bucket(String name, BucketArgs args)
    public Bucket(String name, BucketArgs args, CustomResourceOptions options)
    
    type: alicloud:oss:Bucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args BucketArgs
    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 BucketArgs
    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 BucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Bucket Resource Properties

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

    Inputs

    The Bucket resource accepts the following input properties:

    Acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    BucketName string
    CorsRules List<Pulumi.AliCloud.Oss.Inputs.BucketCorsRuleArgs>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    ForceDestroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    LifecycleRules List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleArgs>

    A configuration of object lifecycle management (documented below).

    Logging Pulumi.AliCloud.Oss.Inputs.BucketLoggingArgs

    A Settings of bucket logging (documented below).

    LoggingIsenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    Policy string

    Json format text of bucket policy bucket policy management.

    RedundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    RefererConfig Pulumi.AliCloud.Oss.Inputs.BucketRefererConfigArgs

    The configuration of referer (documented below).

    ServerSideEncryptionRule Pulumi.AliCloud.Oss.Inputs.BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    Tags Dictionary<string, object>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    TransferAcceleration Pulumi.AliCloud.Oss.Inputs.BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    Versioning Pulumi.AliCloud.Oss.Inputs.BucketVersioningArgs

    A state of versioning (documented below).

    Website Pulumi.AliCloud.Oss.Inputs.BucketWebsiteArgs

    A website object(documented below).

    Acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    Bucket string
    CorsRules []BucketCorsRuleArgs

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    ForceDestroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    LifecycleRules []BucketLifecycleRuleArgs

    A configuration of object lifecycle management (documented below).

    Logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    LoggingIsenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    Policy string

    Json format text of bucket policy bucket policy management.

    RedundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    RefererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    ServerSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    Tags map[string]interface{}

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    TransferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    Versioning BucketVersioningArgs

    A state of versioning (documented below).

    Website BucketWebsiteArgs

    A website object(documented below).

    acl String

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket String
    corsRules List<BucketCorsRuleArgs>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    forceDestroy Boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    lifecycleRules List<BucketLifecycleRuleArgs>

    A configuration of object lifecycle management (documented below).

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    loggingIsenable Boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    policy String

    Json format text of bucket policy bucket policy management.

    redundancyType String

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    serverSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Map<String,Object>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket string
    corsRules BucketCorsRuleArgs[]

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    forceDestroy boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    lifecycleRules BucketLifecycleRuleArgs[]

    A configuration of object lifecycle management (documented below).

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    loggingIsenable boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    policy string

    Json format text of bucket policy bucket policy management.

    redundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    serverSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags {[key: string]: any}

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl str

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket str
    cors_rules Sequence[BucketCorsRuleArgs]

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    force_destroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    lifecycle_rules Sequence[BucketLifecycleRuleArgs]

    A configuration of object lifecycle management (documented below).

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    logging_isenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    policy str

    Json format text of bucket policy bucket policy management.

    redundancy_type str

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    referer_config BucketRefererConfigArgs

    The configuration of referer (documented below).

    server_side_encryption_rule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storage_class str

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Mapping[str, Any]

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transfer_acceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl String

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket String
    corsRules List<Property Map>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    forceDestroy Boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    lifecycleRules List<Property Map>

    A configuration of object lifecycle management (documented below).

    logging Property Map

    A Settings of bucket logging (documented below).

    loggingIsenable Boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    policy String

    Json format text of bucket policy bucket policy management.

    redundancyType String

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig Property Map

    The configuration of referer (documented below).

    serverSideEncryptionRule Property Map

    A configuration of server-side encryption (documented below).

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Map<Any>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration Property Map

    A transfer acceleration status of a bucket (documented below).

    versioning Property Map

    A state of versioning (documented below).

    website Property Map

    A website object(documented below).

    Outputs

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

    CreationDate string

    The creation date of the bucket.

    ExtranetEndpoint string

    The extranet access endpoint of the bucket.

    Id string

    The provider-assigned unique ID for this managed resource.

    IntranetEndpoint string

    The intranet access endpoint of the bucket.

    Location string

    The location of the bucket.

    Owner string

    The bucket owner.

    CreationDate string

    The creation date of the bucket.

    ExtranetEndpoint string

    The extranet access endpoint of the bucket.

    Id string

    The provider-assigned unique ID for this managed resource.

    IntranetEndpoint string

    The intranet access endpoint of the bucket.

    Location string

    The location of the bucket.

    Owner string

    The bucket owner.

    creationDate String

    The creation date of the bucket.

    extranetEndpoint String

    The extranet access endpoint of the bucket.

    id String

    The provider-assigned unique ID for this managed resource.

    intranetEndpoint String

    The intranet access endpoint of the bucket.

    location String

    The location of the bucket.

    owner String

    The bucket owner.

    creationDate string

    The creation date of the bucket.

    extranetEndpoint string

    The extranet access endpoint of the bucket.

    id string

    The provider-assigned unique ID for this managed resource.

    intranetEndpoint string

    The intranet access endpoint of the bucket.

    location string

    The location of the bucket.

    owner string

    The bucket owner.

    creation_date str

    The creation date of the bucket.

    extranet_endpoint str

    The extranet access endpoint of the bucket.

    id str

    The provider-assigned unique ID for this managed resource.

    intranet_endpoint str

    The intranet access endpoint of the bucket.

    location str

    The location of the bucket.

    owner str

    The bucket owner.

    creationDate String

    The creation date of the bucket.

    extranetEndpoint String

    The extranet access endpoint of the bucket.

    id String

    The provider-assigned unique ID for this managed resource.

    intranetEndpoint String

    The intranet access endpoint of the bucket.

    location String

    The location of the bucket.

    owner String

    The bucket owner.

    Look up Existing Bucket Resource

    Get an existing Bucket 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?: BucketState, opts?: CustomResourceOptions): Bucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl: Optional[str] = None,
            bucket: Optional[str] = None,
            cors_rules: Optional[Sequence[BucketCorsRuleArgs]] = None,
            creation_date: Optional[str] = None,
            extranet_endpoint: Optional[str] = None,
            force_destroy: Optional[bool] = None,
            intranet_endpoint: Optional[str] = None,
            lifecycle_rules: Optional[Sequence[BucketLifecycleRuleArgs]] = None,
            location: Optional[str] = None,
            logging: Optional[BucketLoggingArgs] = None,
            logging_isenable: Optional[bool] = None,
            owner: Optional[str] = None,
            policy: Optional[str] = None,
            redundancy_type: Optional[str] = None,
            referer_config: Optional[BucketRefererConfigArgs] = None,
            server_side_encryption_rule: Optional[BucketServerSideEncryptionRuleArgs] = None,
            storage_class: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            transfer_acceleration: Optional[BucketTransferAccelerationArgs] = None,
            versioning: Optional[BucketVersioningArgs] = None,
            website: Optional[BucketWebsiteArgs] = None) -> Bucket
    func GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)
    public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)
    public static Bucket get(String name, Output<String> id, BucketState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    BucketName string
    CorsRules List<Pulumi.AliCloud.Oss.Inputs.BucketCorsRuleArgs>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    CreationDate string

    The creation date of the bucket.

    ExtranetEndpoint string

    The extranet access endpoint of the bucket.

    ForceDestroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    IntranetEndpoint string

    The intranet access endpoint of the bucket.

    LifecycleRules List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleArgs>

    A configuration of object lifecycle management (documented below).

    Location string

    The location of the bucket.

    Logging Pulumi.AliCloud.Oss.Inputs.BucketLoggingArgs

    A Settings of bucket logging (documented below).

    LoggingIsenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    Owner string

    The bucket owner.

    Policy string

    Json format text of bucket policy bucket policy management.

    RedundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    RefererConfig Pulumi.AliCloud.Oss.Inputs.BucketRefererConfigArgs

    The configuration of referer (documented below).

    ServerSideEncryptionRule Pulumi.AliCloud.Oss.Inputs.BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    Tags Dictionary<string, object>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    TransferAcceleration Pulumi.AliCloud.Oss.Inputs.BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    Versioning Pulumi.AliCloud.Oss.Inputs.BucketVersioningArgs

    A state of versioning (documented below).

    Website Pulumi.AliCloud.Oss.Inputs.BucketWebsiteArgs

    A website object(documented below).

    Acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    Bucket string
    CorsRules []BucketCorsRuleArgs

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    CreationDate string

    The creation date of the bucket.

    ExtranetEndpoint string

    The extranet access endpoint of the bucket.

    ForceDestroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    IntranetEndpoint string

    The intranet access endpoint of the bucket.

    LifecycleRules []BucketLifecycleRuleArgs

    A configuration of object lifecycle management (documented below).

    Location string

    The location of the bucket.

    Logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    LoggingIsenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    Owner string

    The bucket owner.

    Policy string

    Json format text of bucket policy bucket policy management.

    RedundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    RefererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    ServerSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    Tags map[string]interface{}

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    TransferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    Versioning BucketVersioningArgs

    A state of versioning (documented below).

    Website BucketWebsiteArgs

    A website object(documented below).

    acl String

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket String
    corsRules List<BucketCorsRuleArgs>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    creationDate String

    The creation date of the bucket.

    extranetEndpoint String

    The extranet access endpoint of the bucket.

    forceDestroy Boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    intranetEndpoint String

    The intranet access endpoint of the bucket.

    lifecycleRules List<BucketLifecycleRuleArgs>

    A configuration of object lifecycle management (documented below).

    location String

    The location of the bucket.

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    loggingIsenable Boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    owner String

    The bucket owner.

    policy String

    Json format text of bucket policy bucket policy management.

    redundancyType String

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    serverSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Map<String,Object>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl string

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket string
    corsRules BucketCorsRuleArgs[]

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    creationDate string

    The creation date of the bucket.

    extranetEndpoint string

    The extranet access endpoint of the bucket.

    forceDestroy boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    intranetEndpoint string

    The intranet access endpoint of the bucket.

    lifecycleRules BucketLifecycleRuleArgs[]

    A configuration of object lifecycle management (documented below).

    location string

    The location of the bucket.

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    loggingIsenable boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    owner string

    The bucket owner.

    policy string

    Json format text of bucket policy bucket policy management.

    redundancyType string

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig BucketRefererConfigArgs

    The configuration of referer (documented below).

    serverSideEncryptionRule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags {[key: string]: any}

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl str

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket str
    cors_rules Sequence[BucketCorsRuleArgs]

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    creation_date str

    The creation date of the bucket.

    extranet_endpoint str

    The extranet access endpoint of the bucket.

    force_destroy bool

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    intranet_endpoint str

    The intranet access endpoint of the bucket.

    lifecycle_rules Sequence[BucketLifecycleRuleArgs]

    A configuration of object lifecycle management (documented below).

    location str

    The location of the bucket.

    logging BucketLoggingArgs

    A Settings of bucket logging (documented below).

    logging_isenable bool

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    owner str

    The bucket owner.

    policy str

    Json format text of bucket policy bucket policy management.

    redundancy_type str

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    referer_config BucketRefererConfigArgs

    The configuration of referer (documented below).

    server_side_encryption_rule BucketServerSideEncryptionRuleArgs

    A configuration of server-side encryption (documented below).

    storage_class str

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Mapping[str, Any]

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transfer_acceleration BucketTransferAccelerationArgs

    A transfer acceleration status of a bucket (documented below).

    versioning BucketVersioningArgs

    A state of versioning (documented below).

    website BucketWebsiteArgs

    A website object(documented below).

    acl String

    The canned ACL to apply. Can be "private", "public-read" and "public-read-write". Defaults to "private".

    bucket String
    corsRules List<Property Map>

    A rule of Cross-Origin Resource Sharing (documented below). The items of core rule are no more than 10 for every OSS bucket.

    creationDate String

    The creation date of the bucket.

    extranetEndpoint String

    The extranet access endpoint of the bucket.

    forceDestroy Boolean

    A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. Defaults to "false".

    intranetEndpoint String

    The intranet access endpoint of the bucket.

    lifecycleRules List<Property Map>

    A configuration of object lifecycle management (documented below).

    location String

    The location of the bucket.

    logging Property Map

    A Settings of bucket logging (documented below).

    loggingIsenable Boolean

    The flag of using logging enable container. Defaults true.

    Deprecated:

    Deprecated from 1.37.0. When logging is set, the bucket logging will be able.

    owner String

    The bucket owner.

    policy String

    Json format text of bucket policy bucket policy management.

    redundancyType String

    The redundancy type to enable. Can be "LRS", and "ZRS". Defaults to "LRS".

    refererConfig Property Map

    The configuration of referer (documented below).

    serverSideEncryptionRule Property Map

    A configuration of server-side encryption (documented below).

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    tags Map<Any>

    A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.

    transferAcceleration Property Map

    A transfer acceleration status of a bucket (documented below).

    versioning Property Map

    A state of versioning (documented below).

    website Property Map

    A website object(documented below).

    Supporting Types

    BucketCorsRule

    AllowedMethods List<string>

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    AllowedOrigins List<string>

    Specifies which origins are allowed.

    AllowedHeaders List<string>

    Specifies which headers are allowed.

    ExposeHeaders List<string>

    Specifies expose header in the response.

    MaxAgeSeconds int

    Specifies time in seconds that browser can cache the response for a preflight request.

    AllowedMethods []string

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    AllowedOrigins []string

    Specifies which origins are allowed.

    AllowedHeaders []string

    Specifies which headers are allowed.

    ExposeHeaders []string

    Specifies expose header in the response.

    MaxAgeSeconds int

    Specifies time in seconds that browser can cache the response for a preflight request.

    allowedMethods List<String>

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    allowedOrigins List<String>

    Specifies which origins are allowed.

    allowedHeaders List<String>

    Specifies which headers are allowed.

    exposeHeaders List<String>

    Specifies expose header in the response.

    maxAgeSeconds Integer

    Specifies time in seconds that browser can cache the response for a preflight request.

    allowedMethods string[]

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    allowedOrigins string[]

    Specifies which origins are allowed.

    allowedHeaders string[]

    Specifies which headers are allowed.

    exposeHeaders string[]

    Specifies expose header in the response.

    maxAgeSeconds number

    Specifies time in seconds that browser can cache the response for a preflight request.

    allowed_methods Sequence[str]

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    allowed_origins Sequence[str]

    Specifies which origins are allowed.

    allowed_headers Sequence[str]

    Specifies which headers are allowed.

    expose_headers Sequence[str]

    Specifies expose header in the response.

    max_age_seconds int

    Specifies time in seconds that browser can cache the response for a preflight request.

    allowedMethods List<String>

    Specifies which methods are allowed. Can be GET, PUT, POST, DELETE or HEAD.

    allowedOrigins List<String>

    Specifies which origins are allowed.

    allowedHeaders List<String>

    Specifies which headers are allowed.

    exposeHeaders List<String>

    Specifies expose header in the response.

    maxAgeSeconds Number

    Specifies time in seconds that browser can cache the response for a preflight request.

    BucketLifecycleRule

    Enabled bool

    Specifies lifecycle rule status.

    AbortMultipartUploads List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleAbortMultipartUpload>

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    Expirations List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleExpiration>

    Specifies a period in the object's expire (documented below).

    Id string

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    NoncurrentVersionExpirations List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleNoncurrentVersionExpiration>

    Specifies when noncurrent object versions expire (documented below).

    NoncurrentVersionTransitions List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleNoncurrentVersionTransition>

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    Prefix string

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    Transitions List<Pulumi.AliCloud.Oss.Inputs.BucketLifecycleRuleTransition>

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    Enabled bool

    Specifies lifecycle rule status.

    AbortMultipartUploads []BucketLifecycleRuleAbortMultipartUpload

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    Expirations []BucketLifecycleRuleExpiration

    Specifies a period in the object's expire (documented below).

    Id string

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    NoncurrentVersionExpirations []BucketLifecycleRuleNoncurrentVersionExpiration

    Specifies when noncurrent object versions expire (documented below).

    NoncurrentVersionTransitions []BucketLifecycleRuleNoncurrentVersionTransition

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    Prefix string

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    Transitions []BucketLifecycleRuleTransition

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    enabled Boolean

    Specifies lifecycle rule status.

    abortMultipartUploads List<BucketLifecycleRuleAbortMultipartUpload>

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    expirations List<BucketLifecycleRuleExpiration>

    Specifies a period in the object's expire (documented below).

    id String

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    noncurrentVersionExpirations List<BucketLifecycleRuleNoncurrentVersionExpiration>

    Specifies when noncurrent object versions expire (documented below).

    noncurrentVersionTransitions List<BucketLifecycleRuleNoncurrentVersionTransition>

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    prefix String

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    transitions List<BucketLifecycleRuleTransition>

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    enabled boolean

    Specifies lifecycle rule status.

    abortMultipartUploads BucketLifecycleRuleAbortMultipartUpload[]

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    expirations BucketLifecycleRuleExpiration[]

    Specifies a period in the object's expire (documented below).

    id string

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    noncurrentVersionExpirations BucketLifecycleRuleNoncurrentVersionExpiration[]

    Specifies when noncurrent object versions expire (documented below).

    noncurrentVersionTransitions BucketLifecycleRuleNoncurrentVersionTransition[]

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    prefix string

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    transitions BucketLifecycleRuleTransition[]

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    enabled bool

    Specifies lifecycle rule status.

    abort_multipart_uploads Sequence[BucketLifecycleRuleAbortMultipartUpload]

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    expirations Sequence[BucketLifecycleRuleExpiration]

    Specifies a period in the object's expire (documented below).

    id str

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    noncurrent_version_expirations Sequence[BucketLifecycleRuleNoncurrentVersionExpiration]

    Specifies when noncurrent object versions expire (documented below).

    noncurrent_version_transitions Sequence[BucketLifecycleRuleNoncurrentVersionTransition]

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    prefix str

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    transitions Sequence[BucketLifecycleRuleTransition]

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    enabled Boolean

    Specifies lifecycle rule status.

    abortMultipartUploads List<Property Map>

    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed (documented below).

    expirations List<Property Map>

    Specifies a period in the object's expire (documented below).

    id String

    Unique identifier for the rule. If omitted, OSS bucket will assign a unique name.

    noncurrentVersionExpirations List<Property Map>

    Specifies when noncurrent object versions expire (documented below).

    noncurrentVersionTransitions List<Property Map>

    Specifies when noncurrent object versions transitions (documented below).

    NOTE: At least one of expiration, transitions, abort_multipart_upload, noncurrent_version_expiration and noncurrent_version_transition should be configured.

    prefix String

    Object key prefix identifying one or more objects to which the rule applies. Default value is null, the rule applies to all objects in a bucket.

    transitions List<Property Map>

    Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle. (documented below).

    BucketLifecycleRuleAbortMultipartUpload

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days Integer

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    createdBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    created_before_date str

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days Number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    BucketLifecycleRuleExpiration

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Date string

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    ExpiredObjectDeleteMarker bool

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Date string

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    ExpiredObjectDeleteMarker bool

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    date String

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    days Integer

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    expiredObjectDeleteMarker Boolean

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    createdBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    date string

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    days number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    expiredObjectDeleteMarker boolean

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    created_before_date str

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    date str

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    expired_object_delete_marker bool

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    date String

    Specifies the date after which you want the corresponding action to take effect. The value obeys ISO8601 format like 2017-03-09.

    days Number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    expiredObjectDeleteMarker Boolean

    On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct OSS to delete expired object delete markers. This cannot be specified with Days, Date or CreatedBeforeDate in a Lifecycle Expiration Policy.

    NOTE: One and only one of "date", "days", "created_before_date" and "expired_object_delete_marker" can be specified in one expiration configuration.

    BucketLifecycleRuleNoncurrentVersionExpiration

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    days Integer

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    days number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    days Number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    BucketLifecycleRuleNoncurrentVersionTransition

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    days Integer

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    days number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storage_class str

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    days Number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    BucketLifecycleRuleTransition

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    CreatedBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    Days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    StorageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days Integer

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    createdBeforeDate string

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass string

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    created_before_date str

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days int

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storage_class str

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    createdBeforeDate String

    Specifies the time before which the rules take effect. The date must conform to the ISO8601 format and always be UTC 00:00. For example: 2002-10-11T00:00:00.000Z indicates that objects updated before 2002-10-11T00:00:00.000Z are deleted or converted to another storage class, and objects updated after this time (including this time) are not deleted or converted.

    days Number

    Specifies the number of days after object creation when the specific rule action takes effect.

    NOTE: One and only one of "created_before_date" and "days" can be specified in one abort_multipart_upload configuration.

    storageClass String

    The storage class to apply. Can be "Standard", "IA", "Archive" and "ColdArchive". Defaults to "Standard". "ColdArchive" is available in 1.203.0+.

    BucketLogging

    TargetBucket string

    The name of the bucket that will receive the log objects.

    TargetPrefix string

    To specify a key prefix for log objects.

    TargetBucket string

    The name of the bucket that will receive the log objects.

    TargetPrefix string

    To specify a key prefix for log objects.

    targetBucket String

    The name of the bucket that will receive the log objects.

    targetPrefix String

    To specify a key prefix for log objects.

    targetBucket string

    The name of the bucket that will receive the log objects.

    targetPrefix string

    To specify a key prefix for log objects.

    target_bucket str

    The name of the bucket that will receive the log objects.

    target_prefix str

    To specify a key prefix for log objects.

    targetBucket String

    The name of the bucket that will receive the log objects.

    targetPrefix String

    To specify a key prefix for log objects.

    BucketRefererConfig

    Referers List<string>

    The list of referer.

    AllowEmpty bool

    Allows referer to be empty. Defaults false.

    Referers []string

    The list of referer.

    AllowEmpty bool

    Allows referer to be empty. Defaults false.

    referers List<String>

    The list of referer.

    allowEmpty Boolean

    Allows referer to be empty. Defaults false.

    referers string[]

    The list of referer.

    allowEmpty boolean

    Allows referer to be empty. Defaults false.

    referers Sequence[str]

    The list of referer.

    allow_empty bool

    Allows referer to be empty. Defaults false.

    referers List<String>

    The list of referer.

    allowEmpty Boolean

    Allows referer to be empty. Defaults false.

    BucketServerSideEncryptionRule

    SseAlgorithm string

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    KmsMasterKeyId string

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    SseAlgorithm string

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    KmsMasterKeyId string

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    sseAlgorithm String

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    kmsMasterKeyId String

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    sseAlgorithm string

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    kmsMasterKeyId string

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    sse_algorithm str

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    kms_master_key_id str

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    sseAlgorithm String

    The server-side encryption algorithm to use. Possible values: AES256 and KMS.

    kmsMasterKeyId String

    The alibaba cloud KMS master key ID used for the SSE-KMS encryption.

    BucketTransferAcceleration

    Enabled bool

    Specifies lifecycle rule status.

    Enabled bool

    Specifies lifecycle rule status.

    enabled Boolean

    Specifies lifecycle rule status.

    enabled boolean

    Specifies lifecycle rule status.

    enabled bool

    Specifies lifecycle rule status.

    enabled Boolean

    Specifies lifecycle rule status.

    BucketVersioning

    Status string

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    Status string

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    status String

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    status string

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    status str

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    status String

    Specifies the versioning state of a bucket. Valid values: Enabled and Suspended.

    NOTE: Currently, the versioning feature is only available in ap-south-1 and with white list. If you want to use it, please contact us.

    BucketWebsite

    IndexDocument string

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    ErrorDocument string

    An absolute path to the document to return in case of a 4XX error.

    IndexDocument string

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    ErrorDocument string

    An absolute path to the document to return in case of a 4XX error.

    indexDocument String

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    errorDocument String

    An absolute path to the document to return in case of a 4XX error.

    indexDocument string

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    errorDocument string

    An absolute path to the document to return in case of a 4XX error.

    index_document str

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    error_document str

    An absolute path to the document to return in case of a 4XX error.

    indexDocument String

    Alicloud OSS returns this index document when requests are made to the root domain or any of the subfolders.

    errorDocument String

    An absolute path to the document to return in case of a 4XX error.

    Import

    OSS bucket can be imported using the bucket name, e.g.

     $ pulumi import alicloud:oss/bucket:Bucket bucket bucket-12345678
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.38.0 published on Friday, Jun 2, 2023 by Pulumi