Enables or disables deletion protection for an SLB instance.

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 SetLoadBalancerDeleteProtection

The operation that you want to perform.

Set the value to SetLoadBalancerDeleteProtection.

DeleteProtection String Yes off

Specify whether to enable or disable deletion protection for the SLB instance.

Valid values: on and off.

LoadBalancerId String Yes lb-bp1b6c719dfa08e*****

The ID of the SLB instance.

RegionId String Yes cn-hangzhou

The region where the SLB instance is deployed.

You can call the DescribeRegions operation to query region IDs.

Response parameters

Parameter Type Example Description
RequestId String 791D8B68-AE0F-4174-AF54-088C8B3C5D54

The ID of the request.

Examples

Sample request

http(s)://[Endpoint]/? Action=SetLoadBalancerDeleteProtection
&DeleteProtection=off
&LoadBalancerId=lb-bp1b6c719dfa08e*****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<SetLoadBalancerDeleteProtectionResponse>
	  <RequestId>791D8B68-AE0F-4174-AF54-088C8B3C5D54</RequestId>
    </SetLoadBalancerDeleteProtectionResponse>

JSON format

{
    "RequestId": "791D8B68-AE0F-4174-AF54-088C8B3C5D54"
}

Error codes

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