All Products
Search
Document Center

Server Load Balancer:UpdateSecurityPolicyAttribute

Last Updated:Mar 21, 2025

Modifies the configurations of a security policy for a Network Load Balancer (NLB) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
nlb:UpdateSecurityPolicyAttributeupdate
*SecurityPolicy
acs:nlb:{#regionId}:{#accountId}:securitypolicy/{#SecurityPolicyId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TlsVersionsarrayNo

The supported TLS versions. Valid values: TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. You can specify up to four TLS versions.

stringNo

The supported TLS version. Valid values: TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. You can specify up to four TLS versions.

TLSv1.0
SecurityPolicyIdstringYes

The ID of the TLS security policy.

tls-bp14bb1e7dll4f****
SecurityPolicyNamestringNo

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 (-).

TLSCipherPolicy
CiphersarrayNo

The supported cipher suites. Valid values of this parameter vary base on the value of TlsVersions. You can specify up to 32 cipher suites.

TLSv1.0 and TLSv1.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

TLSv1.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

TLSv1.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
CipherstringNo

The supported cipher suites. Valid values of this parameter vary base on the value of TlsVersions. You can specify up to 32 cipher suites.

TLSv1.0 and TLSv1.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

TLSv1.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

TLSv1.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
ECDHE-ECDSA-AES128-SHA
RegionIdstringNo

The ID of the region where the NLB instance is deployed.

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

cn-hangzhou
DryRunbooleanNo

Specifies whether to perform a dry run. Valid values:

  • true: validates the request without performing the operation. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the validation, the corresponding error message is returned. If the request passes the validation, the DryRunOperation error code is returned.
  • false (default): validates the request and performs the operation. If the request passes the validation, a 2xx HTTP status code is returned and the operation is performed.
false
ClientTokenstringNo

The client token used to ensure the idempotence of the request.

You can use the client to generate the token. Ensure that the token is unique among different requests. Only ASCII characters are allowed.

Note If you do not set this parameter, the value of RequestId is used.**** The value of RequestId is different for each request.
123e4567-e89b-12d3-a456-426655440000

Response parameters

ParameterTypeDescriptionExample
object

Modifies the attributes of a security policy.

RequestIdstring

The request ID.

D7A8875F-373A-5F48-8484-25B07A61F2AF
SecurityPolicyIdstring

The ID of the TLS security policy.

tls-bp14bb1e7dll4f****
JobIdstring

The ID of the asynchronous task.

72dcd26b-f12d-4c27-b3af-18f6aed5****

Examples

Sample success responses

JSONformat

{
  "RequestId": "D7A8875F-373A-5F48-8484-25B07A61F2AF",
  "SecurityPolicyId": "tls-bp14bb1e7dll4f****",
  "JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.PreserveClientIpSwitchThe param of PreserveClientIpSwitch is illegal.-
400UpdateSecurityPolicyFailedThe operation failed because of Security Policy is not changed.-
404ResourceNotFound.securitypolicyThe specified resource of securitypolicy is not found.-
404ResourceNotFound.serverGroupThe specified resource of serverGroup is not found.The specified resource of serverGroup is not found. Please check the input parameters.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-05The Error code has changedView Change Details
2023-08-22The Error code has changedView Change Details