查询容器实例在指定智算中心下可购买的规格(SKU)及其价格、计费方式,用于开通或变配前选择资源规格。同步返回。
https://api.alayanew.com/api/osm/v1/sku/list-for-cci鉴权(Authorizations)
bearerAuthAuthorizationString必填用户获取Authorization请求头后,通过该请求头完成身份认证。例如:Authorization: [your-auth-header]。
Query Parameters
aidcIdLong智算中心 ID,不传时返回全部中心。例如:1。
includeUnavailableBoolean是否包含不可售规格,true 时不可售项一并返回。
onlyOnlineBoolean是否只返回已上线项,默认 true。
resourceScopeString资源适用范围筛选:ELASTIC / EXCLUSIVE。
billingModeIdLong按计费方式 ID 筛选。例如:3001。
Response
application/json · 200statusInteger业务状态码,200 表示成功。
messageString接口响应信息。例如:"OK"。
dataArray可售规格(SKU)列表。
显示 properties
skuCodeString规格编码,开通与变配时使用。例如:"cci.gpu.g8xlarge"。
skuNameString规格名称。例如:"GPU 计算型 g8xlarge"。
skuStatusString规格上架状态。例如:"ONLINE"。
isDefaultBoolean是否为规格系列默认项。例如:true。
aidcIdLong智算中心 ID。例如:1。
aidcNameString智算中心名称。例如:"华东一智算中心"。
priceTypesArray可用价格类型:CASH(现金)、DCU(算力包)。例如:["CASH", "DCU"]。
availabilityLevelString可用等级:AVAILABLE(可用)、RESOURCE_TIGHT(资源紧张)、UNAVAILABLE(不可用)。例如:"AVAILABLE"。
computeResourceScopeString适用范围:EXCLUSIVE(独占)、ELASTIC(弹性)、BOTH(两者均可)。例如:"ELASTIC"。
priceObject价格信息。
显示 properties
flatUnitPriceNumber现金单价,未启用现金计价时为空。例如:12.5。
flatDcuRateNumber算力包单价,未启用算力包计价时为空。例如:1.5。
billingModesArray支持的计费方式列表。
显示 properties
billingModeIdString计费方式 ID。例如:"3001"。
nameString计费方式名称。例如:"按量计费"。
isDefaultBoolean是否默认计费方式。例如:true。
specificationsArray资源规格明细。
显示 properties
codeString资源规格编码。例如:"gpu.g8xlarge"。
nameString资源规格名称。例如:"8 卡 GPU 规格"。
primaryResourceObject主资源(如 GPU、CPU),含名称、类型、单位、数量。
显示 properties
nameString主资源名称。例如:"GPU 卡"。
typeString主资源类型。例如:"GPU"。
valueString主资源数量。例如:"8"。
resourcesObject全部资源明细,含主资源与附属资源(如 gpu、cpu、memory)。
显示 properties
gpuObject加速卡资源。
显示 properties
nameString资源名称。例如:"GPU"。
typeString资源类型。例如:"GPU"。
labelString数量标签。例如:"8 卡"。
cpuObjectCPU 资源,字段结构同 gpu(name、type、label)。例如:"96 核"。
memoryObject内存资源,字段结构同 gpu(name、type、label)。例如:"768 GB"。
priceObject该规格的独立价格及计价单位。
显示 properties
flatUnitPriceNumber现金单价。例如:12.5。
flatDcuRateNumber算力包单价。例如:1.5。
nameString计价单位。例如:"元/小时"。
curl -X 'GET' \
'https://api.alayanew.com/api/osm/v1/sku/list-for-cci?aidcId=1&onlyOnline=true&billingModeId=3001' \
-H 'accept: application/json' \
-H 'Authorization: [your-auth-header]'import requests
url = "https://api.alayanew.com/api/osm/v1/sku/list-for-cci"
params = {"aidcId": 1, "onlyOnline": True, "billingModeId": 3001}
headers = {
"accept": "application/json",
"Authorization": "[your-auth-header]"
}
response = requests.get(url, params=params, headers=headers)
print(response.json())const params = new URLSearchParams({ aidcId: '1', onlyOnline: 'true', billingModeId: '3001' });
fetch(`https://api.alayanew.com/api/osm/v1/sku/list-for-cci?${params}`, {
method: 'GET',
headers: {
'accept': 'application/json',
'Authorization': '[your-auth-header]'
}
})
.then(res => res.json())
.then(console.log)
.catch(console.error);{
"status": 200,
"message": "OK",
"data": [
{
"skuCode": "cci.gpu.g8xlarge",
"skuName": "GPU 计算型 g8xlarge",
"skuStatus": "ONLINE",
"isDefault": true,
"aidcId": 1,
"aidcName": "华东一智算中心",
"priceTypes": [
"CASH",
"DCU"
],
"availabilityLevel": "AVAILABLE",
"computeResourceScope": "ELASTIC",
"price": {
"flatUnitPrice": 12.5,
"flatDcuRate": 1.5
},
"billingModes": [
{
"billingModeId": "3001",
"name": "按量计费",
"isDefault": true
},
{
"billingModeId": "3002",
"name": "包月",
"isDefault": false
}
],
"specifications": [
{
"code": "gpu.g8xlarge",
"name": "8 卡 GPU 规格",
"primaryResource": {
"name": "GPU 卡",
"type": "GPU",
"value": "8"
},
"resources": {
"gpu": {
"name": "GPU",
"type": "GPU",
"label": "8 卡"
},
"cpu": {
"name": "CPU",
"type": "CPU",
"label": "96 核"
},
"memory": {
"name": "内存",
"type": "MEMORY",
"label": "768 GB"
}
},
"price": {
"flatUnitPrice": 12.5,
"flatDcuRate": 1.5,
"name": "元/小时"
}
}
]
}
]
}Last updated on
