github.com/vmware/govmomi@v0.51.0/cns/unreleased_client.go (about) 1 // © Broadcom. All Rights Reserved. 2 // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. 3 // SPDX-License-Identifier: Apache-2.0 4 5 package cns 6 7 import ( 8 "context" 9 10 "github.com/vmware/govmomi/cns/methods" 11 cnstypes "github.com/vmware/govmomi/cns/types" 12 "github.com/vmware/govmomi/object" 13 ) 14 15 // UpdateVolumeCrypto updates container volumes with given crypto specifications. 16 func (c *Client) UpdateVolumeCrypto(ctx context.Context, updateSpecList []cnstypes.CnsVolumeCryptoUpdateSpec) (*object.Task, error) { 17 req := cnstypes.CnsUpdateVolumeCrypto{ 18 This: CnsVolumeManagerInstance, 19 UpdateSpecs: updateSpecList, 20 } 21 res, err := methods.CnsUpdateVolumeCrypto(ctx, c, &req) 22 if err != nil { 23 return nil, err 24 } 25 return object.NewTask(c.vim25Client, res.Returnval), nil 26 }