调用DisableActivation手动禁用指定的激活码。
接口说明
接口说明
如果您担心已创建的激活码存在泄露的风险,可以通过该接口禁用激活码。禁用后无法再通过该激活码注册新的托管实例,但不会影响已经注册的托管实例。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:DisableActivation |
update |
*Activation
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。目前支持的地域:华北 1(青岛)、华北 2(北京)、华北 3(张家口)、华北 5(呼和浩特)、华北 6(乌兰察布)、华东 1(杭州)、华东 2(上海)、华南 1(深圳)、华南 2(河源)、华南 3(广州)、西南 1(成都)、中国香港、新加坡、日本(东京)、美国(硅谷)、美国(弗吉尼亚)。 您可以调用 DescribeRegions 查看地域对应的 ID 等信息。 |
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。目前支持的地域:华北 1(青岛)、华北 2(北京)、华北 3(张家口)、华北 5(呼和浩特)、华北 6(乌兰察布)、华东 1(杭州)、华东 2(上海)、华南 1(深圳)、华南 2(河源)、华南 3(广州)、西南 1(成都)、中国香港、新加坡、日本(东京)、美国(硅谷)、美国(弗吉尼亚)。 您可以调用 DescribeRegions 查看地域对应的 ID 等信息。 |
cn-hangzhou |
| ActivationId |
string |
是 |
激活码 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F74942176 |
| Activation |
object |
激活码及使用情况信息组成的集合。 |
|
| CreationTime |
string |
创建时间。 |
2021-01-20T06:00:00Z |
| DeregisteredCount |
integer |
已注销的实例数。 |
1 |
| InstanceCount |
integer |
激活码用于注册托管实例的使用次数上限。 |
1 |
| Description |
string |
激活码对应的描述。 |
This is description. |
| RegisteredCount |
integer |
已注册的实例数。 |
1 |
| InstanceName |
string |
默认的实例名称前缀。 |
test-InstanceName |
| Disabled |
boolean |
激活码是否被禁用。 |
false |
| IpAddressRange |
string |
允许使用该激活码的主机 IP。 |
0.0.0.0/0 |
| TimeToLiveInHours |
integer |
激活码的有效时间。单位:小时。 |
4 |
| ActivationId |
string |
激活码 ID。 |
4ECEEE12-56F1-4FBC-9AB1-890F1234**** |
示例
正常返回示例
JSON格式
{
"RequestId": "4ECEEE12-56F1-4FBC-9AB1-890F74942176",
"Activation": {
"CreationTime": "2021-01-20T06:00:00Z",
"DeregisteredCount": 1,
"InstanceCount": 1,
"Description": "This is description.",
"RegisteredCount": 1,
"InstanceName": "test-InstanceName",
"Disabled": false,
"IpAddressRange": "0.0.0.0/0",
"TimeToLiveInHours": 4,
"ActivationId": "4ECEEE12-56F1-4FBC-9AB1-890F1234****"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | 指定地域下不支持调用 API。请检查 RegionId 参数取值是否正确。 |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | 发送请求时发生错误,请稍后重试。 |
| 403 | Operation.Forbidden | The operation is not permitted. | 该操作是不被允许的。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地域信息错误 |
| 404 | ActivationId.NotFound | The specified activation id does not exist. | 指定的激活码不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。