diff --git a/vngcloud/services/volume/v2/blockvolume_request.go b/vngcloud/services/volume/v2/blockvolume_request.go index b1eb11f..aeea303 100644 --- a/vngcloud/services/volume/v2/blockvolume_request.go +++ b/vngcloud/services/volume/v2/blockvolume_request.go @@ -141,6 +141,11 @@ func (s *CreateBlockVolumeRequest) WithSize(psize int64) ICreateBlockVolumeReque return s } +func (s *CreateBlockVolumeRequest) WithCreateFrom(pcreateFrom CreateVolumeFrom) ICreateBlockVolumeRequest { + s.CreatedFrom = pcreateFrom + return s +} + func (s *CreateBlockVolumeRequest) WithVolumeType(pvolumeTypeId string) ICreateBlockVolumeRequest { s.VolumeTypeId = pvolumeTypeId return s diff --git a/vngcloud/services/volume/v2/irequest.go b/vngcloud/services/volume/v2/irequest.go index 316d8a8..d33662e 100644 --- a/vngcloud/services/volume/v2/irequest.go +++ b/vngcloud/services/volume/v2/irequest.go @@ -7,6 +7,7 @@ type ICreateBlockVolumeRequest interface { WithAutoRenew(pval bool) ICreateBlockVolumeRequest WithMultiAttach(pmultiAttach bool) ICreateBlockVolumeRequest WithSize(psize int64) ICreateBlockVolumeRequest + WithCreateFrom(pcreateFrom CreateVolumeFrom) ICreateBlockVolumeRequest WithVolumeType(pvolumeTypeId string) ICreateBlockVolumeRequest WithVolumeRestoreFromSnapshot(psnapshotID, pvolumeTypeID string) ICreateBlockVolumeRequest WithTags(ptags ...string) ICreateBlockVolumeRequest