Documentation ¶
Index ¶
- type DiskClient
- func (c *DiskClient) ApplySnapshotPolicies(request *disk.ApplySnapshotPoliciesRequest) (*disk.ApplySnapshotPoliciesResponse, error)
- func (c *DiskClient) CreateDisks(request *disk.CreateDisksRequest) (*disk.CreateDisksResponse, error)
- func (c *DiskClient) CreateSnapshot(request *disk.CreateSnapshotRequest) (*disk.CreateSnapshotResponse, error)
- func (c *DiskClient) CreateSnapshotPolicy(request *disk.CreateSnapshotPolicyRequest) (*disk.CreateSnapshotPolicyResponse, error)
- func (c *DiskClient) DeleteDisk(request *disk.DeleteDiskRequest) (*disk.DeleteDiskResponse, error)
- func (c *DiskClient) DeleteSnapshot(request *disk.DeleteSnapshotRequest) (*disk.DeleteSnapshotResponse, error)
- func (c *DiskClient) DeleteSnapshotPolicy(request *disk.DeleteSnapshotPolicyRequest) (*disk.DeleteSnapshotPolicyResponse, error)
- func (c *DiskClient) DeleteSnapshots(request *disk.DeleteSnapshotsRequest) (*disk.DeleteSnapshotsResponse, error)
- func (c *DiskClient) DescribeDisk(request *disk.DescribeDiskRequest) (*disk.DescribeDiskResponse, error)
- func (c *DiskClient) DescribeDisks(request *disk.DescribeDisksRequest) (*disk.DescribeDisksResponse, error)
- func (c *DiskClient) DescribeQuota(request *disk.DescribeQuotaRequest) (*disk.DescribeQuotaResponse, error)
- func (c *DiskClient) DescribeSnapPolices(request *disk.DescribeSnapPolicesRequest) (*disk.DescribeSnapPolicesResponse, error)
- func (c *DiskClient) DescribeSnapshot(request *disk.DescribeSnapshotRequest) (*disk.DescribeSnapshotResponse, error)
- func (c *DiskClient) DescribeSnapshotChain(request *disk.DescribeSnapshotChainRequest) (*disk.DescribeSnapshotChainResponse, error)
- func (c *DiskClient) DescribeSnapshotPolicies(request *disk.DescribeSnapshotPoliciesRequest) (*disk.DescribeSnapshotPoliciesResponse, error)
- func (c *DiskClient) DescribeSnapshotPolicyDiskRelations(request *disk.DescribeSnapshotPolicyDiskRelationsRequest) (*disk.DescribeSnapshotPolicyDiskRelationsResponse, error)
- func (c *DiskClient) DescribeSnapshots(request *disk.DescribeSnapshotsRequest) (*disk.DescribeSnapshotsResponse, error)
- func (c *DiskClient) DescribeSnapshotsCapacity(request *disk.DescribeSnapshotsCapacityRequest) (*disk.DescribeSnapshotsCapacityResponse, error)
- func (c *DiskClient) DescribeVolumesIgnoreServiceCode(request *disk.DescribeVolumesIgnoreServiceCodeRequest) (*disk.DescribeVolumesIgnoreServiceCodeResponse, error)
- func (c *DiskClient) DisableLogger()
- func (c *DiskClient) ExtendDisk(request *disk.ExtendDiskRequest) (*disk.ExtendDiskResponse, error)
- func (c *DiskClient) ModifyDiskAttribute(request *disk.ModifyDiskAttributeRequest) (*disk.ModifyDiskAttributeResponse, error)
- func (c *DiskClient) ModifySnapshotAttribute(request *disk.ModifySnapshotAttributeRequest) (*disk.ModifySnapshotAttributeResponse, error)
- func (c *DiskClient) RestoreDisk(request *disk.RestoreDiskRequest) (*disk.RestoreDiskResponse, error)
- func (c *DiskClient) SetConfig(config *core.Config)
- func (c *DiskClient) SetLogger(logger core.Logger)
- func (c *DiskClient) UpdateSnapshotPolicy(request *disk.UpdateSnapshotPolicyRequest) (*disk.UpdateSnapshotPolicyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskClient ¶
type DiskClient struct {
core.JDCloudClient
}
func NewDiskClient ¶
func NewDiskClient(credential *core.Credential) *DiskClient
func (*DiskClient) ApplySnapshotPolicies ¶ added in v1.54.0
func (c *DiskClient) ApplySnapshotPolicies(request *disk.ApplySnapshotPoliciesRequest) (*disk.ApplySnapshotPoliciesResponse, error)
绑定/解绑快照策略与磁盘关系
func (*DiskClient) CreateDisks ¶ added in v1.0.2
func (c *DiskClient) CreateDisks(request *disk.CreateDisksRequest) (*disk.CreateDisksResponse, error)
- 创建一块或多块按配置或者按使用时长付费的云硬盘。
- 云硬盘类型包括高效云盘(premium-hdd)、SSD云盘(ssd)、通用型SSD(ssd.gp1)、性能型SSD(ssd.io1)、容量型HDD(hdd.std1)。 - 计费方式默认为按配置付费。 - 创建完成后,云硬盘状态为 available。 - 可选参数快照 ID用于从快照创建新盘。 - 批量创建时,云硬盘的命名为 硬盘名称-数字,例如 myDisk-1,myDisk-2。 - maxCount为最大努力,不保证一定能达到maxCount。 - userTags 为创建云盘时打的标签
func (*DiskClient) CreateSnapshot ¶
func (c *DiskClient) CreateSnapshot(request *disk.CreateSnapshotRequest) (*disk.CreateSnapshotResponse, error)
- 为指定云硬盘创建快照,新生成的快照的状态为creating。
- 同一地域下单用户快照的配额为15块。 - 为保证数据完整性,请您在创建快照之前,停止对云硬盘进行写入操作,以保证快照数据的完整性。 - 在执行创建快照前,建议您对云硬盘进行卸载操作,创建快照后再重新挂载到云主机上。 - 手动快照的生命周期独立于云硬盘,请您及时删除不需要的快照。 - 创建快照所需时间取决于云硬盘容量的大小,云硬盘容量越大耗时越长。
func (*DiskClient) CreateSnapshotPolicy ¶ added in v1.54.0
func (c *DiskClient) CreateSnapshotPolicy(request *disk.CreateSnapshotPolicyRequest) (*disk.CreateSnapshotPolicyResponse, error)
创建快照策略
func (*DiskClient) DeleteDisk ¶ added in v1.0.2
func (c *DiskClient) DeleteDisk(request *disk.DeleteDiskRequest) (*disk.DeleteDiskResponse, error)
- 删除一块按配置计费的云硬盘,云盘类型包括高效云盘、SSD云盘、通用型SSD、性能型SSD和容量型HDD。
- 删除云盘时,云盘的状态必须为 待挂载(Available)。 - 云盘被删除后,云硬盘快照可以被保留。
func (*DiskClient) DeleteSnapshot ¶
func (c *DiskClient) DeleteSnapshot(request *disk.DeleteSnapshotRequest) (*disk.DeleteSnapshotResponse, error)
- 删除单个云硬盘快照:快照状态必须为 available 或 error 状态。
- 快照独立于云硬盘生命周期,删除快照不会对创建快照的云硬盘有任何影响。 - 快照删除后不可恢复,请谨慎操作。
func (*DiskClient) DeleteSnapshotPolicy ¶ added in v1.54.0
func (c *DiskClient) DeleteSnapshotPolicy(request *disk.DeleteSnapshotPolicyRequest) (*disk.DeleteSnapshotPolicyResponse, error)
删除快照策略
func (*DiskClient) DeleteSnapshots ¶ added in v1.19.0
func (c *DiskClient) DeleteSnapshots(request *disk.DeleteSnapshotsRequest) (*disk.DeleteSnapshotsResponse, error)
- 删除云硬盘快照:快照状态必须为 available 或 error 状态。
- 快照独立于云硬盘生命周期,删除快照不会对创建快照的云硬盘有任何影响。 - 快照删除后不可恢复,请谨慎操作。
func (*DiskClient) DescribeDisk ¶
func (c *DiskClient) DescribeDisk(request *disk.DescribeDiskRequest) (*disk.DescribeDiskResponse, error)
查询某一块云硬盘的信息详情
func (*DiskClient) DescribeDisks ¶
func (c *DiskClient) DescribeDisks(request *disk.DescribeDisksRequest) (*disk.DescribeDisksResponse, error)
- 查询您已经创建的云硬盘。
- filters多个过滤条件之间是逻辑与(AND),每个条件内部的多个取值是逻辑或(OR)
func (*DiskClient) DescribeQuota ¶ added in v1.54.0
func (c *DiskClient) DescribeQuota(request *disk.DescribeQuotaRequest) (*disk.DescribeQuotaResponse, error)
查询云硬盘和快照资源的配额
func (*DiskClient) DescribeSnapPolices ¶ added in v1.54.0
func (c *DiskClient) DescribeSnapPolices(request *disk.DescribeSnapPolicesRequest) (*disk.DescribeSnapPolicesResponse, error)
查询快照策略
func (*DiskClient) DescribeSnapshot ¶
func (c *DiskClient) DescribeSnapshot(request *disk.DescribeSnapshotRequest) (*disk.DescribeSnapshotResponse, error)
查询云硬盘快照信息详情
func (*DiskClient) DescribeSnapshotChain ¶ added in v1.54.0
func (c *DiskClient) DescribeSnapshotChain(request *disk.DescribeSnapshotChainRequest) (*disk.DescribeSnapshotChainResponse, error)
查询快照链的快照个数和快照总容量
func (*DiskClient) DescribeSnapshotPolicies ¶ added in v1.54.0
func (c *DiskClient) DescribeSnapshotPolicies(request *disk.DescribeSnapshotPoliciesRequest) (*disk.DescribeSnapshotPoliciesResponse, error)
查询快照策略
func (*DiskClient) DescribeSnapshotPolicyDiskRelations ¶ added in v1.54.0
func (c *DiskClient) DescribeSnapshotPolicyDiskRelations(request *disk.DescribeSnapshotPolicyDiskRelationsRequest) (*disk.DescribeSnapshotPolicyDiskRelationsResponse, error)
查询快照策略与磁盘绑定关系
func (*DiskClient) DescribeSnapshots ¶
func (c *DiskClient) DescribeSnapshots(request *disk.DescribeSnapshotsRequest) (*disk.DescribeSnapshotsResponse, error)
查询云硬盘快照列表,filters多个过滤条件之间是逻辑与(AND),每个条件内部的多个取值是逻辑或(OR)
func (*DiskClient) DescribeSnapshotsCapacity ¶ added in v1.54.0
func (c *DiskClient) DescribeSnapshotsCapacity(request *disk.DescribeSnapshotsCapacityRequest) (*disk.DescribeSnapshotsCapacityResponse, error)
查询快照容量
func (*DiskClient) DescribeVolumesIgnoreServiceCode ¶ added in v1.54.0
func (c *DiskClient) DescribeVolumesIgnoreServiceCode(request *disk.DescribeVolumesIgnoreServiceCodeRequest) (*disk.DescribeVolumesIgnoreServiceCodeResponse, error)
- 查询您已经创建的云硬盘。
- filters多个过滤条件之间是逻辑与(AND),每个条件内部的多个取值是逻辑或(OR)
func (*DiskClient) DisableLogger ¶ added in v1.13.0
func (c *DiskClient) DisableLogger()
func (*DiskClient) ExtendDisk ¶ added in v1.0.2
func (c *DiskClient) ExtendDisk(request *disk.ExtendDiskRequest) (*disk.ExtendDiskResponse, error)
- 扩容云硬盘到指定大小,云硬盘状态必须为 available。
- 当云硬盘正在创建快照时,不允许扩容。
func (*DiskClient) ModifyDiskAttribute ¶
func (c *DiskClient) ModifyDiskAttribute(request *disk.ModifyDiskAttributeRequest) (*disk.ModifyDiskAttributeResponse, error)
修改云硬盘的名字或描述信息,名字或描述信息至少要指定一个。
func (*DiskClient) ModifySnapshotAttribute ¶ added in v1.4.0
func (c *DiskClient) ModifySnapshotAttribute(request *disk.ModifySnapshotAttributeRequest) (*disk.ModifySnapshotAttributeResponse, error)
修改快照的名字或描述信息
func (*DiskClient) RestoreDisk ¶
func (c *DiskClient) RestoreDisk(request *disk.RestoreDiskRequest) (*disk.RestoreDiskResponse, error)
- 仅可对制作快照的源硬盘进行数据恢复操作。
- 仅源硬盘处于可用状态时才能使用快照进行数据恢复操作。 - 云硬盘恢复后,当前数据将被清除,请您谨慎操作。
func (*DiskClient) SetConfig ¶
func (c *DiskClient) SetConfig(config *core.Config)
func (*DiskClient) SetLogger ¶
func (c *DiskClient) SetLogger(logger core.Logger)
func (*DiskClient) UpdateSnapshotPolicy ¶ added in v1.54.0
func (c *DiskClient) UpdateSnapshotPolicy(request *disk.UpdateSnapshotPolicyRequest) (*disk.UpdateSnapshotPolicyResponse, error)
修改快照策略