查询资源包、预留实例劵、预留存储容量包的信息
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListResourcePackages | 要执行的操作,取值:ListResourcePackages。 |
Version | String | 是 | 2022-01-01 | API的版本,取值:2022-01-01。 |
ResourceType | String | 是 | Package | 查询的资源实例类型。 |
MaxResults | String | 是 | 20 | 每次查询返回最大条数,上限20。 |
NextToken | String | 否 | "1000" | 下一页开始ID,首次查询填空"",后续翻页返回中会携带下一次起始ID,当返回为空时,表示后续无数据。 |
Product | String | 否 | CDN | 资源实例对应商品编码 |
EffectiveTimeBegin | String | 否 | 2022-02-02T12:00:00Z | 资源实例生效开始时间。 |
EffectiveTimeEnd | String | 否 | 2025-02-02T12:00:00Z | 资源实例生效结束时间。 |
Status | String | 否 | Effective | 资源实例状态。 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
List | Array of Object | [] | 资源实例信息列表 |
NextToken | String | 100 | 下一页起始ID |
POST /?Action=ListResourcePackages&Version=2022-01-01 HTTP/1.1 Host: https://open.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20240820T092339Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240820/cn-beijing/billing/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "ResourceType": "Package", "MaxResults": "20", "NextToken": "" }
{ "ResponseMetadata": { "RequestId": "20240823183418140163168173B94778", "Action": "ListResourcePackages", "Version": "2022-01-01", "Service": "billing", "Region": "cn-beijing" }, "Result": { "List": [ { "OwnerID": "2100000001", "UserName": "user", "PackageType": "Periodic", "InstanceNo": "Instance7365828935959969836", "InstanceName": "资源包实例1", "Product": "CDN", "ProductName": "内容分发网络", "TotalAmount": "500", "AvailableAmount": "499", "Unit": "GB", "EffectiveTime": "2022-02-02T12:00:00Z", "ExpiryTime": "2025-02-02T12:00:00Z", "BillTime": "2022-02-02T12:00:00Z", "Status": "Effective", "ConfigurationCode": "CDN_mainland_500GB_1m_package", "ConfigurationName": "国内CDN-500GB-1月有效期", "Specification": "500", "SpecificationUnit": "GB", "RegionCode": "cn-beijing", "ZoneCode": "cn-beijing-a", "SpecCalculateFactor": "1", "ResetPeriod": "monthly", "ResetByNaturalMonth": "true", "SubjectNo": "北京火山引擎科技有限公司" } ], "NextToken": "100" } }
POST /?Action=ListResourcePackages&Version=2022-01-01 HTTP/1.1 Host: https://open.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20240819T145836Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240819/cn-beijing/billing/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "ResourceType": "RI", "MaxResults": "30" }
{ "ResponseMetadata": { "RequestId": "20240819225334C267EB2C212C378733A4", "Action": "ListResourcePackages", "Version": "20220101", "Service": "billing", "Region": "cn-beijing", "Error": { "Code": "InvalidParam", "Message": "The parameter MaxResults is invalid." } } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
---|---|---|
400 | MissingParameter | 参数缺失 |
400 | InvalidParam | 参数无效 |
500 | InternalError | 服务内部异常 |