github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/postgres/upgrade_db_instance.go (about)

     1  package postgres
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 升级实例
     8  // https://cloud.tencent.com/document/api/409/18095
     9  
    10  type UpgradeDbInstanceRequest struct {
    11  	// 是否自动使用代金券,1是,0否,默认不使用
    12  	AutoVoucher *int64 `name:"AutoVoucher,omitempty"`
    13  	// 实例ID,形如postgres-lnp6j617
    14  	DBInstanceId string `name:"DBInstanceId"`
    15  	// 升级后的实例内存大小,单位GB
    16  	Memory int64 `name:"Memory"`
    17  	// 区域
    18  	Region string `name:"Region"`
    19  	// 升级后的实例磁盘大小,单位GB
    20  	Storage int64 `name:"Storage"`
    21  	// 代金券ID列表,目前仅支持指定一张代金券
    22  	VoucherIds []*string `name:"VoucherIds,omitempty"`
    23  }
    24  
    25  func (req *UpgradeDbInstanceRequest) Invoke(client github_com_morlay_goqcloud.Client) (*UpgradeDbInstanceResponse, error) {
    26  	resp := &UpgradeDbInstanceResponse{}
    27  	err := client.Request("postgres", "UpgradeDBInstance", "2017-03-12").Do(req, resp)
    28  	return resp, err
    29  }
    30  
    31  type UpgradeDbInstanceResponse struct {
    32  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    33  	// 交易名字。
    34  	DealName string `json:"DealName"`
    35  }