InstanceTemplateSpec.go 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Copyright 2018 JDCLOUD.COM
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. // NOTE: This class is auto generated by the jdcloud code generator program.
  16. package models
  17. type InstanceTemplateSpec struct {
  18. /* 实例规格,可查询<a href="http://docs.jdcloud.com/virtual-machines/api/describeinstancetypes">DescribeInstanceTypes</a>接口获得指定地域或可用区的规格信息。 */
  19. InstanceType string `json:"instanceType"`
  20. /* 镜像ID,可查询<a href="http://docs.jdcloud.com/virtual-machines/api/describeimages">DescribeImages</a>接口获得指定地域的镜像信息。 */
  21. ImageId string `json:"imageId"`
  22. /* 密码,<a href="http://docs.jdcloud.com/virtual-machines/api/general_parameters">参考公共参数规范</a>。 (Optional) */
  23. Password *string `json:"password"`
  24. /* 密钥对名称;当前只支持一个 (Optional) */
  25. KeyNames []string `json:"keyNames"`
  26. /* 用户自定义元数据信息,key-value 键值对数量不超过20。key、value不区分大小写。
  27. 注意:key不要以连字符(-)结尾,否则此key不生效。
  28. (Optional) */
  29. Metadata []Metadata `json:"metadata"`
  30. /* 元数据信息,目前只支持传入一个key为"launch-script",表示首次启动脚本。value为base64格式。
  31. launch-script:linux系统支持bash和python,编码前须分别以 #!/bin/bash 和 #!/usr/bin/env python 作为内容首行;
  32. launch-script:windows系统支持bat和powershell,编码前须分别以 <cmd></cmd> 和 <powershell></powershell> 作为内容首、尾行。
  33. (Optional) */
  34. Userdata []Userdata `json:"userdata"`
  35. /* 主网卡主IP关联的弹性IP规格 (Optional) */
  36. ElasticIp *InstanceTemplateElasticIpSpec `json:"elasticIp"`
  37. /* 主网卡配置信息 */
  38. PrimaryNetworkInterface *InstanceTemplateNetworkInterfaceAttachmentSpec `json:"primaryNetworkInterface"`
  39. /* 系统盘配置信息 (Optional) */
  40. SystemDisk *InstanceTemplateDiskAttachmentSpec `json:"systemDisk"`
  41. /* 数据盘配置信息 (Optional) */
  42. DataDisks []InstanceTemplateDiskAttachmentSpec `json:"dataDisks"`
  43. /* 停机不计费的标志, keepCharging(默认):关机后继续计费;stopCharging:关机后停止计费。 (Optional) */
  44. ChargeOnStopped *string `json:"chargeOnStopped"`
  45. /* 自动镜像策略ID。 (Optional) */
  46. AutoImagePolicyId *string `json:"autoImagePolicyId"`
  47. /* 当存在密钥时,是否同时使用密码登录,"yes"为使用,"no"为不使用,""默认为"yes" (Optional) */
  48. PassWordAuth *string `json:"passWordAuth"`
  49. /* 继承镜像中的登录验证方式,"yes"为使用,"no"为不使用,""默认为"no" (Optional) */
  50. ImageInherit *string `json:"imageInherit"`
  51. }