This commit is contained in:
asteam
2025-09-27 01:06:15 +03:00
parent 1ccc37a104
commit cf584c8123
1175 changed files with 11022 additions and 1832 deletions

View File

@@ -5,7 +5,8 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/validators"
)
// UpdateRequest struct to update account
@@ -46,6 +47,10 @@ type UpdateRequest struct {
// Required: false
SendAccessEmails bool `url:"sendAccessEmails" json:"sendAccessEmails"`
// Storage policies
// Required: false
StoragePolicies []StoragePolicy `url:"-" json:"storage_policies,omitempty"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
@@ -59,6 +64,10 @@ type UpdateRequest struct {
// Default: false
// Required: false
ClearUniqPools bool `url:"clearUniqPools" json:"clearUniqPools"`
// Default zone ID
// Required: false
DefaultZoneID uint64 `url:"defaultZoneId,omitempty" json:"defaultZoneId,omitempty"`
}
// Update updates an account name and resource types and limits
@@ -70,7 +79,7 @@ func (a Account) Update(ctx context.Context, req UpdateRequest) (bool, error) {
url := "/cloudbroker/account/update"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
res, err := a.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
return false, err
}