Creates a TLS policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateTLSCipherPolicy

The operation that you want to perform. Set the value to CreateTLSCipherPolicy.

RegionId String Yes cn-hangzhou

The ID of the region where the Classic Load Balancer (CLB) instance is created.

You can call the DescribeRegions operation to query the most recent region list.

Name String Yes TLSPolicy-test

The name of the TLS policy. The name must be 1 to 200 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-).

Ciphers.N String Yes ECDHE-ECDSA-AES128-SHA

The supported cipher suites, which are determined by the TLS protocol version. You can specify at most 32 cipher suites.

TLS 1.0 and TLS 1.1 support the following cipher suites:

  • ECDHE-ECDSA-AES128-SHA
  • ECDHE-ECDSA-AES256-SHA
  • ECDHE-RSA-AES128-SHA
  • ECDHE-RSA-AES256-SHA
  • AES128-SHA
  • AES256-SHA
  • DES-CBC3-SHA

TLS 1.2 supports the following cipher suites:

  • ECDHE-ECDSA-AES128-SHA
  • ECDHE-ECDSA-AES256-SHA
  • ECDHE-RSA-AES128-SHA
  • ECDHE-RSA-AES256-SHA
  • AES128-SHA
  • AES256-SHA
  • DES-CBC3-SHA
  • ECDHE-ECDSA-AES128-GCM-SHA256
  • ECDHE-ECDSA-AES256-GCM-SHA384
  • ECDHE-ECDSA-AES128-SHA256
  • ECDHE-ECDSA-AES256-SHA384
  • ECDHE-RSA-AES128-GCM-SHA256
  • ECDHE-RSA-AES256-GCM-SHA384
  • ECDHE-RSA-AES128-SHA256
  • ECDHE-RSA-AES256-SHA384
  • AES128-GCM-SHA256
  • AES256-GCM-SHA384
  • AES128-SHA256
  • AES256-SHA256

TLS 1.3 supports the following cipher suites:

  • TLS_AES_128_GCM_SHA256
  • TLS_AES_256_GCM_SHA384
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_128_CCM_SHA256
  • TLS_AES_128_CCM_8_SHA256
TLSVersions.N String Yes TLSv1.0

The version of the TLS protocol. Valid values: TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. You can specify at most four TLS versions.

Response parameters

Parameter Type Example Description
TLSCipherPolicyId String tls-bp14bb1e7dll4f****

The ID of the policy.

RequestId String D7A8875F-373A-5F48-8484-25B07A61F2AF

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateTLSCipherPolicy
&RegionId=cn-hangzhou
&Name=TLSPolicy-test
&Ciphers=["ECDHE-ECDSA-AES128-SHA"]
&TLSVersions=["TLSv1.0"]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateTLSCipherPolicyResponse>
    <TLSCipherPolicyId>tls-bp14bb1e7dll4f****</TLSCipherPolicyId>
    <RequestId>D7A8875F-373A-5F48-8484-25B07A61F2AF</RequestId>
</CreateTLSCipherPolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TLSCipherPolicyId" : "tls-bp14bb1e7dll4f****",
  "RequestId" : "D7A8875F-373A-5F48-8484-25B07A61F2AF"
}

Error codes

HttpCode Error code Error message Description
400 MissingParam.Name The param Name is missing. The error message returned because the Name parameter is not set.
400 MissingParam.TlsVersions The param TlsVersions is missing. The error message returned because the TlsVersions parameter is not set.
400 MissingParam.Ciphers The param Ciphers is missing. The error message returned because the Ciphers parameter is not set.
400 ParamDuplicateError.TlsVersions The param TlsVersions is duplicate in request. The error message returned because TlsVersions already exists.
400 ParamDuplicateError.Ciphers The param Ciphers is duplicate in request. The error message returned because Ciphers already exists.
400 TLSPolicyNoSupportVersion The specified TLS version is not supported. The error message returned because the specified TLS policy does not support the TLS version.
400 TLSPolicyNoSupportCipher The specified TLS cipher is not supported. The error message returned because the specified TLS policy does not support the cipher suites.
400 TLSCipherPolicyOverLimit The TLSCipherPolicy is over the limit. The error message returned because the number of TLS policies has reached the upper limit.

For a list of error codes, visit the API Error Center.