All Products
Search
Document Center

Object Storage Service:PutBucketHttpsConfig

Last Updated:Apr 28, 2024

Enables or disables Transport Layer Security (TLS) version management for a bucket.

Usage notes

  • To enable or disable TLS version management for a bucket, you must have the oss:PutBucketHttpsConfig permission. For more information, see Attach a custom policy to a RAM user.

  • Each region has its own Object Storage Service (OSS) endpoints. For more information about regions and endpoints, see Regions and endpoints.

Request syntax

PUT /?httpsConfig HTTP/1.1
Date: GMT Date
Authorization: SignatureValue
Host: BucketName.oss-cn-hangzhou.aliyuncs.com

<?xml version="1.0" encoding="UTF-8"?>
<HttpsConfiguration>  
  <TLS>
    <Enable>true</Enable>   
    <TLSVersion>TLSv1.2</TLSVersion>
    <TLSVersion>TLSv1.3</TLSVersion>
  </TLS>
</HttpsConfiguration>

Request headers

All headers in a PutBucketHttpsConfig request are common request headers. For more information, see Common request headers.

Request elements

Element

Type

Required

Example

Description

HttpsConfiguration

Container

Yes

N/A

The container that stores HTTPS configurations.

TLS

Container

Yes

N/A

The container that stores TLS version configurations.

Enable

Boolean

Yes

true

Specifies whether to enable TLS version management for the bucket. Valid values:

  • true

  • false

TLSVersion

String

No

TLSv1.2

The TLS version. This element is required only when you set the Enable element to true. Valid values:

  • TLSv1.0

  • TLSv1.1

  • TLSv1.2

  • TLSv1.3

For more information about the usage scenarios of each version, see TLS versions.

Response headers

All headers in the response to a PutBucketHttpsConfig request are common response headers. For more information, see Common response headers.

Examples

  • Sample request

    PUT /?httpsConfig HTTP/1.1
    Date: Wed, 16 Aug 2023 15:56:37 GMT
    Authorization: OSS qn6q**************:77Dv****************
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    
    <?xml version="1.0" encoding="UTF-8"?>
    <HttpsConfiguration>  
      <TLS>
        <Enable>true</Enable>   
        <TLSVersion>TLSv1.2</TLSVersion>
        <TLSVersion>TLSv1.3</TLSVersion>    
      </TLS>
    </HttpsConfiguration>
  • Sample response

    HTTP/1.1 200 OK
    x-oss-request-id: 534B371674E88A4D8906****
    Date: Wed, 16 Aug 2023 15:56:37 GMT
    Content-Length: 0
    Connection: keep-alive
    Server: AliyunOSS