showRunStrategy: false
default:
  strategy:
    runStrategy: 0
name: TencentActionInstancesPlugin
title: 腾讯云-实例开关机
icon: svg:icon-tencentcloud
group: tencent
desc: 腾讯云实例开关机
needPlus: false
input:
  accessId:
    title: Access提供者
    helper: access 授权
    component:
      name: access-selector
      type: tencent
    required: true
    order: 0
  region:
    title: 所在地域
    helper: 实例所在地域
    component:
      name: a-auto-complete
      vModel: value
      options:
        - value: ''
          label: '--------中国大陆地区-------'
          disabled: true
        - value: ap-beijing-1
          label: 北京1区
        - value: ap-beijing
          label: 北京
        - value: ap-nanjing
          label: 南京
        - value: ap-shanghai
          label: 上海
        - value: ap-guangzhou
          label: 广州
        - value: ap-chengdu
          label: 成都
        - value: ap-chongqing
          label: 重庆
        - value: ap-shenzhen-fsi
          label: 深圳金融
        - value: ap-shanghai-fsi
          label: 上海金融
        - value: ap-beijing-fsi
          label: 北京金融
        - value: ''
          label: '--------中国香港及境外-------'
          disabled: true
        - value: ap-hongkong
          label: 中国香港
        - value: ap-singapore
          label: 新加坡
        - value: ap-mumbai
          label: 孟买
        - value: ap-jakarta
          label: 雅加达
        - value: ap-seoul
          label: 首尔
        - value: ap-bangkok
          label: 曼谷
        - value: ap-tokyo
          label: 东京
        - value: na-siliconvalley
          label: 硅谷
        - value: na-ashburn
          label: 弗吉尼亚
        - value: sa-saopaulo
          label: 圣保罗
        - value: eu-frankfurt
          label: 法兰克福
    required: true
    order: 0
  instanceId:
    title: 实列ID
    component:
      name: remote-select
      vModel: value
      mode: tags
      type: plugin
      typeName: TencentStartInstancesPlugin
      action: onGetInstanceList
      watches:
        - certDomains
        - accessId
        - region
    required: true
    mergeScript: |2-

                return {
                  component:{
                    form: ctx.compute(({form})=>{
                      return form
                    })
                  },
               }
              
    helper: 请选择实列
    order: 0
  action:
    title: 操作
    component:
      name: a-radio-group
      vModel: value
      options:
        - value: start
          label: 开机
        - value: stop
          label: 关机
    required: true
    order: 0
  charging:
    title: 实例关机不收费
    value: true
    component:
      name: a-switch
      vModel: checked
      placeholder: 按量计费实例关机不收费
    required: false
    mergeScript: |2-

            return {
              show: ctx.compute(({form})=>{
                return form.action === 'stop';
              })
            }
        
    order: 0
output: {}
type: builtIn
pluginType: deploy
scriptFilePath: ../../../plugins/plugin-tencent/plugin/start-instances/index.js
