文档

CheckOutLicense - 鉴权服务实例有效期

更新时间:

调用CheckOutLicense接口校验计算巢服务实例是否过期。

接口说明

该API仅支持配置自定义售卖的计算巢服务实例或通过云市场创建的计算巢服务实例,调用CheckOutLicense检查服务实例有效期。

请求参数

名称

类型

是否必选

描述

示例值

ServiceId

string

服务ID。

service-1e2e93c150084exxxxxx

ServiceInstanceName

string

服务实例名称。

test

返回参数

名称

类型

描述

示例值

RequestId

string

请求ID。

B22723B7-FC31-18F5-A33E-1AF4C82736AA

ServiceInstanceId

string

服务实例ID。

si-8722386303094axxxxxx

LicenseMetadata

string

元数据。

需要在自定义售卖配置中定义该数据。

{\"TemplateName\":\"Custom_Image_Ecs\",\"SpecificationName\":\"\",\"CustomData\":\"xxxx\"}

TrialType

string

服务试用类型。可能的值:

  • Trial:支持试用。

  • NotTrial:不支持试用。

NotTrial

Token

string

数字签名。校验数字签名的详细信息,请参见计算巢校验数字签名说明

58d4574bd0d967bb431cd8936b5e80c4

ExpireTime

string

服务实例的到期时间。

2023-08-28T06:27:08Z

ServiceId

string

服务ID。

service-1e2e93c150084exxxxxx

Components

string

云市场额外计费项信息。

{\"package_version\":\"yuncode55xxxxxxxx\",\"SystemDiskSize\":\"40\",\"DataDiskSize\":\"100\"}

错误码

错误码

错误信息

描述

CheckoutFail

License checkout for the service instance has failed.

校验失败。按量付费服务实例-上报源存在Prometheus场景,若服务实例对应Prometheus实例被删除将报出此错误。

InvalidParameter

The provided parameter "ServiceId" is invalid.

传入服务ID非法。

InstanceArrears

The current service instance ${serviceInstanceId} is in arrears.

按量付费场景服务实例欠费。

LicenseExpired

  • 按量:The license of the current service instance ${serviceInstanceId} has expired.

  • 非按量:The license of the current service instance ${serviceInstanceId} has expired. expired time ${Time}.

非按量(包年包月/按次)或按量付费服务实例过期。

OperationDenied

Service instance Pay type ${payType} not support checkout license.

服务实例付费类型不支持调用CheckOutLicense。

ServiceInstanceIdNotFound

The specified service instance Id cannot be found, the instance Id is ${instanceId}.

服务实例ID未发现(非计算巢开出的ECS)。

使用示例

校验服务实例有效期以及是否欠费的详细示例。请参见调用CheckOutLicense示例