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

     1  package cbs
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 挂载云硬盘
     8  // https://cloud.tencent.com/document/api/362/16313
     9  
    10  type AttachDisksRequest struct {
    11  	// 可选参数,不传该参数则仅执行挂载操作。传入True时,会在挂载成功后将云硬盘设置为随云主机销毁模式,仅对按量计费云硬盘有效。
    12  	DeleteWithInstance *bool `name:"DeleteWithInstance,omitempty"`
    13  	// 将要被挂载的弹性云盘ID。通过DescribeDisks接口查询。单次最多可挂载10块弹性云盘。
    14  	DiskIds []*string `name:"DiskIds"`
    15  	// 云服务器实例ID。云盘将被挂载到此云服务器上,通过DescribeInstances接口查询。
    16  	InstanceId string `name:"InstanceId"`
    17  	// 区域
    18  	Region string `name:"Region"`
    19  }
    20  
    21  func (req *AttachDisksRequest) Invoke(client github_com_morlay_goqcloud.Client) (*AttachDisksResponse, error) {
    22  	resp := &AttachDisksResponse{}
    23  	err := client.Request("cbs", "AttachDisks", "2017-03-12").Do(req, resp)
    24  	return resp, err
    25  }
    26  
    27  type AttachDisksResponse struct {
    28  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    29  }