POST zstack/v1/instance-offerings/virtual-routers
Authorization: OAuth the-session-uuid
{
"params": {
"zoneUuid": "b2826f6c4a5b433b87916e2240132ffa",
"managementNetworkUuid": "2f8e7e8636db4313b735edddc488a961",
"imageUuid": "bc78c126c6a94ee3aec0c840b50730a7",
"publicNetworkUuid": "95c8cc36b34e4ad89d0eb9b0b6ee02e6",
"isDefault": true,
"name": "VirtualRouter-Offering",
"cpuNum": 2.0,
"memorySize": 1024.0,
"sortKey": 0.0,
"type": "VirtualRouter"
},
"systemTags": [],
"userTags": []
}
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth bca83008f4154b488a8167f021144e4d" \
-X POST -d '{"params":{"zoneUuid":"a0f488a96504388cae48c6c489c5f368","managementNetworkUuid":"3f5412e1ad0b3021bbdb77503fc7de86","imageUuid":"23743ebd52213235a11e21245100bd57","publicNetworkUuid":"1a24d621f66432eb845b3835697538ed","isDefault":true,"name":"VirtualRouter-Offering","cpuNum":2.0,"memorySize":1024.0,"sortKey":0.0,"type":"VirtualRouter"}}' \
http://localhost:8080/zstack/v1/instance-offerings/virtual-routers
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
zoneUuid | String | body(包含在params结构中) | 区域UUID | 0.6 | |
managementNetworkUuid | String | body(包含在params结构中) | 管理L3网络UUID | 0.6 | |
imageUuid | String | body(包含在params结构中) | 镜像UUID | 0.6 | |
publicNetworkUuid (可选) | String | body(包含在params结构中) | 公有L3网络UUID | 0.6 | |
isDefault (可选) | Boolean | body(包含在params结构中) | 默认 | 0.6 | |
name | String | body(包含在params结构中) | 资源名称 | 0.6 | |
description (可选) | String | body(包含在params结构中) | 资源的详细描述 | 0.6 | |
cpuNum | int | body(包含在params结构中) | CPU数量 | 0.6 | |
memorySize | long | body(包含在params结构中) | 内存大小 | 0.6 | |
allocatorStrategy (可选) | String | body(包含在params结构中) | 分配策略 |
| 0.6 |
sortKey (可选) | int | body(包含在params结构中) | 排序主键 | 0.6 | |
type (可选) | String | body(包含在params结构中) | 类型 | 0.6 | |
resourceUuid (可选) | String | body(包含在params结构中) | 资源UUID | 0.6 | |
systemTags (可选) | List | body | 系统标签 | 0.6 | |
userTags (可选) | List | body | 用户标签 | 0.6 |
{
"inventory": {
"uuid": "db5bb944a9ef48eda9ff68d3eaedefed",
"name": "instanceOffering1",
"cpuNum": 2.0,
"cpuSpeed": 1.0,
"type": "UserVm",
"allocatorStrategy": "Mevoco",
"createDate": "Jun 7, 2017 9:20:13 PM",
"lastOpDate": "Jun 7, 2017 9:20:13 PM",
"state": "Enabled"
}
}
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 0.6 |
inventory | InstanceOfferingInventory | 详情参考inventory | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 0.6 |
description | String | 错误的概要描述 | 0.6 |
details | String | 错误的详细信息 | 0.6 |
elaboration | String | 保留字段,默认为null | 0.6 |
opaque | LinkedHashMap | 保留字段,默认为null | 0.6 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
name | String | 资源名称 | 0.6 |
description | String | 资源的详细描述 | 0.6 |
cpuNum | Integer | CPU数量 | 0.6 |
cpuSpeed | Integer | CPU速度 | 0.6 |
memorySize | Long | 内存大小 | 0.6 |
type | String | 类型 | 0.6 |
allocatorStrategy | String | 分配策略 | 0.6 |
sortKey | Integer | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
state | String | 状态(启用,禁用) | 0.6 |
CreateVirtualRouterOfferingAction action = new CreateVirtualRouterOfferingAction();
action.zoneUuid = "389c6a48c332450ea280933b34e61ac4";
action.managementNetworkUuid = "381c2166c0454d95aed829715ae294b8";
action.imageUuid = "a4da1399797145bc87e36b424e5336af";
action.publicNetworkUuid = "5bf6caac74304a489eda76ae64624f6b";
action.isDefault = true;
action.name = "VirtualRouter-Offering";
action.cpuNum = 2.0;
action.memorySize = 1024.0;
action.sortKey = 0.0;
action.type = "VirtualRouter";
action.sessionId = "b811bf42d0b541ea993787b1fa80e724";
CreateVirtualRouterOfferingAction.Result res = action.call();
CreateVirtualRouterOfferingAction action = CreateVirtualRouterOfferingAction()
action.zoneUuid = "d115bed650ad45128aff5216c9f72d23"
action.managementNetworkUuid = "1b4f915b327d488db04c517b767e2731"
action.imageUuid = "737992cde79646ce915681b74e4c4de7"
action.publicNetworkUuid = "6af154a9cd274134ac44d2d889474158"
action.isDefault = true
action.name = "VirtualRouter-Offering"
action.cpuNum = 2.0
action.memorySize = 1024.0
action.sortKey = 0.0
action.type = "VirtualRouter"
action.sessionId = "71db629e6f484b3187c48ecb1d65dcea"
CreateVirtualRouterOfferingAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
立即体验
联系我们
回到顶部
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。