Skip to content

Commit ef0162b

Browse files
authored
doc(instance): change documentation about the backup action and the migration of b_ssd resources (scaleway#2319)
1 parent 3737ff8 commit ef0162b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

api/instance/v1/instance_sdk.go

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,15 +2076,15 @@ type ApplyBlockMigrationRequest struct {
20762076
// Zone: zone to target. If none is passed will use default zone from the config.
20772077
Zone scw.Zone `json:"-"`
20782078

2079-
// VolumeID: the volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
2079+
// VolumeID: the volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
20802080
// Precisely one of VolumeID, SnapshotID must be set.
20812081
VolumeID *string `json:"volume_id,omitempty"`
20822082

2083-
// SnapshotID: the snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the "Plan a migration" endpoint.
2083+
// SnapshotID: the snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint.
20842084
// Precisely one of VolumeID, SnapshotID must be set.
20852085
SnapshotID *string `json:"snapshot_id,omitempty"`
20862086

2087-
// ValidationKey: a value to be retrieved from a call to the "Plan a migration" endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
2087+
// ValidationKey: a value to be retrieved from a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated.
20882088
ValidationKey string `json:"validation_key,omitempty"`
20892089
}
20902090

@@ -3420,7 +3420,7 @@ type MigrationPlan struct {
34203420
// Snapshots: a list of snapshots which will be migrated to SBS together and with the volume, if present.
34213421
Snapshots []*Snapshot `json:"snapshots"`
34223422

3423-
// ValidationKey: a value to be passed to the call to the "Apply a migration plan" endpoint, to confirm that the execution of the plan is being requested.
3423+
// ValidationKey: a value to be passed to the call to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint, to confirm that the execution of the plan is being requested.
34243424
ValidationKey string `json:"validation_key"`
34253425
}
34263426

@@ -4500,8 +4500,12 @@ func (s *API) ListServerActions(req *ListServerActionsRequest, opts ...scw.Reque
45004500
// * `terminate`: Delete the Instance along with its attached volumes, except for SBS volumes.
45014501
// * `enable_routed_ip`: Migrate the Instance to the new network stack.
45024502
//
4503-
// Keep in mind that `terminate` an Instance will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
4503+
// The `terminate` action will result in the deletion of `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type will only be detached.
45044504
// If you want to preserve your volumes, you should detach them before the Instance deletion or `terminate` action.
4505+
//
4506+
// The `backup` action can be done with:
4507+
// * No `volumes` key in the body: an image is created with snapshots of all the server volumes, except for the `scratch` volumes types.
4508+
// * `volumes` key in the body with a dictionary as value, in this dictionary volumes UUID as keys and empty dictionaries as values : an image is created with the snapshots of the volumes in `volumes` key. `scratch` volumes types can't be shapshotted.
45054509
func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error) {
45064510
var err error
45074511

@@ -6572,7 +6576,11 @@ func (s *API) GetDashboard(req *GetDashboardRequest, opts ...scw.RequestOption)
65726576
return &resp, nil
65736577
}
65746578

6575-
// PlanBlockMigration: Given a volume or snapshot, returns the migration plan for a call to the "Apply a migration plan" endpoint. This plan will include zero or one volume, and zero or more snapshots, which will need to be migrated together. This endpoint does not perform the actual migration itself, the "Apply a migration plan" endpoint must be used. The validation_key value returned by this endpoint must be provided to the call to the "Apply a migration plan" endpoint to confirm that all resources listed in the plan should be migrated.
6579+
// PlanBlockMigration: Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint afterward.
6580+
// The endpoint returns the resources that should be migrated together:
6581+
// - the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
6582+
// - the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration.
6583+
// The endpoint also returns the validation_key, which must be provided to the [Migrate a volume and/or snapshots to SBS](#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) endpoint to confirm that all resources listed in the plan should be migrated.
65766584
func (s *API) PlanBlockMigration(req *PlanBlockMigrationRequest, opts ...scw.RequestOption) (*MigrationPlan, error) {
65776585
var err error
65786586

@@ -6604,7 +6612,7 @@ func (s *API) PlanBlockMigration(req *PlanBlockMigrationRequest, opts ...scw.Req
66046612
return &resp, nil
66056613
}
66066614

6607-
// ApplyBlockMigration: To be used, the call to this endpoint must be preceded by a call to the "Plan a migration" endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
6615+
// ApplyBlockMigration: To be used, the call to this endpoint must be preceded by a call to the [Get a volume or snapshot's migration plan](#path-volumes-get-a-volume-or-snapshots-migration-plan) endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
66086616
func (s *API) ApplyBlockMigration(req *ApplyBlockMigrationRequest, opts ...scw.RequestOption) error {
66096617
var err error
66106618

0 commit comments

Comments
 (0)