Enables or disables the configuration read-only mode for a Classic Load Balancer (CLB) instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-hangzhou | The region ID of the CLB instance. You can call the DescribeRegions operation to query the most recent region list. |
Action | String | Yes | SetLoadBalancerModificationProtection | The operation that you want to perform. Set the value to SetLoadBalancerModificationProtection. |
LoadBalancerId | String | Yes | lb-bp1b6c719dfa08e***** | The ID of the CLB instance. |
ModificationProtectionStatus | String | Yes | ConsoleProtection | Specifies whether to enable the configuration read-only mode. Valid values:
Note If you set this parameter to ConsoleProtection, you cannot modify instance configurations in the CLB console. However, you can modify instance configurations by calling API operations. |
ModificationProtectionReason | String | No | Modify configurations | The reason why the configuration read-only mode is enabled. The value must be 1 to 80 characters in length. It must start with a letter and can contain letters, digits, periods (.), underscores (_), and hyphens (-). Note This parameter is valid only when ModificationProtectionStatus is set to ConsoleProtection. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 791D8B68-AE0F-4174-AF54-088C8B3C5D54 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=cn-hangzhou
&Action=SetLoadBalancerModificationProtection
&LoadBalancerId=lb-bp1b6c719dfa08e*****
&ModificationProtectionStatus=ConsoleProtection
&ModificationProtectionReason=Modify configurations
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SetLoadBalancerModificationProtectionResponse>
<RequestId>791D8B68-AE0F-4174-AF54-088C8B3C5D54</RequestId>
</SetLoadBalancerModificationProtectionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "791D8B68-AE0F-4174-AF54-088C8B3C5D54"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | OperationUnsupported.SetLoadBalancerStatus | The zone of the loadBalancer does not support this operation. | The error message returned because the current CLB instance does not support this operation. |
400 | InvalidParam.ModificationProtectionStatus | The param ModificationProtectionStatus is invalid. | The error message returned because ModificationProtectionStatus is set to an invalid value. Specify a valid value and try again. |
400 | InvalidParam.ModificationProtectionReason | The param ModificationProtectionReason is invalid. | The error message returned because ModificationProtectionReason is set to an invalid value. Specify a valid value and try again. |
400 | InvalidParam.ModificationProtectionReason | %s. | The error message returned because ModificationProtectionReason is set to an invalid value. Specify a valid value and try again. |
For a list of error codes, see Service error codes.