mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
补充aliyuncli delete-snapshot命令
This commit is contained in:
@@ -107,9 +107,13 @@ func (self *SSnapshot) Delete() error {
|
||||
if self.region == nil {
|
||||
return fmt.Errorf("not init region for snapshot %s", self.SnapshotId)
|
||||
}
|
||||
return self.region.DeleteSnapshot(self.SnapshotId)
|
||||
}
|
||||
|
||||
func (self *SRegion) DeleteSnapshot(snapshotId string) error {
|
||||
params := make(map[string]string)
|
||||
params["SnapshotId"] = self.SnapshotId
|
||||
_, err := self.region.ecsRequest("DeleteSnapshot", params)
|
||||
params["SnapshotId"] = snapshotId
|
||||
_, err := self.ecsRequest("DeleteSnapshot", params)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user