调用CreateGWSInstance创建一个可视化实例。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ClusterId | string | 是 | 可视化服务集群 ID。 | gws-rhzxpazwebua**** |
ImageId | string | 是 | 可视化服务镜像 ID。 | ehs-faeid-**** |
SystemDiskSize | integer | 是 | 系统盘大小。单位:GiB 取值范围:20~500 | 20 |
SystemDiskCategory | string | 是 | 系统盘类型。取值范围:
| cloud |
InstanceType | string | 是 | 可视化实例规格。 | ecs.g6.large |
InstanceChargeType | string | 是 | 可视化实例计费方式,不能为抢占式实例。
默认值:PostPaid | PostPaid |
WorkMode | string | 是 | 实例工作模式。取值范围:
| Desktop |
AllocatePublicAddress | boolean | 是 | 是否分配公网地址。取值范围:
默认值:false | false |
InternetChargeType | string | 否 | 公网带宽计费方式。取值范围:
默认值:PayByTraffic | PayByTraffic |
InternetMaxBandwidthIn | integer | 否 | 公网入带宽最大值。单位为 Mbit/s。取值范围:
| 122 |
InternetMaxBandwidthOut | integer | 否 | 公网出带宽最大值。单位:Mbit/s 取值范围:0~100 默认值:0 | 122 |
Name | string | 否 | 可视化实例名称。 | Test-ehpc |
Period | string | 否 | 购买资源的时长。单位由 PeriodUnit 指定。当 InstanceChargeType 取值为 PrePaid 时才生效,且为必选值。
| 1 |
PeriodUnit | string | 否 | 购买资源的时长单位。取值范围:
| Month |
AutoRenew | boolean | 否 | 是否自动续费。取值范围:
默认值:false | false |
AppList | string | 否 | 应用程序列表。WorkMode 选择为 Application 时必选。包含如下信息:
| [{AppName: notepad},{AppArgs:c:/temp.txt}] |
VSwitchId | string | 否 | 交换机 ID。 | vsw-bp1gb5gf5546rn**** |
返回参数
示例
正常返回示例
JSON
格式
{
"InstanceId": "i-bp1bzqddeemudsdsdsdsdn****",
"RequestId": "5198C3E8-85F5-4280-8547-687C1710FE08"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | 无效的参数:%s |
406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里云产品错误 |
407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
409 | PartFailure | Part of the batch operation failed. | 批量操作部分失败 |
500 | UnknownError | An unknown error occurred. | 未知错误 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
访问错误中心查看更多错误码。