Enable or disable the configuration read-only mode for a Classic Load Balancer (CLB) instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:SetLoadBalancerModificationProtection |
update |
*loadbalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the CLB instance. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
The ID of the CLB instance. |
lb-bp1b6c719dfa08e***** |
| ModificationProtectionStatus |
string |
Yes |
Specifies whether to enable the configuration read-only mode. Valid values:
Note
If you set this parameter to ConsoleProtection, you cannot use the CLB console to modify instance configurations. However, you can call API operations to modify instance configurations. |
ConsoleProtection |
| ModificationProtectionReason |
string |
No |
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 if the ModificationProtectionStatus parameter is set to ConsoleProtection. |
Configuration change |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
791D8B68-AE0F-4174-AF54-088C8B3C5D54 |
Examples
Success response
JSON format
{
"RequestId": "791D8B68-AE0F-4174-AF54-088C8B3C5D54"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationUnsupported.SetLoadBalancerStatus | The zone of the loadBalancer does not support this operation. | |
| 400 | InvalidParam.ModificationProtectionStatus | The param ModificationProtectionStatus is invalid. | |
| 400 | InvalidParam.ModificationProtectionReason | The param ModificationProtectionReason is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.