开启或关闭删除保护功能,及更新修改保护功能。
接口说明
您可以通过 GetLoadBalancerAttribute 接口查询删除保护和修改保护详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
nlb:UpdateLoadBalancerProtection |
update |
*LoadBalancer
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DeletionProtectionEnabled |
boolean |
否 |
是否开启删除保护。取值:
|
false |
| DeletionProtectionReason |
string |
否 |
输入开启删除保护的原因。长度为 2~128 个英文或中文字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-)。 说明
仅在 DeletionProtectionEnabled 为 true 时该参数有效且合法。 |
实例使用中 |
| ModificationProtectionStatus |
string |
否 |
网络型负载均衡修改保护状态。取值:
说明
当取值为 ConsoleProtection,即开启修改保护后,用户不能通过负载均衡控制台修改实例配置,但可以通过调用 API 修改实例配置。 |
ConsoleProtection |
| ModificationProtectionReason |
string |
否 |
输入开启修改保护的原因。长度为 2~128 个英文或中文字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-)。 说明
仅在 Status 为 ConsoleProtection 时该参数有效且合法。 |
托管实例 |
| LoadBalancerId |
string |
是 |
网络型负载均衡实例 ID。 |
nlb-83ckzc8d4xlp8o**** |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
否 |
网络型负载均衡实例所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
更新修改删除保护。 |
||
| RequestId |
string |
请求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
示例
正常返回示例
JSON格式
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ResourceInConfiguring.%s | The specified resource of %s is being configured, please try again later. | 指定的资源%s正在配置,请稍后重试 |
| 400 | IllegalParam | The param of %s is illegal. | 输入的参数有值非法,请检查输入。 |
| 400 | IdempotenceSignatureMismatch | The idempotence token of request is same with the prev one, but the signature is different. | 请求的幂等令牌与上一个相同,但签名不同。 |
| 400 | Conflict.Lock | The Lock [%s] is conflict. | 指定的资源当前存在锁冲突。 |
| 400 | ResourceInConfiguring.loadbalancer | The specified resource of loadbalancer is being configured, please try again later. | 正在配置指定的负载均衡资源,请稍后重试。 |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | dryRun请求验证已通过。 |
| 400 | IllegalParam.deletionProtectionReason | The param of deletionProtectionReason is illegal. | 参数deletionProtectionReason非法,请检查参数是否满足长度为2-128个英文或中文字符,必须以大小字母或中文开头,可包含数字,点号(.),下划线(_)和短横线(-)。 |
| 400 | IllegalParam.modificationProtectionReason | The param of modificationProtectionReason is illegal. | 参数modificationProtectionReason非法,请参考文档进行修改。 |
| 400 | ResourceInCreating.loadbalancer | The specified resource of loadbalancer is creating, please try again later. | 正在创建指定的负载均衡器资源,请稍后重试。 |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | 因为账号没有权限,所以鉴权失败。 |
| 404 | ResourceNotFound.loadBalancer | The specified resource of loadbalancer is not found. | 找不到指定的负载均衡器资源,请检查输入参数。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。