VMware {code} Community
Ebright1
Contributor
Contributor

How do I update a VDC Storage profile using vCloud .NET SDK


Hi,


Can someone please describe how can easily update the storage limit of an existing Storage Policy in a VDC?     I'm using the vCloud .NET SDK.   Thank you.

0 Kudos
1 Reply
Ebright1
Contributor
Contributor

I've tried this code, but it doesn't work. Maybe someone can throw more light to it.

                    List<ReferenceType> providerVdcStorageProfileRef = adminVdc.GetAdminVdcStorageProfileRefs();
                    AdminVdcStorageProfile avsp = AdminVdcStorageProfile.GetAdminVdcStorageProfileByReference(_client, providerVdcStorageProfileRef[0]);
                    AdminVdcStorageProfileType storage = new AdminVdcStorageProfileType();
                    storage.Limit = 1024;
                    storage.Default = true;
                    storage.Units = "MB";
                    storage.Enabled = true;
                    storage.EnabledSpecified = true;
                    storage.name = "NFS02";
                    avsp.UpdateAdminVdcStorageProfile(storage);
0 Kudos