Documentation
¶
Overview ¶
Package usnap include resources of ucloud usnap product
See also
- API: https://docs.ucloud.cn/api/usnap-api/index
- Product: https://www.ucloud.cn/site/product/usnap.html
for detail.
Index ¶
- type BackupRange
- type CreateSnapshotServiceRequest
- type CreateSnapshotServiceResponse
- type CreateUSnapGroupRequest
- type CreateUSnapGroupResponse
- type DeleteSnapshotServiceRequest
- type DeleteSnapshotServiceResponse
- type DeleteUSnapGroupRequest
- type DeleteUSnapGroupResponse
- type DescribeSnapshotServicePriceRequest
- type DescribeSnapshotServicePriceResponse
- type DescribeSnapshotServiceRequest
- type DescribeSnapshotServiceResponse
- type DescribeSnapshotServiceUpgradePriceRequest
- type DescribeSnapshotServiceUpgradePriceResponse
- type DescribeUSnapBackupRangeRequest
- type DescribeUSnapBackupRangeResponse
- type DescribeUSnapGroupListRequest
- type DescribeUSnapGroupListResponse
- type DescribeUSnapGroupRequest
- type DescribeUSnapGroupResponse
- type SnapGroupInfo
- type SnapInfo
- type SnapshotServiceDataSet
- type SnapshotServicePriceDataSet
- type USnapClient
- func (c *USnapClient) CreateSnapshotService(req *CreateSnapshotServiceRequest) (*CreateSnapshotServiceResponse, error)
- func (c *USnapClient) CreateUSnapGroup(req *CreateUSnapGroupRequest) (*CreateUSnapGroupResponse, error)
- func (c *USnapClient) DeleteSnapshotService(req *DeleteSnapshotServiceRequest) (*DeleteSnapshotServiceResponse, error)
- func (c *USnapClient) DeleteUSnapGroup(req *DeleteUSnapGroupRequest) (*DeleteUSnapGroupResponse, error)
- func (c *USnapClient) DescribeSnapshotService(req *DescribeSnapshotServiceRequest) (*DescribeSnapshotServiceResponse, error)
- func (c *USnapClient) DescribeSnapshotServicePrice(req *DescribeSnapshotServicePriceRequest) (*DescribeSnapshotServicePriceResponse, error)
- func (c *USnapClient) DescribeSnapshotServiceUpgradePrice(req *DescribeSnapshotServiceUpgradePriceRequest) (*DescribeSnapshotServiceUpgradePriceResponse, error)
- func (c *USnapClient) DescribeUSnapBackupRange(req *DescribeUSnapBackupRangeRequest) (*DescribeUSnapBackupRangeResponse, error)
- func (c *USnapClient) DescribeUSnapGroup(req *DescribeUSnapGroupRequest) (*DescribeUSnapGroupResponse, error)
- func (c *USnapClient) DescribeUSnapGroupList(req *DescribeUSnapGroupListRequest) (*DescribeUSnapGroupListResponse, error)
- func (c *USnapClient) NewCreateSnapshotServiceRequest() *CreateSnapshotServiceRequest
- func (c *USnapClient) NewCreateUSnapGroupRequest() *CreateUSnapGroupRequest
- func (c *USnapClient) NewDeleteSnapshotServiceRequest() *DeleteSnapshotServiceRequest
- func (c *USnapClient) NewDeleteUSnapGroupRequest() *DeleteUSnapGroupRequest
- func (c *USnapClient) NewDescribeSnapshotServicePriceRequest() *DescribeSnapshotServicePriceRequest
- func (c *USnapClient) NewDescribeSnapshotServiceRequest() *DescribeSnapshotServiceRequest
- func (c *USnapClient) NewDescribeSnapshotServiceUpgradePriceRequest() *DescribeSnapshotServiceUpgradePriceRequest
- func (c *USnapClient) NewDescribeUSnapBackupRangeRequest() *DescribeUSnapBackupRangeRequest
- func (c *USnapClient) NewDescribeUSnapGroupListRequest() *DescribeUSnapGroupListRequest
- func (c *USnapClient) NewDescribeUSnapGroupRequest() *DescribeUSnapGroupRequest
- func (c *USnapClient) NewUpgradeUSnapBackupRangeRequest() *UpgradeUSnapBackupRangeRequest
- func (c *USnapClient) UpgradeUSnapBackupRange(req *UpgradeUSnapBackupRangeRequest) (*UpgradeUSnapBackupRangeResponse, error)
- type UpgradeUSnapBackupRangeRequest
- type UpgradeUSnapBackupRangeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupRange ¶
BackupRange - 备份链范围展示
type CreateSnapshotServiceRequest ¶
type CreateSnapshotServiceRequest struct {
request.CommonBase
// 默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
BackupMode *string `required:"false"`
// Year , Month, Dynamic 默认: Month
ChargeType *string `required:"false"`
// 代金券ID
CouponId *string `required:"false"`
// BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
Day *int `required:"false"`
// BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
Hour *int `required:"false"`
// BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
Journal *int `required:"false"`
// 购买时长 默认: 1
Quantity *int `required:"false"`
// 业务组 默认:Default
Tag *string `required:"false"`
// 磁盘ID
VDiskId *string `required:"true"`
}
CreateSnapshotServiceRequest is request schema for CreateSnapshotService action
type CreateSnapshotServiceResponse ¶
type CreateSnapshotServiceResponse struct {
response.CommonBase
// 快照服务ID
SnapshotServiceId string
// 快照服务状态,状态:Available(可用),InAvailable(不可用),Expired(欠费)
Status string
}
CreateSnapshotServiceResponse is response schema for CreateSnapshotService action
type CreateUSnapGroupRequest ¶
type CreateUSnapGroupRequest struct {
request.CommonBase
// 一致性组快照名称
Name *string `required:"true"`
// 需要创建一致性组快照的磁盘ID列表
VDiskIds *string `required:"true"`
}
CreateUSnapGroupRequest is request schema for CreateUSnapGroup action
type CreateUSnapGroupResponse ¶
type CreateUSnapGroupResponse struct {
response.CommonBase
// 创建快照失败数量
FailCount int
// 创建快照失败磁盘列表
FailList []string
// 一致性组ID
GroupId string
}
CreateUSnapGroupResponse is response schema for CreateUSnapGroup action
type DeleteSnapshotServiceRequest ¶
type DeleteSnapshotServiceRequest struct {
request.CommonBase
// 磁盘ID
VDiskId *string `required:"true"`
}
DeleteSnapshotServiceRequest is request schema for DeleteSnapshotService action
type DeleteSnapshotServiceResponse ¶
type DeleteSnapshotServiceResponse struct {
response.CommonBase
}
DeleteSnapshotServiceResponse is response schema for DeleteSnapshotService action
type DeleteUSnapGroupRequest ¶
type DeleteUSnapGroupRequest struct {
request.CommonBase
// 一致性组ID
GroupId *string `required:"true"`
}
DeleteUSnapGroupRequest is request schema for DeleteUSnapGroup action
type DeleteUSnapGroupResponse ¶
type DeleteUSnapGroupResponse struct {
response.CommonBase
}
DeleteUSnapGroupResponse is response schema for DeleteUSnapGroup action
type DescribeSnapshotServicePriceRequest ¶
type DescribeSnapshotServicePriceRequest struct {
request.CommonBase
// 默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
BackupMode *string `required:"false"`
// Year , Month, Dynamic 默认: Month
ChargeType *string `required:"false"`
// BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
Day *int `required:"false"`
// BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
Hour *int `required:"false"`
// BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
Journal *int `required:"false"`
// 购买服务时长,默认值是1
Quantity *int `required:"false"`
// 磁盘大小
Size *int `required:"true"`
}
DescribeSnapshotServicePriceRequest is request schema for DescribeSnapshotServicePrice action
type DescribeSnapshotServicePriceResponse ¶
type DescribeSnapshotServicePriceResponse struct {
response.CommonBase
// 价格参数列表,具体说明见SnapshotServicePriceDataSet
DataSet SnapshotServicePriceDataSet
}
DescribeSnapshotServicePriceResponse is response schema for DescribeSnapshotServicePrice action
type DescribeSnapshotServiceRequest ¶
type DescribeSnapshotServiceRequest struct {
request.CommonBase
// 返回数据长度, 默认为20
Limit *int `required:"false"`
// 数据偏移量, 默认为0
Offset *int `required:"false"`
// 快照ID (传入则获取当前快照对应盘的快照服务, 不传则获取当前可用区快照服务列表,磁盘ID和快照ID同时传入以磁盘ID为准)
SnapshotId *string `required:"false"`
// 快照服务ID(传入则获取当前快照服务ID, 不传则获取当前可用区快照服务列表)
SnapshotServiceId *string `required:"false"`
// 磁盘ID (传入则获取当前盘快照服务, 不传则获取当前可用区快照服务列表)
VDiskId *string `required:"false"`
}
DescribeSnapshotServiceRequest is request schema for DescribeSnapshotService action
type DescribeSnapshotServiceResponse ¶
type DescribeSnapshotServiceResponse struct {
response.CommonBase
// 快照服务列表
DataSet []SnapshotServiceDataSet
// 快照服务DataSet总数
TotalCount int
}
DescribeSnapshotServiceResponse is response schema for DescribeSnapshotService action
type DescribeSnapshotServiceUpgradePriceRequest ¶
type DescribeSnapshotServiceUpgradePriceRequest struct {
request.CommonBase
// 磁盘大小
Size *int `required:"true"`
// 升降级快照服务, 升级"Yes",降级"No", 默认为No
SnapshotsvcMode *string `required:"false"`
// 磁盘ID
VDiskId *string `required:"true"`
}
DescribeSnapshotServiceUpgradePriceRequest is request schema for DescribeSnapshotServiceUpgradePrice action
type DescribeSnapshotServiceUpgradePriceResponse ¶
type DescribeSnapshotServiceUpgradePriceResponse struct {
response.CommonBase
// 折扣后价格
OriginalPrice int
// 价格
Price int
}
DescribeSnapshotServiceUpgradePriceResponse is response schema for DescribeSnapshotServiceUpgradePrice action
type DescribeUSnapBackupRangeRequest ¶
type DescribeUSnapBackupRangeRequest struct {
request.CommonBase
// 磁盘ID
VDiskId *string `required:"true"`
}
DescribeUSnapBackupRangeRequest is request schema for DescribeUSnapBackupRange action
type DescribeUSnapBackupRangeResponse ¶
type DescribeUSnapBackupRangeResponse struct {
response.CommonBase
// “ Primer”:入门版,“Base”:基础版,“ Enterprise”:企业版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
BackupMode string
// 详见BackupRange模型
BackupRange BackupRange
}
DescribeUSnapBackupRangeResponse is response schema for DescribeUSnapBackupRange action
type DescribeUSnapGroupListRequest ¶
type DescribeUSnapGroupListRequest struct {
request.CommonBase
// 一致性组快照ID,不填默认拉全量列表
GroupId *string `required:"false"`
}
DescribeUSnapGroupListRequest is request schema for DescribeUSnapGroupList action
type DescribeUSnapGroupListResponse ¶
type DescribeUSnapGroupListResponse struct {
response.CommonBase
// 一致性组快照列表信息
GroupList []SnapGroupInfo
// 一致性组数量
TotalCount int
}
DescribeUSnapGroupListResponse is response schema for DescribeUSnapGroupList action
type DescribeUSnapGroupRequest ¶
type DescribeUSnapGroupRequest struct {
request.CommonBase
// 一致性组快照ID
GroupId *string `required:"true"`
}
DescribeUSnapGroupRequest is request schema for DescribeUSnapGroup action
type DescribeUSnapGroupResponse ¶
type DescribeUSnapGroupResponse struct {
response.CommonBase
// 快照列表信息
SnapshotList []SnapInfo
}
DescribeUSnapGroupResponse is response schema for DescribeUSnapGroup action
type SnapGroupInfo ¶
type SnapGroupInfo struct {
// 创建时间
CreateTime int
// 数据盘快照数量
DataCount int
// 一致性组快照ID
GroupId string
// 一致性组快照名
Name string
// 状态:创建中Creating 完成Normal 失败Failed
Status string
// 系统盘快照数量
SysCount int
}
SnapGroupInfo -
type SnapInfo ¶
type SnapInfo struct {
// 快照大小GB
Size int
// 快照ID
SnapshotId string
// 快照状态: 制作中Creating 完成 Normal 失败Failed
Status string
// 磁盘类型:系统盘 Boot 数据盘 Data
VDiskType string
// 磁盘ID
VdiskId string
}
SnapInfo -
type SnapshotServiceDataSet ¶
type SnapshotServiceDataSet struct {
// 是否自动续费
AutoRenew string
// 计费类型
ChargeType string
// 创建时间
CreateTime int
// 过期时间
ExpiredTime int
// 计费是否过期
IsExpire string
// 服务ID
ServiceId string
// 状态:Available(可用),InAvailable(不可用),Expired(欠费)
Status string
// 业务组
Tag string
// 磁盘Id
VDiskId string
// 磁盘名
VDiskName string
// 磁盘大小 (G)
VDiskSize int
// 磁盘是否可用,1表示可用,0表示不可用
VDiskStatus int
// "UDiskData" 云盘数据盘; ”UDiskBoot“ 云盘系统盘
VDiskType string
// 可用区信息
Zone string
}
SnapshotServiceDataSet -
type SnapshotServicePriceDataSet ¶
type SnapshotServicePriceDataSet struct {
// Year, Month, Dynamic
ChargeType string
// 原价(对应计费OriginalPrice)
ListPrice int
// 用户折后价(对应计费CustomPrice)
OriginalPrice int
// 实际价格 (单位: 分)
Price int
}
SnapshotServicePriceDataSet -
type USnapClient ¶
USnapClient is the client of USnap
func NewClient ¶
func NewClient(config *ucloud.Config, credential *auth.Credential) *USnapClient
NewClient will return a instance of USnapClient
func (*USnapClient) CreateSnapshotService ¶
func (c *USnapClient) CreateSnapshotService(req *CreateSnapshotServiceRequest) (*CreateSnapshotServiceResponse, error)
API: CreateSnapshotService
创建磁盘快照服务
func (*USnapClient) CreateUSnapGroup ¶
func (c *USnapClient) CreateUSnapGroup(req *CreateUSnapGroupRequest) (*CreateUSnapGroupResponse, error)
API: CreateUSnapGroup
创建快照一致性组
func (*USnapClient) DeleteSnapshotService ¶
func (c *USnapClient) DeleteSnapshotService(req *DeleteSnapshotServiceRequest) (*DeleteSnapshotServiceResponse, error)
API: DeleteSnapshotService
删除磁盘快照服务
func (*USnapClient) DeleteUSnapGroup ¶
func (c *USnapClient) DeleteUSnapGroup(req *DeleteUSnapGroupRequest) (*DeleteUSnapGroupResponse, error)
API: DeleteUSnapGroup
删除快照一致性组
func (*USnapClient) DescribeSnapshotService ¶
func (c *USnapClient) DescribeSnapshotService(req *DescribeSnapshotServiceRequest) (*DescribeSnapshotServiceResponse, error)
API: DescribeSnapshotService
获取磁盘快照服务列表
func (*USnapClient) DescribeSnapshotServicePrice ¶
func (c *USnapClient) DescribeSnapshotServicePrice(req *DescribeSnapshotServicePriceRequest) (*DescribeSnapshotServicePriceResponse, error)
API: DescribeSnapshotServicePrice
获取磁盘快照服务实例价格信息
func (*USnapClient) DescribeSnapshotServiceUpgradePrice ¶
func (c *USnapClient) DescribeSnapshotServiceUpgradePrice(req *DescribeSnapshotServiceUpgradePriceRequest) (*DescribeSnapshotServiceUpgradePriceResponse, error)
API: DescribeSnapshotServiceUpgradePrice
获取快照服务升降级价格
func (*USnapClient) DescribeUSnapBackupRange ¶
func (c *USnapClient) DescribeUSnapBackupRange(req *DescribeUSnapBackupRangeRequest) (*DescribeUSnapBackupRangeResponse, error)
API: DescribeUSnapBackupRange
查询备份链范围
func (*USnapClient) DescribeUSnapGroup ¶
func (c *USnapClient) DescribeUSnapGroup(req *DescribeUSnapGroupRequest) (*DescribeUSnapGroupResponse, error)
API: DescribeUSnapGroup
查询快照一致性组详情信息
func (*USnapClient) DescribeUSnapGroupList ¶
func (c *USnapClient) DescribeUSnapGroupList(req *DescribeUSnapGroupListRequest) (*DescribeUSnapGroupListResponse, error)
API: DescribeUSnapGroupList
查询快照一致性组
func (*USnapClient) NewCreateSnapshotServiceRequest ¶
func (c *USnapClient) NewCreateSnapshotServiceRequest() *CreateSnapshotServiceRequest
NewCreateSnapshotServiceRequest will create request of CreateSnapshotService action.
func (*USnapClient) NewCreateUSnapGroupRequest ¶
func (c *USnapClient) NewCreateUSnapGroupRequest() *CreateUSnapGroupRequest
NewCreateUSnapGroupRequest will create request of CreateUSnapGroup action.
func (*USnapClient) NewDeleteSnapshotServiceRequest ¶
func (c *USnapClient) NewDeleteSnapshotServiceRequest() *DeleteSnapshotServiceRequest
NewDeleteSnapshotServiceRequest will create request of DeleteSnapshotService action.
func (*USnapClient) NewDeleteUSnapGroupRequest ¶
func (c *USnapClient) NewDeleteUSnapGroupRequest() *DeleteUSnapGroupRequest
NewDeleteUSnapGroupRequest will create request of DeleteUSnapGroup action.
func (*USnapClient) NewDescribeSnapshotServicePriceRequest ¶
func (c *USnapClient) NewDescribeSnapshotServicePriceRequest() *DescribeSnapshotServicePriceRequest
NewDescribeSnapshotServicePriceRequest will create request of DescribeSnapshotServicePrice action.
func (*USnapClient) NewDescribeSnapshotServiceRequest ¶
func (c *USnapClient) NewDescribeSnapshotServiceRequest() *DescribeSnapshotServiceRequest
NewDescribeSnapshotServiceRequest will create request of DescribeSnapshotService action.
func (*USnapClient) NewDescribeSnapshotServiceUpgradePriceRequest ¶
func (c *USnapClient) NewDescribeSnapshotServiceUpgradePriceRequest() *DescribeSnapshotServiceUpgradePriceRequest
NewDescribeSnapshotServiceUpgradePriceRequest will create request of DescribeSnapshotServiceUpgradePrice action.
func (*USnapClient) NewDescribeUSnapBackupRangeRequest ¶
func (c *USnapClient) NewDescribeUSnapBackupRangeRequest() *DescribeUSnapBackupRangeRequest
NewDescribeUSnapBackupRangeRequest will create request of DescribeUSnapBackupRange action.
func (*USnapClient) NewDescribeUSnapGroupListRequest ¶
func (c *USnapClient) NewDescribeUSnapGroupListRequest() *DescribeUSnapGroupListRequest
NewDescribeUSnapGroupListRequest will create request of DescribeUSnapGroupList action.
func (*USnapClient) NewDescribeUSnapGroupRequest ¶
func (c *USnapClient) NewDescribeUSnapGroupRequest() *DescribeUSnapGroupRequest
NewDescribeUSnapGroupRequest will create request of DescribeUSnapGroup action.
func (*USnapClient) NewUpgradeUSnapBackupRangeRequest ¶
func (c *USnapClient) NewUpgradeUSnapBackupRangeRequest() *UpgradeUSnapBackupRangeRequest
NewUpgradeUSnapBackupRangeRequest will create request of UpgradeUSnapBackupRange action.
func (*USnapClient) UpgradeUSnapBackupRange ¶
func (c *USnapClient) UpgradeUSnapBackupRange(req *UpgradeUSnapBackupRangeRequest) (*UpgradeUSnapBackupRangeResponse, error)
API: UpgradeUSnapBackupRange
调整备份链范围
type UpgradeUSnapBackupRangeRequest ¶
type UpgradeUSnapBackupRangeRequest struct {
request.CommonBase
// 默认采用入门级套餐开通,“ Primer”:入门版,“Base”:基础版,“ Enterprise”:企业版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
BackupMode *int `required:"true"`
// BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
Day *int `required:"false"`
// BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
Hour *int `required:"false"`
// BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
Journal *int `required:"false"`
// 磁盘大小
Size *int `required:"true"`
// 快照服务ID
SnapshotSvcId *string `required:"false"`
// 磁盘ID
VDiskId *string `required:"true"`
}
UpgradeUSnapBackupRangeRequest is request schema for UpgradeUSnapBackupRange action
type UpgradeUSnapBackupRangeResponse ¶
type UpgradeUSnapBackupRangeResponse struct {
response.CommonBase
}
UpgradeUSnapBackupRangeResponse is response schema for UpgradeUSnapBackupRange action