v16.10.0
This commit is contained in:
aafetisov committed 2026-10-30 16:04:15 +03:00
1 parent bc8c2b40e9
commit 00994516ba
52 files changed
+2287 -98

No files matched your search

@@ -0,0 +1,41 @@
package disks
import (
"context"
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
)
// MigrateV2CleanupRequest struct to clean up source disks after a disks migration
type MigrateV2CleanupRequest struct {
// Migration workflow job ID
// Required: true
WorkflowJobID string `url:"workflow_job_id" json:"workflow_job_id" validate:"required"`
}
// MigrateV2Cleanup cleans up source disks after a disks migration and returns cleanup job ID
func (d Disks) MigrateV2Cleanup(ctx context.Context, req MigrateV2CleanupRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/disks/migrate_v2_cleanup"
res, err := d.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
return "", err
}
var resp string
err = json.Unmarshal(res, &resp)
if err != nil {
return "", err
}
return resp, nil
}