// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Cos
{
    /// <summary>
    /// Provides a COS resource to create a COS bucket and set its attributes.
    /// 
    /// ## Example Usage
    /// 
    /// Private Bucket
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "mycos-1258798060",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Creation of multiple available zone bucket
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "mycos-1258798060",
    ///             ForceClean = true,
    ///             MultiAz = true,
    ///             VersioningEnable = true,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Using verbose acl
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var withAclBody = new Tencentcloud.Cos.Bucket("withAclBody", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             AclBody = @"&lt;AccessControlPolicy&gt;
    ///     &lt;Owner&gt;
    ///         &lt;ID&gt;qcs::cam::uin/100000000001:uin/100000000001&lt;/ID&gt;
    ///     &lt;/Owner&gt;
    ///     &lt;AccessControlList&gt;
    ///         &lt;Grant&gt;
    ///             &lt;Grantee xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""Group""&gt;
    ///                 &lt;URI&gt;http://cam.qcloud.com/groups/global/AllUsers&lt;/URI&gt;
    ///             &lt;/Grantee&gt;
    ///             &lt;Permission&gt;READ&lt;/Permission&gt;
    ///         &lt;/Grant&gt;
    ///         &lt;Grant&gt;
    ///             &lt;Grantee xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""CanonicalUser""&gt;
    ///                 &lt;ID&gt;qcs::cam::uin/100000000001:uin/100000000001&lt;/ID&gt;
    ///                 &lt;DisplayName&gt;qcs::cam::uin/100000000001:uin/100000000001&lt;/DisplayName&gt;
    ///             &lt;/Grantee&gt;
    ///             &lt;Permission&gt;WRITE&lt;/Permission&gt;
    ///         &lt;/Grant&gt;
    ///         &lt;Grant&gt;
    ///             &lt;Grantee xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:type=""CanonicalUser""&gt;
    ///                 &lt;ID&gt;qcs::cam::uin/100000000001:uin/100000000001&lt;/ID&gt;
    ///                 &lt;DisplayName&gt;qcs::cam::uin/100000000001:uin/100000000001&lt;/DisplayName&gt;
    ///             &lt;/Grantee&gt;
    ///             &lt;Permission&gt;READ_ACP&lt;/Permission&gt;
    ///         &lt;/Grant&gt;
    ///     &lt;/AccessControlList&gt;
    /// &lt;/AccessControlPolicy&gt;
    /// 
    /// ",
    ///             Bucket = "mycos-1258798060",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Static Website
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Bucket = "mycos-1258798060",
    ///             Website = new Tencentcloud.Cos.Inputs.BucketWebsiteArgs
    ///             {
    ///                 IndexDocument = "index.html",
    ///                 ErrorDocument = "error.html",
    ///             },
    ///         });
    ///         this.EndpointTest = mycos.Website.Apply(website =&gt; website?.Endpoint);
    ///     }
    /// 
    ///     [Output("endpointTest")]
    ///     public Output&lt;string&gt; EndpointTest { get; set; }
    /// }
    /// ```
    /// 
    /// Using CORS
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "public-read-write",
    ///             Bucket = "mycos-1258798060",
    ///             CorsRules = 
    ///             {
    ///                 new Tencentcloud.Cos.Inputs.BucketCorsRuleArgs
    ///                 {
    ///                     AllowedHeaders = 
    ///                     {
    ///                         "*",
    ///                     },
    ///                     AllowedMethods = 
    ///                     {
    ///                         "PUT",
    ///                         "POST",
    ///                     },
    ///                     AllowedOrigins = 
    ///                     {
    ///                         "http://*.abc.com",
    ///                     },
    ///                     ExposeHeaders = 
    ///                     {
    ///                         "Etag",
    ///                     },
    ///                     MaxAgeSeconds = 300,
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Using object lifecycle
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "public-read-write",
    ///             Bucket = "mycos-1258798060",
    ///             LifecycleRules = 
    ///             {
    ///                 new Tencentcloud.Cos.Inputs.BucketLifecycleRuleArgs
    ///                 {
    ///                     Expiration = new Tencentcloud.Cos.Inputs.BucketLifecycleRuleExpirationArgs
    ///                     {
    ///                         Days = 90,
    ///                     },
    ///                     FilterPrefix = "path1/",
    ///                     Transitions = 
    ///                     {
    ///                         new Tencentcloud.Cos.Inputs.BucketLifecycleRuleTransitionArgs
    ///                         {
    ///                             Date = "2019-06-01",
    ///                             StorageClass = "STANDARD_IA",
    ///                         },
    ///                     },
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Using custom origin domain settings
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var withOrigin = new Tencentcloud.Cos.Bucket("withOrigin", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "mycos-1258798060",
    ///             OriginDomainRules = 
    ///             {
    ///                 new Tencentcloud.Cos.Inputs.BucketOriginDomainRuleArgs
    ///                 {
    ///                     Domain = "abc.example.com",
    ///                     Status = "ENABLE",
    ///                     Type = "REST",
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Using origin-pull settings
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var withOrigin = new Tencentcloud.Cos.Bucket("withOrigin", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "mycos-1258798060",
    ///             OriginPullRules = 
    ///             {
    ///                 new Tencentcloud.Cos.Inputs.BucketOriginPullRuleArgs
    ///                 {
    ///                     CustomHttpHeaders = 
    ///                     {
    ///                         { "x-custom-header", "custom_value" },
    ///                     },
    ///                     FollowHttpHeaders = 
    ///                     {
    ///                         "origin",
    ///                         "host",
    ///                     },
    ///                     FollowQueryString = true,
    ///                     FollowRedirection = true,
    ///                     Host = "abc.example.com",
    ///                     Prefix = "/",
    ///                     Priority = 1,
    ///                     Protocol = "FOLLOW",
    ///                     SyncBackToSource = false,
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Using replication
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var replica1 = new Tencentcloud.Cos.Bucket("replica1", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "tf-replica-foo-1234567890",
    ///             VersioningEnable = true,
    ///         });
    ///         var withReplication = new Tencentcloud.Cos.Bucket("withReplication", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Acl = "private",
    ///             Bucket = "tf-bucket-replica-1234567890",
    ///             ReplicaRole = "qcs::cam::uin/100000000001:uin/100000000001",
    ///             ReplicaRules = 
    ///             {
    ///                 new Tencentcloud.Cos.Inputs.BucketReplicaRuleArgs
    ///                 {
    ///                     DestinationBucket = replica1.CosBucket.Apply(bucket =&gt; $"qcs::cos:%s::{bucket}"),
    ///                     Id = "test-rep1",
    ///                     Prefix = "dist",
    ///                     Status = "Enabled",
    ///                 },
    ///             },
    ///             VersioningEnable = true,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// Setting log status
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = Pulumi.Tencentcloud;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var cosLogGrantRole = new Tencentcloud.Cam.Role("cosLogGrantRole", new Tencentcloud.Cam.RoleArgs
    ///         {
    ///             Document = @"{
    ///   ""version"": ""2.0"",
    ///   ""statement"": [
    ///     {
    ///       ""action"": [
    ///         ""name/sts:AssumeRole""
    ///       ],
    ///       ""effect"": ""allow"",
    ///       ""principal"": {
    ///         ""service"": [
    ///           ""cls.cloud.tencent.com""
    ///         ]
    ///       }
    ///     }
    ///   ]
    /// }
    /// ",
    ///             Description = "cos log enable grant",
    ///         });
    ///         var cosAccess = Output.Create(Tencentcloud.Cam.GetPolicies.InvokeAsync(new Tencentcloud.Cam.GetPoliciesArgs
    ///         {
    ///             Name = "QcloudCOSAccessForCLSRole",
    ///         }));
    ///         var cosLogGrantRolePolicyAttachment = new Tencentcloud.Cam.RolePolicyAttachment("cosLogGrantRolePolicyAttachment", new Tencentcloud.Cam.RolePolicyAttachmentArgs
    ///         {
    ///             RoleId = cosLogGrantRole.Id,
    ///             PolicyId = cosAccess.Apply(cosAccess =&gt; cosAccess.PolicyLists?[0]?.PolicyId),
    ///         });
    ///         var mylog = new Tencentcloud.Cos.Bucket("mylog", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Bucket = "mylog-1258798060",
    ///             Acl = "private",
    ///         });
    ///         var mycos = new Tencentcloud.Cos.Bucket("mycos", new Tencentcloud.Cos.BucketArgs
    ///         {
    ///             Bucket = "mycos-1258798060",
    ///             Acl = "private",
    ///             LogEnable = true,
    ///             LogTargetBucket = "mylog-1258798060",
    ///             LogPrefix = "MyLogPrefix",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// COS bucket can be imported, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Cos/bucket:Bucket bucket bucket-name
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Cos/bucket:Bucket")]
    public partial class Bucket : Pulumi.CustomResource
    {
        /// <summary>
        /// Enable bucket acceleration.
        /// </summary>
        [Output("accelerationEnable")]
        public Output<bool?> AccelerationEnable { get; private set; } = null!;

        /// <summary>
        /// The canned ACL to apply. Valid values: private, public-read, and public-read-write. Defaults to private.
        /// </summary>
        [Output("acl")]
        public Output<string?> Acl { get; private set; } = null!;

        /// <summary>
        /// ACL XML body for multiple grant info. NOTE: this argument will overwrite `acl`. Check https://intl.cloud.tencent.com/document/product/436/7737 for more detail.
        /// </summary>
        [Output("aclBody")]
        public Output<string?> AclBody { get; private set; } = null!;

        /// <summary>
        /// The name of a bucket to be created. Bucket format should be [custom name]-[appid], for example `mycos-1258798060`.
        /// </summary>
        [Output("bucket")]
        public Output<string> CosBucket { get; private set; } = null!;

        /// <summary>
        /// A rule of Cross-Origin Resource Sharing (documented below).
        /// </summary>
        [Output("corsRules")]
        public Output<ImmutableArray<Outputs.BucketCorsRule>> CorsRules { get; private set; } = null!;

        /// <summary>
        /// The URL of this cos bucket.
        /// </summary>
        [Output("cosBucketUrl")]
        public Output<string> CosBucketUrl { get; private set; } = null!;

        /// <summary>
        /// The server-side encryption algorithm to use. Valid value is `AES256`.
        /// </summary>
        [Output("encryptionAlgorithm")]
        public Output<string?> EncryptionAlgorithm { get; private set; } = null!;

        /// <summary>
        /// Force cleanup all objects before delete bucket.
        /// </summary>
        [Output("forceClean")]
        public Output<bool?> ForceClean { get; private set; } = null!;

        /// <summary>
        /// A configuration of object lifecycle management (documented below).
        /// </summary>
        [Output("lifecycleRules")]
        public Output<ImmutableArray<Outputs.BucketLifecycleRule>> LifecycleRules { get; private set; } = null!;

        /// <summary>
        /// Indicate the access log of this bucket to be saved or not. Default is `false`. If set `true`, the access log will be saved with `log_target_bucket`. To enable log, the full access of log service must be granted. [Full Access Role Policy](https://intl.cloud.tencent.com/document/product/436/16920).
        /// </summary>
        [Output("logEnable")]
        public Output<bool?> LogEnable { get; private set; } = null!;

        /// <summary>
        /// The prefix log name which saves the access log of this bucket per 5 minutes. Eg. `MyLogPrefix/`. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`.
        /// </summary>
        [Output("logPrefix")]
        public Output<string> LogPrefix { get; private set; } = null!;

        /// <summary>
        /// The target bucket name which saves the access log of this bucket per 5 minutes. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`. User must have full access on this bucket.
        /// </summary>
        [Output("logTargetBucket")]
        public Output<string> LogTargetBucket { get; private set; } = null!;

        /// <summary>
        /// Indicates whether to create a bucket of multi available zone. NOTE: If set to true, the versioning must enable.
        /// </summary>
        [Output("multiAz")]
        public Output<bool?> MultiAz { get; private set; } = null!;

        /// <summary>
        /// Bucket Origin Domain settings.
        /// </summary>
        [Output("originDomainRules")]
        public Output<ImmutableArray<Outputs.BucketOriginDomainRule>> OriginDomainRules { get; private set; } = null!;

        /// <summary>
        /// Bucket Origin-Pull settings.
        /// </summary>
        [Output("originPullRules")]
        public Output<ImmutableArray<Outputs.BucketOriginPullRule>> OriginPullRules { get; private set; } = null!;

        /// <summary>
        /// Request initiator identifier, format: `qcs::cam::uin/&lt;owneruin&gt;:uin/&lt;subuin&gt;`. NOTE: only `versioning_enable` is true can configure this argument.
        /// </summary>
        [Output("replicaRole")]
        public Output<string?> ReplicaRole { get; private set; } = null!;

        /// <summary>
        /// List of replica rule. NOTE: only `versioning_enable` is true and `replica_role` set can configure this argument.
        /// </summary>
        [Output("replicaRules")]
        public Output<ImmutableArray<Outputs.BucketReplicaRule>> ReplicaRules { get; private set; } = null!;

        /// <summary>
        /// The tags of a bucket.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// Enable bucket versioning.
        /// </summary>
        [Output("versioningEnable")]
        public Output<bool?> VersioningEnable { get; private set; } = null!;

        /// <summary>
        /// A website object(documented below).
        /// </summary>
        [Output("website")]
        public Output<Outputs.BucketWebsite?> Website { get; private set; } = null!;


        /// <summary>
        /// Create a Bucket resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Bucket(string name, BucketArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Cos/bucket:Bucket", name, args ?? new BucketArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Bucket(string name, Input<string> id, BucketState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Cos/bucket:Bucket", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/tencentcloudstack",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Bucket resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Bucket Get(string name, Input<string> id, BucketState? state = null, CustomResourceOptions? options = null)
        {
            return new Bucket(name, id, state, options);
        }
    }

    public sealed class BucketArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Enable bucket acceleration.
        /// </summary>
        [Input("accelerationEnable")]
        public Input<bool>? AccelerationEnable { get; set; }

        /// <summary>
        /// The canned ACL to apply. Valid values: private, public-read, and public-read-write. Defaults to private.
        /// </summary>
        [Input("acl")]
        public Input<string>? Acl { get; set; }

        /// <summary>
        /// ACL XML body for multiple grant info. NOTE: this argument will overwrite `acl`. Check https://intl.cloud.tencent.com/document/product/436/7737 for more detail.
        /// </summary>
        [Input("aclBody")]
        public Input<string>? AclBody { get; set; }

        /// <summary>
        /// The name of a bucket to be created. Bucket format should be [custom name]-[appid], for example `mycos-1258798060`.
        /// </summary>
        [Input("bucket", required: true)]
        public Input<string> CosBucket { get; set; } = null!;

        [Input("corsRules")]
        private InputList<Inputs.BucketCorsRuleArgs>? _corsRules;

        /// <summary>
        /// A rule of Cross-Origin Resource Sharing (documented below).
        /// </summary>
        public InputList<Inputs.BucketCorsRuleArgs> CorsRules
        {
            get => _corsRules ?? (_corsRules = new InputList<Inputs.BucketCorsRuleArgs>());
            set => _corsRules = value;
        }

        /// <summary>
        /// The server-side encryption algorithm to use. Valid value is `AES256`.
        /// </summary>
        [Input("encryptionAlgorithm")]
        public Input<string>? EncryptionAlgorithm { get; set; }

        /// <summary>
        /// Force cleanup all objects before delete bucket.
        /// </summary>
        [Input("forceClean")]
        public Input<bool>? ForceClean { get; set; }

        [Input("lifecycleRules")]
        private InputList<Inputs.BucketLifecycleRuleArgs>? _lifecycleRules;

        /// <summary>
        /// A configuration of object lifecycle management (documented below).
        /// </summary>
        public InputList<Inputs.BucketLifecycleRuleArgs> LifecycleRules
        {
            get => _lifecycleRules ?? (_lifecycleRules = new InputList<Inputs.BucketLifecycleRuleArgs>());
            set => _lifecycleRules = value;
        }

        /// <summary>
        /// Indicate the access log of this bucket to be saved or not. Default is `false`. If set `true`, the access log will be saved with `log_target_bucket`. To enable log, the full access of log service must be granted. [Full Access Role Policy](https://intl.cloud.tencent.com/document/product/436/16920).
        /// </summary>
        [Input("logEnable")]
        public Input<bool>? LogEnable { get; set; }

        /// <summary>
        /// The prefix log name which saves the access log of this bucket per 5 minutes. Eg. `MyLogPrefix/`. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`.
        /// </summary>
        [Input("logPrefix")]
        public Input<string>? LogPrefix { get; set; }

        /// <summary>
        /// The target bucket name which saves the access log of this bucket per 5 minutes. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`. User must have full access on this bucket.
        /// </summary>
        [Input("logTargetBucket")]
        public Input<string>? LogTargetBucket { get; set; }

        /// <summary>
        /// Indicates whether to create a bucket of multi available zone. NOTE: If set to true, the versioning must enable.
        /// </summary>
        [Input("multiAz")]
        public Input<bool>? MultiAz { get; set; }

        [Input("originDomainRules")]
        private InputList<Inputs.BucketOriginDomainRuleArgs>? _originDomainRules;

        /// <summary>
        /// Bucket Origin Domain settings.
        /// </summary>
        public InputList<Inputs.BucketOriginDomainRuleArgs> OriginDomainRules
        {
            get => _originDomainRules ?? (_originDomainRules = new InputList<Inputs.BucketOriginDomainRuleArgs>());
            set => _originDomainRules = value;
        }

        [Input("originPullRules")]
        private InputList<Inputs.BucketOriginPullRuleArgs>? _originPullRules;

        /// <summary>
        /// Bucket Origin-Pull settings.
        /// </summary>
        public InputList<Inputs.BucketOriginPullRuleArgs> OriginPullRules
        {
            get => _originPullRules ?? (_originPullRules = new InputList<Inputs.BucketOriginPullRuleArgs>());
            set => _originPullRules = value;
        }

        /// <summary>
        /// Request initiator identifier, format: `qcs::cam::uin/&lt;owneruin&gt;:uin/&lt;subuin&gt;`. NOTE: only `versioning_enable` is true can configure this argument.
        /// </summary>
        [Input("replicaRole")]
        public Input<string>? ReplicaRole { get; set; }

        [Input("replicaRules")]
        private InputList<Inputs.BucketReplicaRuleArgs>? _replicaRules;

        /// <summary>
        /// List of replica rule. NOTE: only `versioning_enable` is true and `replica_role` set can configure this argument.
        /// </summary>
        public InputList<Inputs.BucketReplicaRuleArgs> ReplicaRules
        {
            get => _replicaRules ?? (_replicaRules = new InputList<Inputs.BucketReplicaRuleArgs>());
            set => _replicaRules = value;
        }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// The tags of a bucket.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Enable bucket versioning.
        /// </summary>
        [Input("versioningEnable")]
        public Input<bool>? VersioningEnable { get; set; }

        /// <summary>
        /// A website object(documented below).
        /// </summary>
        [Input("website")]
        public Input<Inputs.BucketWebsiteArgs>? Website { get; set; }

        public BucketArgs()
        {
        }
    }

    public sealed class BucketState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Enable bucket acceleration.
        /// </summary>
        [Input("accelerationEnable")]
        public Input<bool>? AccelerationEnable { get; set; }

        /// <summary>
        /// The canned ACL to apply. Valid values: private, public-read, and public-read-write. Defaults to private.
        /// </summary>
        [Input("acl")]
        public Input<string>? Acl { get; set; }

        /// <summary>
        /// ACL XML body for multiple grant info. NOTE: this argument will overwrite `acl`. Check https://intl.cloud.tencent.com/document/product/436/7737 for more detail.
        /// </summary>
        [Input("aclBody")]
        public Input<string>? AclBody { get; set; }

        /// <summary>
        /// The name of a bucket to be created. Bucket format should be [custom name]-[appid], for example `mycos-1258798060`.
        /// </summary>
        [Input("bucket")]
        public Input<string>? CosBucket { get; set; }

        [Input("corsRules")]
        private InputList<Inputs.BucketCorsRuleGetArgs>? _corsRules;

        /// <summary>
        /// A rule of Cross-Origin Resource Sharing (documented below).
        /// </summary>
        public InputList<Inputs.BucketCorsRuleGetArgs> CorsRules
        {
            get => _corsRules ?? (_corsRules = new InputList<Inputs.BucketCorsRuleGetArgs>());
            set => _corsRules = value;
        }

        /// <summary>
        /// The URL of this cos bucket.
        /// </summary>
        [Input("cosBucketUrl")]
        public Input<string>? CosBucketUrl { get; set; }

        /// <summary>
        /// The server-side encryption algorithm to use. Valid value is `AES256`.
        /// </summary>
        [Input("encryptionAlgorithm")]
        public Input<string>? EncryptionAlgorithm { get; set; }

        /// <summary>
        /// Force cleanup all objects before delete bucket.
        /// </summary>
        [Input("forceClean")]
        public Input<bool>? ForceClean { get; set; }

        [Input("lifecycleRules")]
        private InputList<Inputs.BucketLifecycleRuleGetArgs>? _lifecycleRules;

        /// <summary>
        /// A configuration of object lifecycle management (documented below).
        /// </summary>
        public InputList<Inputs.BucketLifecycleRuleGetArgs> LifecycleRules
        {
            get => _lifecycleRules ?? (_lifecycleRules = new InputList<Inputs.BucketLifecycleRuleGetArgs>());
            set => _lifecycleRules = value;
        }

        /// <summary>
        /// Indicate the access log of this bucket to be saved or not. Default is `false`. If set `true`, the access log will be saved with `log_target_bucket`. To enable log, the full access of log service must be granted. [Full Access Role Policy](https://intl.cloud.tencent.com/document/product/436/16920).
        /// </summary>
        [Input("logEnable")]
        public Input<bool>? LogEnable { get; set; }

        /// <summary>
        /// The prefix log name which saves the access log of this bucket per 5 minutes. Eg. `MyLogPrefix/`. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`.
        /// </summary>
        [Input("logPrefix")]
        public Input<string>? LogPrefix { get; set; }

        /// <summary>
        /// The target bucket name which saves the access log of this bucket per 5 minutes. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`. User must have full access on this bucket.
        /// </summary>
        [Input("logTargetBucket")]
        public Input<string>? LogTargetBucket { get; set; }

        /// <summary>
        /// Indicates whether to create a bucket of multi available zone. NOTE: If set to true, the versioning must enable.
        /// </summary>
        [Input("multiAz")]
        public Input<bool>? MultiAz { get; set; }

        [Input("originDomainRules")]
        private InputList<Inputs.BucketOriginDomainRuleGetArgs>? _originDomainRules;

        /// <summary>
        /// Bucket Origin Domain settings.
        /// </summary>
        public InputList<Inputs.BucketOriginDomainRuleGetArgs> OriginDomainRules
        {
            get => _originDomainRules ?? (_originDomainRules = new InputList<Inputs.BucketOriginDomainRuleGetArgs>());
            set => _originDomainRules = value;
        }

        [Input("originPullRules")]
        private InputList<Inputs.BucketOriginPullRuleGetArgs>? _originPullRules;

        /// <summary>
        /// Bucket Origin-Pull settings.
        /// </summary>
        public InputList<Inputs.BucketOriginPullRuleGetArgs> OriginPullRules
        {
            get => _originPullRules ?? (_originPullRules = new InputList<Inputs.BucketOriginPullRuleGetArgs>());
            set => _originPullRules = value;
        }

        /// <summary>
        /// Request initiator identifier, format: `qcs::cam::uin/&lt;owneruin&gt;:uin/&lt;subuin&gt;`. NOTE: only `versioning_enable` is true can configure this argument.
        /// </summary>
        [Input("replicaRole")]
        public Input<string>? ReplicaRole { get; set; }

        [Input("replicaRules")]
        private InputList<Inputs.BucketReplicaRuleGetArgs>? _replicaRules;

        /// <summary>
        /// List of replica rule. NOTE: only `versioning_enable` is true and `replica_role` set can configure this argument.
        /// </summary>
        public InputList<Inputs.BucketReplicaRuleGetArgs> ReplicaRules
        {
            get => _replicaRules ?? (_replicaRules = new InputList<Inputs.BucketReplicaRuleGetArgs>());
            set => _replicaRules = value;
        }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// The tags of a bucket.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Enable bucket versioning.
        /// </summary>
        [Input("versioningEnable")]
        public Input<bool>? VersioningEnable { get; set; }

        /// <summary>
        /// A website object(documented below).
        /// </summary>
        [Input("website")]
        public Input<Inputs.BucketWebsiteGetArgs>? Website { get; set; }

        public BucketState()
        {
        }
    }
}
