Creates a custom security policy for a Network Load Balancer (NLB) instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateSecurityPolicy | The operation that you want to perform. Set the value to CreateSecurityPolicy. |
| TlsVersions.N | String | No | TLSv1.0 | The supported versions of the Transport Layer Security (TLS) protocol. Valid values: TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. You can specify at most four TLS protocol versions. |
| SecurityPolicyName | String | No | TLSCipherPolicy | The name of the security policy. The name must be 1 to 200 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). |
| ResourceGroupId | String | No | rg-atstuj3rtop**** | The resource group ID. |
| Ciphers.N | String | No | 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:
TLS 1.2 supports the following cipher suites:
TLS 1.3 supports the following cipher suites:
|
| DryRun | Boolean | No | false | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
|
| ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request. |
| RegionId | String | No | cn-hangzhou | The region ID of the NLB instance. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | D7A8875F-373A-5F48-8484-25B07A61F2AF | The request ID. |
| SecurityPolicyId | String | tls-bp14bb1e7dll4f**** | The ID of the TLS security policy. |
| JobId | String | 72dcd26b-f12d-4c27-b3af-18f6aed5**** | The ID of the asynchronous task. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateSecurityPolicy
&TlsVersions=["TLSv1.0"]
&SecurityPolicyName=TLSCipherPolicy
&ResourceGroupId=rg-atstuj3rtop****
&Ciphers=["ECDHE-ECDSA-AES128-SHA"]
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateSecurityPolicyResponse>
<RequestId>D7A8875F-373A-5F48-8484-25B07A61F2AF</RequestId>
<SecurityPolicyId>tls-bp14bb1e7dll4f****</SecurityPolicyId>
<JobId>72dcd26b-f12d-4c27-b3af-18f6aed5****</JobId>
</CreateSecurityPolicyResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "D7A8875F-373A-5F48-8484-25B07A61F2AF",
"SecurityPolicyId" : "tls-bp14bb1e7dll4f****",
"JobId" : "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}
Error codes
For a list of error codes, visit the API Error Center.