All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.oss.kotlin.BucketArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.oss.kotlin

import com.pulumi.alicloud.oss.BucketArgs.builder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketAccessMonitorArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketAccessMonitorArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketCorsRuleArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketCorsRuleArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketLifecycleRuleArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketLifecycleRuleArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketLoggingArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketLoggingArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketRefererConfigArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketRefererConfigArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketServerSideEncryptionRuleArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketServerSideEncryptionRuleArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketTransferAccelerationArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketTransferAccelerationArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketVersioningArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketVersioningArgsBuilder
import com.pulumi.alicloud.oss.kotlin.inputs.BucketWebsiteArgs
import com.pulumi.alicloud.oss.kotlin.inputs.BucketWebsiteArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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.
 * > **NOTE:** Available since v1.2.0.
 * ## Example Usage
 * Private Bucket
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * import * as random from "@pulumi/random";
 * const _default = new random.index.Integer("default", {
 *     max: 99999,
 *     min: 10000,
 * });
 * const bucket_acl = new alicloud.oss.Bucket("bucket-acl", {bucket: `example-value-${_default.result}`});
 * const bucket_aclBucketAcl = new alicloud.oss.BucketAcl("bucket-acl", {
 *     bucket: bucket_acl.bucket,
 *     acl: "private",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * import pulumi_random as random
 * default = random.index.Integer("default",
 *     max=99999,
 *     min=10000)
 * bucket_acl = alicloud.oss.Bucket("bucket-acl", bucket=f"example-value-{default['result']}")
 * bucket_acl_bucket_acl = alicloud.oss.BucketAcl("bucket-acl",
 *     bucket=bucket_acl.bucket,
 *     acl="private")
 * ```
 * ```csharp
 * 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.Index.Integer("default", new()
 *     {
 *         Max = 99999,
 *         Min = 10000,
 *     });
 *     var bucket_acl = new AliCloud.Oss.Bucket("bucket-acl", new()
 *     {
 *         BucketName = $"example-value-{@default.Result}",
 *     });
 *     var bucket_aclBucketAcl = new AliCloud.Oss.BucketAcl("bucket-acl", new()
 *     {
 *         Bucket = bucket_acl.BucketName,
 *         Acl = "private",
 *     });
 * });
 * ```
 * ```go
 * 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.NewInteger(ctx, "default", &random.IntegerArgs{
 * 			Max: 99999,
 * 			Min: 10000,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucket(ctx, "bucket-acl", &oss.BucketArgs{
 * 			Bucket: pulumi.Sprintf("example-value-%v", _default.Result),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucketAcl(ctx, "bucket-acl", &oss.BucketAclArgs{
 * 			Bucket: bucket_acl.Bucket,
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.oss.Bucket;
 * import com.pulumi.alicloud.oss.BucketArgs;
 * import com.pulumi.alicloud.oss.BucketAcl;
 * import com.pulumi.alicloud.oss.BucketAclArgs;
 * 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 Integer("default", IntegerArgs.builder()
 *             .max(99999)
 *             .min(10000)
 *             .build());
 *         var bucket_acl = new Bucket("bucket-acl", BucketArgs.builder()
 *             .bucket(String.format("example-value-%s", default_.result()))
 *             .build());
 *         var bucket_aclBucketAcl = new BucketAcl("bucket-aclBucketAcl", BucketAclArgs.builder()
 *             .bucket(bucket_acl.bucket())
 *             .acl("private")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: random:integer
 *     properties:
 *       max: 99999
 *       min: 10000
 *   bucket-acl:
 *     type: alicloud:oss:Bucket
 *     properties:
 *       bucket: example-value-${default.result}
 *   bucket-aclBucketAcl:
 *     type: alicloud:oss:BucketAcl
 *     name: bucket-acl
 *     properties:
 *       bucket: ${["bucket-acl"].bucket}
 *       acl: private
 * ```
 * 
 * Static Website
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * import * as random from "@pulumi/random";
 * const _default = new random.index.Integer("default", {
 *     max: 99999,
 *     min: 10000,
 * });
 * const bucket_website = new alicloud.oss.Bucket("bucket-website", {
 *     bucket: `example-value-${_default.result}`,
 *     website: {
 *         indexDocument: "index.html",
 *         errorDocument: "error.html",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * import pulumi_random as random
 * default = random.index.Integer("default",
 *     max=99999,
 *     min=10000)
 * bucket_website = alicloud.oss.Bucket("bucket-website",
 *     bucket=f"example-value-{default['result']}",
 *     website={
 *         "index_document": "index.html",
 *         "error_document": "error.html",
 *     })
 * ```
 * ```csharp
 * 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.Index.Integer("default", new()
 *     {
 *         Max = 99999,
 *         Min = 10000,
 *     });
 *     var bucket_website = new AliCloud.Oss.Bucket("bucket-website", new()
 *     {
 *         BucketName = $"example-value-{@default.Result}",
 *         Website = new AliCloud.Oss.Inputs.BucketWebsiteArgs
 *         {
 *             IndexDocument = "index.html",
 *             ErrorDocument = "error.html",
 *         },
 *     });
 * });
 * ```
 * ```go
 * 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.NewInteger(ctx, "default", &random.IntegerArgs{
 * 			Max: 99999,
 * 			Min: 10000,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucket(ctx, "bucket-website", &oss.BucketArgs{
 * 			Bucket: pulumi.Sprintf("example-value-%v", _default.Result),
 * 			Website: &oss.BucketWebsiteArgs{
 * 				IndexDocument: pulumi.String("index.html"),
 * 				ErrorDocument: pulumi.String("error.html"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * 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 Integer("default", IntegerArgs.builder()
 *             .max(99999)
 *             .min(10000)
 *             .build());
 *         var bucket_website = new Bucket("bucket-website", BucketArgs.builder()
 *             .bucket(String.format("example-value-%s", default_.result()))
 *             .website(BucketWebsiteArgs.builder()
 *                 .indexDocument("index.html")
 *                 .errorDocument("error.html")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: random:integer
 *     properties:
 *       max: 99999
 *       min: 10000
 *   bucket-website:
 *     type: alicloud:oss:Bucket
 *     properties:
 *       bucket: example-value-${default.result}
 *       website:
 *         indexDocument: index.html
 *         errorDocument: error.html
 * ```
 * 
 * Enable Logging
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * import * as random from "@pulumi/random";
 * const _default = new random.index.Integer("default", {
 *     max: 99999,
 *     min: 10000,
 * });
 * const bucket_target = new alicloud.oss.Bucket("bucket-target", {bucket: `example-value-${_default.result}`});
 * const bucket_targetBucketAcl = new alicloud.oss.BucketAcl("bucket-target", {
 *     bucket: bucket_target.bucket,
 *     acl: "public-read",
 * });
 * const bucket_logging = new alicloud.oss.Bucket("bucket-logging", {
 *     bucket: `example-logging-${_default.result}`,
 *     logging: {
 *         targetBucket: bucket_target.id,
 *         targetPrefix: "log/",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * import pulumi_random as random
 * default = random.index.Integer("default",
 *     max=99999,
 *     min=10000)
 * bucket_target = alicloud.oss.Bucket("bucket-target", bucket=f"example-value-{default['result']}")
 * bucket_target_bucket_acl = alicloud.oss.BucketAcl("bucket-target",
 *     bucket=bucket_target.bucket,
 *     acl="public-read")
 * bucket_logging = alicloud.oss.Bucket("bucket-logging",
 *     bucket=f"example-logging-{default['result']}",
 *     logging={
 *         "target_bucket": bucket_target.id,
 *         "target_prefix": "log/",
 *     })
 * ```
 * ```csharp
 * 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.Index.Integer("default", new()
 *     {
 *         Max = 99999,
 *         Min = 10000,
 *     });
 *     var bucket_target = new AliCloud.Oss.Bucket("bucket-target", new()
 *     {
 *         BucketName = $"example-value-{@default.Result}",
 *     });
 *     var bucket_targetBucketAcl = new AliCloud.Oss.BucketAcl("bucket-target", new()
 *     {
 *         Bucket = bucket_target.BucketName,
 *         Acl = "public-read",
 *     });
 *     var bucket_logging = new AliCloud.Oss.Bucket("bucket-logging", new()
 *     {
 *         BucketName = $"example-logging-{@default.Result}",
 *         Logging = new AliCloud.Oss.Inputs.BucketLoggingArgs
 *         {
 *             TargetBucket = bucket_target.Id,
 *             TargetPrefix = "log/",
 *         },
 *     });
 * });
 * ```
 * ```go
 * 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.NewInteger(ctx, "default", &random.IntegerArgs{
 * 			Max: 99999,
 * 			Min: 10000,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucket(ctx, "bucket-target", &oss.BucketArgs{
 * 			Bucket: pulumi.Sprintf("example-value-%v", _default.Result),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucketAcl(ctx, "bucket-target", &oss.BucketAclArgs{
 * 			Bucket: bucket_target.Bucket,
 * 			Acl:    pulumi.String("public-read"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucket(ctx, "bucket-logging", &oss.BucketArgs{
 * 			Bucket: pulumi.Sprintf("example-logging-%v", _default.Result),
 * 			Logging: &oss.BucketLoggingTypeArgs{
 * 				TargetBucket: bucket_target.ID(),
 * 				TargetPrefix: pulumi.String("log/"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.oss.Bucket;
 * import com.pulumi.alicloud.oss.BucketArgs;
 * import com.pulumi.alicloud.oss.BucketAcl;
 * import com.pulumi.alicloud.oss.BucketAclArgs;
 * 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 Integer("default", IntegerArgs.builder()
 *             .max(99999)
 *             .min(10000)
 *             .build());
 *         var bucket_target = new Bucket("bucket-target", BucketArgs.builder()
 *             .bucket(String.format("example-value-%s", default_.result()))
 *             .build());
 *         var bucket_targetBucketAcl = new BucketAcl("bucket-targetBucketAcl", BucketAclArgs.builder()
 *             .bucket(bucket_target.bucket())
 *             .acl("public-read")
 *             .build());
 *         var bucket_logging = new Bucket("bucket-logging", BucketArgs.builder()
 *             .bucket(String.format("example-logging-%s", default_.result()))
 *             .logging(BucketLoggingArgs.builder()
 *                 .targetBucket(bucket_target.id())
 *                 .targetPrefix("log/")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: random:integer
 *     properties:
 *       max: 99999
 *       min: 10000
 *   bucket-target:
 *     type: alicloud:oss:Bucket
 *     properties:
 *       bucket: example-value-${default.result}
 *   bucket-targetBucketAcl:
 *     type: alicloud:oss:BucketAcl
 *     name: bucket-target
 *     properties:
 *       bucket: ${["bucket-target"].bucket}
 *       acl: public-read
 *   bucket-logging:
 *     type: alicloud:oss:Bucket
 *     properties:
 *       bucket: example-logging-${default.result}
 *       logging:
 *         targetBucket: ${["bucket-target"].id}
 *         targetPrefix: log/
 * ```
 * 
 * Referer configuration
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * import * as random from "@pulumi/random";
 * const _default = new random.index.Integer("default", {
 *     max: 99999,
 *     min: 10000,
 * });
 * const bucket_referer = new alicloud.oss.Bucket("bucket-referer", {
 *     bucket: `example-value-${_default.result}`,
 *     refererConfig: {
 *         allowEmpty: false,
 *         referers: [
 *             "http://www.aliyun.com",
 *             "https://www.aliyun.com",
 *         ],
 *     },
 * });
 * const defaultBucketAcl = new alicloud.oss.BucketAcl("default", {
 *     bucket: bucket_referer.bucket,
 *     acl: "private",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * import pulumi_random as random
 * default = random.index.Integer("default",
 *     max=99999,
 *     min=10000)
 * bucket_referer = alicloud.oss.Bucket("bucket-referer",
 *     bucket=f"example-value-{default['result']}",
 *     referer_config={
 *         "allow_empty": False,
 *         "referers": [
 *             "http://www.aliyun.com",
 *             "https://www.aliyun.com",
 *         ],
 *     })
 * default_bucket_acl = alicloud.oss.BucketAcl("default",
 *     bucket=bucket_referer.bucket,
 *     acl="private")
 * ```
 * ```csharp
 * 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.Index.Integer("default", new()
 *     {
 *         Max = 99999,
 *         Min = 10000,
 *     });
 *     var bucket_referer = new AliCloud.Oss.Bucket("bucket-referer", new()
 *     {
 *         BucketName = $"example-value-{@default.Result}",
 *         RefererConfig = new AliCloud.Oss.Inputs.BucketRefererConfigArgs
 *         {
 *             AllowEmpty = false,
 *             Referers = new[]
 *             {
 *                 "http://www.aliyun.com",
 *                 "https://www.aliyun.com",
 *             },
 *         },
 *     });
 *     var defaultBucketAcl = new AliCloud.Oss.BucketAcl("default", new()
 *     {
 *         Bucket = bucket_referer.BucketName,
 *         Acl = "private",
 *     });
 * });
 * ```
 * ```go
 * 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.NewInteger(ctx, "default", &random.IntegerArgs{
 * 			Max: 99999,
 * 			Min: 10000,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = oss.NewBucket(ctx, "bucket-referer", &oss.BucketArgs{
 * 			Bucket: pulumi.Sprintf("example-value-%v", _default.Result),
 * 			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
 * 		}
 * 		_, err = oss.NewBucketAcl(ctx, "default", &oss.BucketAclArgs{
 * 			Bucket: bucket_referer.Bucket,
 * 			Acl:    pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.oss.Bucket;
 * import com.pulumi.alicloud.oss.BucketArgs;
 * import com.pulumi.alicloud.oss.inputs.BucketRefererConfigArgs;
 * import com.pulumi.alicloud.oss.BucketAcl;
 * import com.pulumi.alicloud.oss.BucketAclArgs;
 * 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 Integer("default", IntegerArgs.builder()
 *             .max(99999)
 *             .min(10000)
 *             .build());
 *         var bucket_referer = new Bucket("bucket-referer", BucketArgs.builder()
 *             .bucket(String.format("example-value-%s", default_.result()))
 *             .refererConfig(BucketRefererConfigArgs.builder()
 *                 .allowEmpty(false)
 *                 .referers(
 *                     "http://www.aliyun.com",
 *                     "https://www.aliyun.com")
 *                 .build())
 *             .build());
 *         var defaultBucketAcl = new BucketAcl("defaultBucketAcl", BucketAclArgs.builder()
 *             .bucket(bucket_referer.bucket())
 *             .acl("private")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: random:integer
 *     properties:
 *       max: 99999
 *       min: 10000
 *   bucket-referer:
 *     type: alicloud:oss:Bucket
 *     properties:
 *       bucket: example-value-${default.result}
 *       refererConfig:
 *         allowEmpty: false
 *         referers:
 *           - http://www.aliyun.com
 *           - https://www.aliyun.com
 *   defaultBucketAcl:
 *     type: alicloud:oss:BucketAcl
 *     name: default
 *     properties:
 *       bucket: ${["bucket-referer"].bucket}
 *       acl: private
 * ```
 * 
 * Set lifecycle rule
 * ## Import
 * OSS bucket can be imported using the bucket name, e.g.
 * ```sh
 * $ pulumi import alicloud:oss/bucket:Bucket bucket bucket-12345678
 * ```
 * @property accessMonitor A access monitor status of a bucket. See `access_monitor` below.
 * @property acl The [canned ACL](https://www.alibabacloud.com/help/doc-detail/31898.htm) to apply. Can be "private", "public-read" and "public-read-write". This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketAcl` instead.
 * @property bucket
 * @property corsRules A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
 * @property forceDestroy 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".
 * @property lifecycleRuleAllowSameActionOverlap A boolean that indicates lifecycle rules allow prefix overlap.
 * @property lifecycleRules A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
 * @property logging A Settings of [bucket logging](https://www.alibabacloud.com/help/doc-detail/31900.htm). See `logging` below.
 * @property loggingIsenable The flag of using logging enable container. Defaults true.
 * @property policy Json format text of bucket policy [bucket policy management](https://www.alibabacloud.com/help/doc-detail/100680.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketPolicy` instead.
 * @property redundancyType The [redundancy type](https://www.alibabacloud.com/help/doc-detail/90589.htm) to enable. Can be "LRS", and "ZRS". Defaults to "LRS".
 * @property refererConfig The configuration of [referer](https://www.alibabacloud.com/help/doc-detail/31901.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketReferer` instead. See `referer_config` below.
 * @property resourceGroupId The ID of the resource group to which the bucket belongs.
 * @property serverSideEncryptionRule A configuration of server-side encryption. See `server_side_encryption_rule` below.
 * @property storageClass The [storage class](https://www.alibabacloud.com/help/doc-detail/51374.htm) to apply. Can be "Standard", "IA", "Archive", "ColdArchive" and "DeepColdArchive". Defaults to "Standard". "ColdArchive" is available since 1.203.0. "DeepColdArchive" is available since 1.209.0.
 * @property tags A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.
 * @property transferAcceleration A transfer acceleration status of a bucket. See `transfer_acceleration` below.
 * @property versioning A state of versioning. See `versioning` below.
 * @property website A website configuration. See `website` below.
 */
public data class BucketArgs(
    public val accessMonitor: Output? = null,
    @Deprecated(
        message = """
  Field 'acl' has been deprecated since provider version 1.220.0. New resource
      'alicloud_oss_bucket_acl' instead.
  """,
    )
    public val acl: Output? = null,
    public val bucket: Output? = null,
    public val corsRules: Output>? = null,
    public val forceDestroy: Output? = null,
    public val lifecycleRuleAllowSameActionOverlap: Output? = null,
    public val lifecycleRules: Output>? = null,
    public val logging: Output? = null,
    @Deprecated(
        message = """
  Deprecated from 1.37.0. When `logging` is set, the bucket logging will be able.
  """,
    )
    public val loggingIsenable: Output? = null,
    public val policy: Output? = null,
    public val redundancyType: Output? = null,
    public val refererConfig: Output? = null,
    public val resourceGroupId: Output? = null,
    public val serverSideEncryptionRule: Output? = null,
    public val storageClass: Output? = null,
    public val tags: Output>? = null,
    public val transferAcceleration: Output? = null,
    public val versioning: Output? = null,
    public val website: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.oss.BucketArgs =
        com.pulumi.alicloud.oss.BucketArgs.builder()
            .accessMonitor(accessMonitor?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .acl(acl?.applyValue({ args0 -> args0 }))
            .bucket(bucket?.applyValue({ args0 -> args0 }))
            .corsRules(
                corsRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .forceDestroy(forceDestroy?.applyValue({ args0 -> args0 }))
            .lifecycleRuleAllowSameActionOverlap(
                lifecycleRuleAllowSameActionOverlap?.applyValue({ args0 ->
                    args0
                }),
            )
            .lifecycleRules(
                lifecycleRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .logging(logging?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .loggingIsenable(loggingIsenable?.applyValue({ args0 -> args0 }))
            .policy(policy?.applyValue({ args0 -> args0 }))
            .redundancyType(redundancyType?.applyValue({ args0 -> args0 }))
            .refererConfig(refererConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupId(resourceGroupId?.applyValue({ args0 -> args0 }))
            .serverSideEncryptionRule(
                serverSideEncryptionRule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .storageClass(storageClass?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .transferAcceleration(
                transferAcceleration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .versioning(versioning?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .website(website?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [BucketArgs].
 */
@PulumiTagMarker
public class BucketArgsBuilder internal constructor() {
    private var accessMonitor: Output? = null

    private var acl: Output? = null

    private var bucket: Output? = null

    private var corsRules: Output>? = null

    private var forceDestroy: Output? = null

    private var lifecycleRuleAllowSameActionOverlap: Output? = null

    private var lifecycleRules: Output>? = null

    private var logging: Output? = null

    private var loggingIsenable: Output? = null

    private var policy: Output? = null

    private var redundancyType: Output? = null

    private var refererConfig: Output? = null

    private var resourceGroupId: Output? = null

    private var serverSideEncryptionRule: Output? = null

    private var storageClass: Output? = null

    private var tags: Output>? = null

    private var transferAcceleration: Output? = null

    private var versioning: Output? = null

    private var website: Output? = null

    /**
     * @param value A access monitor status of a bucket. See `access_monitor` below.
     */
    @JvmName("orbfgmjtropjunvx")
    public suspend fun accessMonitor(`value`: Output) {
        this.accessMonitor = value
    }

    /**
     * @param value The [canned ACL](https://www.alibabacloud.com/help/doc-detail/31898.htm) to apply. Can be "private", "public-read" and "public-read-write". This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketAcl` instead.
     */
    @Deprecated(
        message = """
  Field 'acl' has been deprecated since provider version 1.220.0. New resource
      'alicloud_oss_bucket_acl' instead.
  """,
    )
    @JvmName("flvoicdwvcopdada")
    public suspend fun acl(`value`: Output) {
        this.acl = value
    }

    /**
     * @param value
     */
    @JvmName("wgbsjdvwpgeephqk")
    public suspend fun bucket(`value`: Output) {
        this.bucket = value
    }

    /**
     * @param value A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("meluwqlhjstgmicp")
    public suspend fun corsRules(`value`: Output>) {
        this.corsRules = value
    }

    @JvmName("piaknqkmigdwbuwn")
    public suspend fun corsRules(vararg values: Output) {
        this.corsRules = Output.all(values.asList())
    }

    /**
     * @param values A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("tsgeogvsexlkcucm")
    public suspend fun corsRules(values: List>) {
        this.corsRules = Output.all(values)
    }

    /**
     * @param value 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".
     */
    @JvmName("hmyugxtupfufgmbo")
    public suspend fun forceDestroy(`value`: Output) {
        this.forceDestroy = value
    }

    /**
     * @param value A boolean that indicates lifecycle rules allow prefix overlap.
     */
    @JvmName("gerfypowjrpxpxfc")
    public suspend fun lifecycleRuleAllowSameActionOverlap(`value`: Output) {
        this.lifecycleRuleAllowSameActionOverlap = value
    }

    /**
     * @param value A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("hwnetmmlfaxgxjgu")
    public suspend fun lifecycleRules(`value`: Output>) {
        this.lifecycleRules = value
    }

    @JvmName("bxabemjqreljctwp")
    public suspend fun lifecycleRules(vararg values: Output) {
        this.lifecycleRules = Output.all(values.asList())
    }

    /**
     * @param values A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("jbxkobtxvhhsasaj")
    public suspend fun lifecycleRules(values: List>) {
        this.lifecycleRules = Output.all(values)
    }

    /**
     * @param value A Settings of [bucket logging](https://www.alibabacloud.com/help/doc-detail/31900.htm). See `logging` below.
     */
    @JvmName("xhxrbrmtrmbshpel")
    public suspend fun logging(`value`: Output) {
        this.logging = value
    }

    /**
     * @param value The flag of using logging enable container. Defaults true.
     */
    @Deprecated(
        message = """
  Deprecated from 1.37.0. When `logging` is set, the bucket logging will be able.
  """,
    )
    @JvmName("futylprunycbxers")
    public suspend fun loggingIsenable(`value`: Output) {
        this.loggingIsenable = value
    }

    /**
     * @param value Json format text of bucket policy [bucket policy management](https://www.alibabacloud.com/help/doc-detail/100680.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketPolicy` instead.
     */
    @JvmName("hggbmrlxadghsyir")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value The [redundancy type](https://www.alibabacloud.com/help/doc-detail/90589.htm) to enable. Can be "LRS", and "ZRS". Defaults to "LRS".
     */
    @JvmName("bhdbebtakvuxteed")
    public suspend fun redundancyType(`value`: Output) {
        this.redundancyType = value
    }

    /**
     * @param value The configuration of [referer](https://www.alibabacloud.com/help/doc-detail/31901.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketReferer` instead. See `referer_config` below.
     */
    @JvmName("oihoqiqohdrkhdex")
    public suspend fun refererConfig(`value`: Output) {
        this.refererConfig = value
    }

    /**
     * @param value The ID of the resource group to which the bucket belongs.
     */
    @JvmName("pibsdbgbmplvnwvl")
    public suspend fun resourceGroupId(`value`: Output) {
        this.resourceGroupId = value
    }

    /**
     * @param value A configuration of server-side encryption. See `server_side_encryption_rule` below.
     */
    @JvmName("mvbhjqpodehhjlyb")
    public suspend fun serverSideEncryptionRule(`value`: Output) {
        this.serverSideEncryptionRule = value
    }

    /**
     * @param value The [storage class](https://www.alibabacloud.com/help/doc-detail/51374.htm) to apply. Can be "Standard", "IA", "Archive", "ColdArchive" and "DeepColdArchive". Defaults to "Standard". "ColdArchive" is available since 1.203.0. "DeepColdArchive" is available since 1.209.0.
     */
    @JvmName("psxochfyufbioelo")
    public suspend fun storageClass(`value`: Output) {
        this.storageClass = value
    }

    /**
     * @param value A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.
     */
    @JvmName("elfmeniuaqrgreil")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A transfer acceleration status of a bucket. See `transfer_acceleration` below.
     */
    @JvmName("hnbdsiwsdxpccoeu")
    public suspend fun transferAcceleration(`value`: Output) {
        this.transferAcceleration = value
    }

    /**
     * @param value A state of versioning. See `versioning` below.
     */
    @JvmName("igsrtygtxbylsijq")
    public suspend fun versioning(`value`: Output) {
        this.versioning = value
    }

    /**
     * @param value A website configuration. See `website` below.
     */
    @JvmName("kfxscaoqrnaelgtl")
    public suspend fun website(`value`: Output) {
        this.website = value
    }

    /**
     * @param value A access monitor status of a bucket. See `access_monitor` below.
     */
    @JvmName("xwqnotnmxhvyrlqe")
    public suspend fun accessMonitor(`value`: BucketAccessMonitorArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessMonitor = mapped
    }

    /**
     * @param argument A access monitor status of a bucket. See `access_monitor` below.
     */
    @JvmName("gysfbxaalredhegd")
    public suspend fun accessMonitor(argument: suspend BucketAccessMonitorArgsBuilder.() -> Unit) {
        val toBeMapped = BucketAccessMonitorArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.accessMonitor = mapped
    }

    /**
     * @param value The [canned ACL](https://www.alibabacloud.com/help/doc-detail/31898.htm) to apply. Can be "private", "public-read" and "public-read-write". This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketAcl` instead.
     */
    @Deprecated(
        message = """
  Field 'acl' has been deprecated since provider version 1.220.0. New resource
      'alicloud_oss_bucket_acl' instead.
  """,
    )
    @JvmName("rtlqmujuwedeytjc")
    public suspend fun acl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acl = mapped
    }

    /**
     * @param value
     */
    @JvmName("pnhndckbwvwdegdn")
    public suspend fun bucket(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bucket = mapped
    }

    /**
     * @param value A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("qpwdkjuncjfeobep")
    public suspend fun corsRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("yfbtmlknoufcgtve")
    public suspend fun corsRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketCorsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("sytarqrufgxpuwts")
    public suspend fun corsRules(vararg argument: suspend BucketCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketCorsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("yarljvuaetgnokyb")
    public suspend fun corsRules(argument: suspend BucketCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BucketCorsRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param values A rule of  [Cross-Origin Resource Sharing](https://www.alibabacloud.com/help/doc-detail/31903.htm). The items of core rule are no more than 10 for every OSS bucket. See `cors_rule` below.
     */
    @JvmName("ywkqpgyhlybuwuwe")
    public suspend fun corsRules(vararg values: BucketCorsRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param value 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".
     */
    @JvmName("xoekpfnppbuhmebr")
    public suspend fun forceDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceDestroy = mapped
    }

    /**
     * @param value A boolean that indicates lifecycle rules allow prefix overlap.
     */
    @JvmName("wctpeikejillncyx")
    public suspend fun lifecycleRuleAllowSameActionOverlap(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lifecycleRuleAllowSameActionOverlap = mapped
    }

    /**
     * @param value A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("dlodomqhvonmtlkb")
    public suspend fun lifecycleRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("ytlpjyamvojtpprc")
    public suspend fun lifecycleRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketLifecycleRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("nuhuxqgfgyvpuulg")
    public suspend fun lifecycleRules(vararg argument: suspend BucketLifecycleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketLifecycleRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param argument A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("idirrvhmymkgtspp")
    public suspend fun lifecycleRules(argument: suspend BucketLifecycleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BucketLifecycleRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.lifecycleRules = mapped
    }

    /**
     * @param values A configuration of [object lifecycle management](https://www.alibabacloud.com/help/doc-detail/31904.htm). See `lifecycle_rule` below.
     */
    @JvmName("hsxaghfmigpqvaxg")
    public suspend fun lifecycleRules(vararg values: BucketLifecycleRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifecycleRules = mapped
    }

    /**
     * @param value A Settings of [bucket logging](https://www.alibabacloud.com/help/doc-detail/31900.htm). See `logging` below.
     */
    @JvmName("qtddsjifygmnrbiu")
    public suspend fun logging(`value`: BucketLoggingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logging = mapped
    }

    /**
     * @param argument A Settings of [bucket logging](https://www.alibabacloud.com/help/doc-detail/31900.htm). See `logging` below.
     */
    @JvmName("fvkgunitoiimgica")
    public suspend fun logging(argument: suspend BucketLoggingArgsBuilder.() -> Unit) {
        val toBeMapped = BucketLoggingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.logging = mapped
    }

    /**
     * @param value The flag of using logging enable container. Defaults true.
     */
    @Deprecated(
        message = """
  Deprecated from 1.37.0. When `logging` is set, the bucket logging will be able.
  """,
    )
    @JvmName("xpucmsfjwwvlxjlm")
    public suspend fun loggingIsenable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loggingIsenable = mapped
    }

    /**
     * @param value Json format text of bucket policy [bucket policy management](https://www.alibabacloud.com/help/doc-detail/100680.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketPolicy` instead.
     */
    @JvmName("bxlguoahoqinvgii")
    public suspend fun policy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param value The [redundancy type](https://www.alibabacloud.com/help/doc-detail/90589.htm) to enable. Can be "LRS", and "ZRS". Defaults to "LRS".
     */
    @JvmName("bwlnmafqmauctaia")
    public suspend fun redundancyType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redundancyType = mapped
    }

    /**
     * @param value The configuration of [referer](https://www.alibabacloud.com/help/doc-detail/31901.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketReferer` instead. See `referer_config` below.
     */
    @JvmName("vcidigvxskhobyus")
    public suspend fun refererConfig(`value`: BucketRefererConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.refererConfig = mapped
    }

    /**
     * @param argument The configuration of [referer](https://www.alibabacloud.com/help/doc-detail/31901.htm). This property has been deprecated since 1.220.0, please use the resource `alicloud.oss.BucketReferer` instead. See `referer_config` below.
     */
    @JvmName("gejnunirhnqyayct")
    public suspend fun refererConfig(argument: suspend BucketRefererConfigArgsBuilder.() -> Unit) {
        val toBeMapped = BucketRefererConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.refererConfig = mapped
    }

    /**
     * @param value The ID of the resource group to which the bucket belongs.
     */
    @JvmName("ifijvawoedmausnm")
    public suspend fun resourceGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupId = mapped
    }

    /**
     * @param value A configuration of server-side encryption. See `server_side_encryption_rule` below.
     */
    @JvmName("wmetqsexidbwpaef")
    public suspend fun serverSideEncryptionRule(`value`: BucketServerSideEncryptionRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverSideEncryptionRule = mapped
    }

    /**
     * @param argument A configuration of server-side encryption. See `server_side_encryption_rule` below.
     */
    @JvmName("diqiajrexxulgwyj")
    public suspend fun serverSideEncryptionRule(argument: suspend BucketServerSideEncryptionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = BucketServerSideEncryptionRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.serverSideEncryptionRule = mapped
    }

    /**
     * @param value The [storage class](https://www.alibabacloud.com/help/doc-detail/51374.htm) to apply. Can be "Standard", "IA", "Archive", "ColdArchive" and "DeepColdArchive". Defaults to "Standard". "ColdArchive" is available since 1.203.0. "DeepColdArchive" is available since 1.209.0.
     */
    @JvmName("fynqxxxkxnkdebvl")
    public suspend fun storageClass(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageClass = mapped
    }

    /**
     * @param value A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.
     */
    @JvmName("fifjeqbsqwcfltqj")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the bucket. The items are no more than 10 for a bucket.
     */
    @JvmName("rrrrbkeiuykuaruj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A transfer acceleration status of a bucket. See `transfer_acceleration` below.
     */
    @JvmName("fxpisbtpdjamsifo")
    public suspend fun transferAcceleration(`value`: BucketTransferAccelerationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transferAcceleration = mapped
    }

    /**
     * @param argument A transfer acceleration status of a bucket. See `transfer_acceleration` below.
     */
    @JvmName("mwxrlgarjmulldla")
    public suspend fun transferAcceleration(argument: suspend BucketTransferAccelerationArgsBuilder.() -> Unit) {
        val toBeMapped = BucketTransferAccelerationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.transferAcceleration = mapped
    }

    /**
     * @param value A state of versioning. See `versioning` below.
     */
    @JvmName("ffwlivlbvggnnqry")
    public suspend fun versioning(`value`: BucketVersioningArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versioning = mapped
    }

    /**
     * @param argument A state of versioning. See `versioning` below.
     */
    @JvmName("hljwjsuuliphyxjs")
    public suspend fun versioning(argument: suspend BucketVersioningArgsBuilder.() -> Unit) {
        val toBeMapped = BucketVersioningArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.versioning = mapped
    }

    /**
     * @param value A website configuration. See `website` below.
     */
    @JvmName("wtavmhprlbogvabk")
    public suspend fun website(`value`: BucketWebsiteArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.website = mapped
    }

    /**
     * @param argument A website configuration. See `website` below.
     */
    @JvmName("gjwbakadrqkjiefi")
    public suspend fun website(argument: suspend BucketWebsiteArgsBuilder.() -> Unit) {
        val toBeMapped = BucketWebsiteArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.website = mapped
    }

    internal fun build(): BucketArgs = BucketArgs(
        accessMonitor = accessMonitor,
        acl = acl,
        bucket = bucket,
        corsRules = corsRules,
        forceDestroy = forceDestroy,
        lifecycleRuleAllowSameActionOverlap = lifecycleRuleAllowSameActionOverlap,
        lifecycleRules = lifecycleRules,
        logging = logging,
        loggingIsenable = loggingIsenable,
        policy = policy,
        redundancyType = redundancyType,
        refererConfig = refererConfig,
        resourceGroupId = resourceGroupId,
        serverSideEncryptionRule = serverSideEncryptionRule,
        storageClass = storageClass,
        tags = tags,
        transferAcceleration = transferAcceleration,
        versioning = versioning,
        website = website,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy