1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oss
  5. BucketHttpsConfig
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi

    Provides a OSS Bucket Https Config resource.

    Whether the bucket can only be accessed with specific TLS versions.

    For information about OSS Bucket Https Config and how to use it, see What is Bucket Https Config.

    NOTE: Available since v1.220.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const createBucket = new alicloud.oss.Bucket("CreateBucket", {
        storageClass: "Standard",
        bucket: `${name}-${_default.result}`,
    });
    const defaultBucketHttpsConfig = new alicloud.oss.BucketHttpsConfig("default", {
        tlsVersions: ["TLSv1.2"],
        bucket: createBucket.bucket,
        enable: true,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    create_bucket = alicloud.oss.Bucket("CreateBucket",
        storage_class="Standard",
        bucket=f"{name}-{default['result']}")
    default_bucket_https_config = alicloud.oss.BucketHttpsConfig("default",
        tls_versions=["TLSv1.2"],
        bucket=create_bucket.bucket,
        enable=True)
    
    package main
    
    import (
    	"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"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		createBucket, err := oss.NewBucket(ctx, "CreateBucket", &oss.BucketArgs{
    			StorageClass: pulumi.String("Standard"),
    			Bucket:       pulumi.Sprintf("%v-%v", name, _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewBucketHttpsConfig(ctx, "default", &oss.BucketHttpsConfigArgs{
    			TlsVersions: pulumi.StringArray{
    				pulumi.String("TLSv1.2"),
    			},
    			Bucket: createBucket.Bucket,
    			Enable: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var createBucket = new AliCloud.Oss.Bucket("CreateBucket", new()
        {
            StorageClass = "Standard",
            BucketName = $"{name}-{@default.Result}",
        });
    
        var defaultBucketHttpsConfig = new AliCloud.Oss.BucketHttpsConfig("default", new()
        {
            TlsVersions = new[]
            {
                "TLSv1.2",
            },
            Bucket = createBucket.BucketName,
            Enable = true,
        });
    
    });
    
    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.BucketHttpsConfig;
    import com.pulumi.alicloud.oss.BucketHttpsConfigArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var createBucket = new Bucket("createBucket", BucketArgs.builder()
                .storageClass("Standard")
                .bucket(String.format("%s-%s", name,default_.result()))
                .build());
    
            var defaultBucketHttpsConfig = new BucketHttpsConfig("defaultBucketHttpsConfig", BucketHttpsConfigArgs.builder()
                .tlsVersions("TLSv1.2")
                .bucket(createBucket.bucket())
                .enable(true)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: random:Integer
        properties:
          min: 10000
          max: 99999
      createBucket:
        type: alicloud:oss:Bucket
        name: CreateBucket
        properties:
          storageClass: Standard
          bucket: ${name}-${default.result}
      defaultBucketHttpsConfig:
        type: alicloud:oss:BucketHttpsConfig
        name: default
        properties:
          tlsVersions:
            - TLSv1.2
          bucket: ${createBucket.bucket}
          enable: true
    

    Deleting alicloud.oss.BucketHttpsConfig or removing it from your configuration

    Terraform cannot destroy resource alicloud.oss.BucketHttpsConfig. Terraform will remove this resource from the state file, however resources may remain.

    📚 Need more examples? VIEW MORE EXAMPLES

    Create BucketHttpsConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BucketHttpsConfig(name: string, args: BucketHttpsConfigArgs, opts?: CustomResourceOptions);
    @overload
    def BucketHttpsConfig(resource_name: str,
                          args: BucketHttpsConfigArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def BucketHttpsConfig(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          bucket: Optional[str] = None,
                          enable: Optional[bool] = None,
                          cipher_suit: Optional[BucketHttpsConfigCipherSuitArgs] = None,
                          tls_versions: Optional[Sequence[str]] = None)
    func NewBucketHttpsConfig(ctx *Context, name string, args BucketHttpsConfigArgs, opts ...ResourceOption) (*BucketHttpsConfig, error)
    public BucketHttpsConfig(string name, BucketHttpsConfigArgs args, CustomResourceOptions? opts = null)
    public BucketHttpsConfig(String name, BucketHttpsConfigArgs args)
    public BucketHttpsConfig(String name, BucketHttpsConfigArgs args, CustomResourceOptions options)
    
    type: alicloud:oss:BucketHttpsConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BucketHttpsConfigArgs
    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 BucketHttpsConfigArgs
    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 BucketHttpsConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketHttpsConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketHttpsConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var bucketHttpsConfigResource = new AliCloud.Oss.BucketHttpsConfig("bucketHttpsConfigResource", new()
    {
        Bucket = "string",
        Enable = false,
        CipherSuit = new AliCloud.Oss.Inputs.BucketHttpsConfigCipherSuitArgs
        {
            CustomCipherSuites = new[]
            {
                "string",
            },
            Enable = false,
            StrongCipherSuite = false,
            Tls13CustomCipherSuites = new[]
            {
                "string",
            },
        },
        TlsVersions = new[]
        {
            "string",
        },
    });
    
    example, err := oss.NewBucketHttpsConfig(ctx, "bucketHttpsConfigResource", &oss.BucketHttpsConfigArgs{
    	Bucket: pulumi.String("string"),
    	Enable: pulumi.Bool(false),
    	CipherSuit: &oss.BucketHttpsConfigCipherSuitArgs{
    		CustomCipherSuites: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Enable:            pulumi.Bool(false),
    		StrongCipherSuite: pulumi.Bool(false),
    		Tls13CustomCipherSuites: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	TlsVersions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var bucketHttpsConfigResource = new BucketHttpsConfig("bucketHttpsConfigResource", BucketHttpsConfigArgs.builder()
        .bucket("string")
        .enable(false)
        .cipherSuit(BucketHttpsConfigCipherSuitArgs.builder()
            .customCipherSuites("string")
            .enable(false)
            .strongCipherSuite(false)
            .tls13CustomCipherSuites("string")
            .build())
        .tlsVersions("string")
        .build());
    
    bucket_https_config_resource = alicloud.oss.BucketHttpsConfig("bucketHttpsConfigResource",
        bucket="string",
        enable=False,
        cipher_suit={
            "custom_cipher_suites": ["string"],
            "enable": False,
            "strong_cipher_suite": False,
            "tls13_custom_cipher_suites": ["string"],
        },
        tls_versions=["string"])
    
    const bucketHttpsConfigResource = new alicloud.oss.BucketHttpsConfig("bucketHttpsConfigResource", {
        bucket: "string",
        enable: false,
        cipherSuit: {
            customCipherSuites: ["string"],
            enable: false,
            strongCipherSuite: false,
            tls13CustomCipherSuites: ["string"],
        },
        tlsVersions: ["string"],
    });
    
    type: alicloud:oss:BucketHttpsConfig
    properties:
        bucket: string
        cipherSuit:
            customCipherSuites:
                - string
            enable: false
            strongCipherSuite: false
            tls13CustomCipherSuites:
                - string
        enable: false
        tlsVersions:
            - string
    

    BucketHttpsConfig Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BucketHttpsConfig resource accepts the following input properties:

    Bucket string
    The name of the bucket
    Enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    CipherSuit Pulumi.AliCloud.Oss.Inputs.BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    TlsVersions List<string>
    Specifies the TLS versions allowed to access this buckets.
    Bucket string
    The name of the bucket
    Enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    CipherSuit BucketHttpsConfigCipherSuitArgs
    TLS encryption algorithm suite configuration See cipher_suit below.
    TlsVersions []string
    Specifies the TLS versions allowed to access this buckets.
    bucket String
    The name of the bucket
    enable Boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    cipherSuit BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    tlsVersions List<String>
    Specifies the TLS versions allowed to access this buckets.
    bucket string
    The name of the bucket
    enable boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    cipherSuit BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    tlsVersions string[]
    Specifies the TLS versions allowed to access this buckets.
    bucket str
    The name of the bucket
    enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    cipher_suit BucketHttpsConfigCipherSuitArgs
    TLS encryption algorithm suite configuration See cipher_suit below.
    tls_versions Sequence[str]
    Specifies the TLS versions allowed to access this buckets.
    bucket String
    The name of the bucket
    enable Boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    cipherSuit Property Map
    TLS encryption algorithm suite configuration See cipher_suit below.
    tlsVersions List<String>
    Specifies the TLS versions allowed to access this buckets.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BucketHttpsConfig Resource

    Get an existing BucketHttpsConfig 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?: BucketHttpsConfigState, opts?: CustomResourceOptions): BucketHttpsConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket: Optional[str] = None,
            cipher_suit: Optional[BucketHttpsConfigCipherSuitArgs] = None,
            enable: Optional[bool] = None,
            tls_versions: Optional[Sequence[str]] = None) -> BucketHttpsConfig
    func GetBucketHttpsConfig(ctx *Context, name string, id IDInput, state *BucketHttpsConfigState, opts ...ResourceOption) (*BucketHttpsConfig, error)
    public static BucketHttpsConfig Get(string name, Input<string> id, BucketHttpsConfigState? state, CustomResourceOptions? opts = null)
    public static BucketHttpsConfig get(String name, Output<String> id, BucketHttpsConfigState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:oss:BucketHttpsConfig    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Bucket string
    The name of the bucket
    CipherSuit Pulumi.AliCloud.Oss.Inputs.BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    Enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    TlsVersions List<string>
    Specifies the TLS versions allowed to access this buckets.
    Bucket string
    The name of the bucket
    CipherSuit BucketHttpsConfigCipherSuitArgs
    TLS encryption algorithm suite configuration See cipher_suit below.
    Enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    TlsVersions []string
    Specifies the TLS versions allowed to access this buckets.
    bucket String
    The name of the bucket
    cipherSuit BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    enable Boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    tlsVersions List<String>
    Specifies the TLS versions allowed to access this buckets.
    bucket string
    The name of the bucket
    cipherSuit BucketHttpsConfigCipherSuit
    TLS encryption algorithm suite configuration See cipher_suit below.
    enable boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    tlsVersions string[]
    Specifies the TLS versions allowed to access this buckets.
    bucket str
    The name of the bucket
    cipher_suit BucketHttpsConfigCipherSuitArgs
    TLS encryption algorithm suite configuration See cipher_suit below.
    enable bool
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    tls_versions Sequence[str]
    Specifies the TLS versions allowed to access this buckets.
    bucket String
    The name of the bucket
    cipherSuit Property Map
    TLS encryption algorithm suite configuration See cipher_suit below.
    enable Boolean
    Specifies whether to enable TLS version management for the bucket. Valid values: true, false.
    tlsVersions List<String>
    Specifies the TLS versions allowed to access this buckets.

    Supporting Types

    BucketHttpsConfigCipherSuit, BucketHttpsConfigCipherSuitArgs

    CustomCipherSuites List<string>
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    Enable bool
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    StrongCipherSuite bool
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    Tls13CustomCipherSuites List<string>
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.
    CustomCipherSuites []string
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    Enable bool
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    StrongCipherSuite bool
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    Tls13CustomCipherSuites []string
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.
    customCipherSuites List<String>
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    enable Boolean
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    strongCipherSuite Boolean
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    tls13CustomCipherSuites List<String>
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.
    customCipherSuites string[]
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    enable boolean
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    strongCipherSuite boolean
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    tls13CustomCipherSuites string[]
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.
    custom_cipher_suites Sequence[str]
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    enable bool
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    strong_cipher_suite bool
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    tls13_custom_cipher_suites Sequence[str]
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.
    customCipherSuites List<String>
    This field is used to configure custom encryption algorithm suites for TLS 1.2.
    enable Boolean
    Configures TLS encryption algorithm suites. Valid values: true: strong encryption algorithm suites or custom encryption algorithm suites. false: all encryption algorithm suites (default).
    strongCipherSuite Boolean
    Specifies whether to use strong encryption algorithm suites. Valid values: true: uses strong encryption algorithm suites. false: uses custom encryption algorithm suites.
    tls13CustomCipherSuites List<String>
    Specifies custom encryption algorithm suites. You can specify multiple suites. This field is used to configure custom encryption algorithm suites for TLS 1.3.

    Import

    OSS Bucket Https Config can be imported using the id, e.g.

    $ pulumi import alicloud:oss/bucketHttpsConfig:BucketHttpsConfig example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Viewing docs for Alibaba Cloud v3.97.0
    published on Saturday, Mar 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.