From c297e8d8a668cd322483de150cebb2c83a5f796a Mon Sep 17 00:00:00 2001 From: olivier dubo Date: Thu, 9 Jul 2026 07:52:15 +0000 Subject: [PATCH] feat(cli): added call apiV2 for cloud storage Signed-off-by: olivier dubo --- doc/ovhcloud_cloud_storage.md | 2 +- doc/ovhcloud_cloud_storage_file.md | 5 +- doc/ovhcloud_cloud_storage_file_network.md | 38 + ...cloud_cloud_storage_file_network_create.md | 49 + ...cloud_cloud_storage_file_network_delete.md | 38 + ...ovhcloud_cloud_storage_file_network_get.md | 38 + ...vhcloud_cloud_storage_file_network_list.md | 45 + doc/ovhcloud_cloud_storage_file_share.md | 15 +- ...vhcloud_cloud_storage_file_share_create.md | 22 +- ...vhcloud_cloud_storage_file_share_delete.md | 3 +- doc/ovhcloud_cloud_storage_file_share_edit.md | 10 +- doc/ovhcloud_cloud_storage_file_share_get.md | 3 +- doc/ovhcloud_cloud_storage_file_share_list.md | 3 +- doc/ovhcloud_cloud_storage_file_snapshot.md | 39 + ...loud_cloud_storage_file_snapshot_create.md | 42 + ...loud_cloud_storage_file_snapshot_delete.md | 38 + ...hcloud_cloud_storage_file_snapshot_edit.md | 41 + ...vhcloud_cloud_storage_file_snapshot_get.md | 38 + ...hcloud_cloud_storage_file_snapshot_list.md | 45 + internal/assets/api-schemas/cloud_v2.json | 4681 ++++++++++++---- internal/assets/api-schemas/domain.json | 477 +- internal/assets/api-schemas/me.json | 4849 ++++++++--------- internal/cmd/cloud_storage_file.go | 225 +- internal/cmd/cloud_storage_file_test.go | 138 + internal/services/cloud/cloud_storage_file.go | 431 +- .../storage-file-network-create.json | 15 + .../storage-file-share-create.json | 27 +- .../storage-file-snapshot-create.json | 9 + .../templates/cloud_storage_file_network.tmpl | 22 + .../templates/cloud_storage_file_share.tmpl | 48 +- .../cloud_storage_file_share_snapshot.tmpl | 16 - .../cloud_storage_file_snapshot.tmpl | 22 + internal/services/cloud/utils.go | 47 + 33 files changed, 7703 insertions(+), 3818 deletions(-) create mode 100644 doc/ovhcloud_cloud_storage_file_network.md create mode 100644 doc/ovhcloud_cloud_storage_file_network_create.md create mode 100644 doc/ovhcloud_cloud_storage_file_network_delete.md create mode 100644 doc/ovhcloud_cloud_storage_file_network_get.md create mode 100644 doc/ovhcloud_cloud_storage_file_network_list.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot_create.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot_delete.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot_edit.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot_get.md create mode 100644 doc/ovhcloud_cloud_storage_file_snapshot_list.md create mode 100644 internal/cmd/cloud_storage_file_test.go create mode 100644 internal/services/cloud/parameter-samples/storage-file-network-create.json create mode 100644 internal/services/cloud/parameter-samples/storage-file-snapshot-create.json create mode 100644 internal/services/cloud/templates/cloud_storage_file_network.tmpl delete mode 100644 internal/services/cloud/templates/cloud_storage_file_share_snapshot.tmpl create mode 100644 internal/services/cloud/templates/cloud_storage_file_snapshot.tmpl diff --git a/doc/ovhcloud_cloud_storage.md b/doc/ovhcloud_cloud_storage.md index 6b050c81..1c3d3f75 100644 --- a/doc/ovhcloud_cloud_storage.md +++ b/doc/ovhcloud_cloud_storage.md @@ -31,7 +31,7 @@ Manage storage services in the given cloud project * [ovhcloud cloud](ovhcloud_cloud.md) - Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, Object Storage...) * [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project -* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage shares in the given cloud project +* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage in the given cloud project * [ovhcloud cloud storage object](ovhcloud_cloud_storage_object.md) - Manage S3™* compatible storage containers in the given cloud project (* S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.) * [ovhcloud cloud storage swift](ovhcloud_cloud_storage_swift.md) - Manage SWIFT storage containers in the given cloud project diff --git a/doc/ovhcloud_cloud_storage_file.md b/doc/ovhcloud_cloud_storage_file.md index eb09e4d4..dca9407b 100644 --- a/doc/ovhcloud_cloud_storage_file.md +++ b/doc/ovhcloud_cloud_storage_file.md @@ -1,13 +1,12 @@ ## ovhcloud cloud storage file -Manage file storage shares in the given cloud project +Manage file storage in the given cloud project ### Options ``` --cloud-project string Cloud project ID -h, --help help for file - --region string Region (skip region discovery if set) ``` ### Options inherited from parent commands @@ -32,5 +31,7 @@ Manage file storage shares in the given cloud project ### SEE ALSO * [ovhcloud cloud storage](ovhcloud_cloud_storage.md) - Manage storage services in the given cloud project +* [ovhcloud cloud storage file network](ovhcloud_cloud_storage_file_network.md) - Manage file storage share networks * [ovhcloud cloud storage file share](ovhcloud_cloud_storage_file_share.md) - Manage file storage shares +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots diff --git a/doc/ovhcloud_cloud_storage_file_network.md b/doc/ovhcloud_cloud_storage_file_network.md new file mode 100644 index 00000000..19b13c2f --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_network.md @@ -0,0 +1,38 @@ +## ovhcloud cloud storage file network + +Manage file storage share networks + +### Options + +``` + -h, --help help for network +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage in the given cloud project +* [ovhcloud cloud storage file network create](ovhcloud_cloud_storage_file_network_create.md) - Create a new file storage share network +* [ovhcloud cloud storage file network delete](ovhcloud_cloud_storage_file_network_delete.md) - Delete the given file storage share network +* [ovhcloud cloud storage file network get](ovhcloud_cloud_storage_file_network_get.md) - Get a specific file storage share network +* [ovhcloud cloud storage file network list](ovhcloud_cloud_storage_file_network_list.md) - List file storage share networks + diff --git a/doc/ovhcloud_cloud_storage_file_network_create.md b/doc/ovhcloud_cloud_storage_file_network_create.md new file mode 100644 index 00000000..123a94ae --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_network_create.md @@ -0,0 +1,49 @@ +## ovhcloud cloud storage file network create + +Create a new file storage share network + +``` +ovhcloud cloud storage file network create [flags] +``` + +### Options + +``` + --availability-zone string Availability zone within the region + --description string Description of the share network + --editor Use a text editor to define parameters + --from-file string File containing parameters + -h, --help help for create + --init-file string Create a file with example parameters + --name string Name of the share network + --network-id string ID of the private network to back the share network + --region string Region where the share network is created + --replace Replace parameters file if it already exists + --subnet-id string ID of the subnet to back the share network + --wait Wait for the share network to be ready before exiting +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file network](ovhcloud_cloud_storage_file_network.md) - Manage file storage share networks + diff --git a/doc/ovhcloud_cloud_storage_file_network_delete.md b/doc/ovhcloud_cloud_storage_file_network_delete.md new file mode 100644 index 00000000..5bb4269c --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_network_delete.md @@ -0,0 +1,38 @@ +## ovhcloud cloud storage file network delete + +Delete the given file storage share network + +``` +ovhcloud cloud storage file network delete [flags] +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file network](ovhcloud_cloud_storage_file_network.md) - Manage file storage share networks + diff --git a/doc/ovhcloud_cloud_storage_file_network_get.md b/doc/ovhcloud_cloud_storage_file_network_get.md new file mode 100644 index 00000000..69363934 --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_network_get.md @@ -0,0 +1,38 @@ +## ovhcloud cloud storage file network get + +Get a specific file storage share network + +``` +ovhcloud cloud storage file network get [flags] +``` + +### Options + +``` + -h, --help help for get +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file network](ovhcloud_cloud_storage_file_network.md) - Manage file storage share networks + diff --git a/doc/ovhcloud_cloud_storage_file_network_list.md b/doc/ovhcloud_cloud_storage_file_network_list.md new file mode 100644 index 00000000..568583b9 --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_network_list.md @@ -0,0 +1,45 @@ +## ovhcloud cloud storage file network list + +List file storage share networks + +``` +ovhcloud cloud storage file network list [flags] +``` + +### Options + +``` + --filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax + Examples: + --filter 'state=="running"' + --filter 'name=~"^my.*"' + --filter 'nested.property.subproperty>10' + --filter 'startDate>="2023-12-01"' + --filter 'name=~"something" && nbField>10' + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file network](ovhcloud_cloud_storage_file_network.md) - Manage file storage share networks + diff --git a/doc/ovhcloud_cloud_storage_file_share.md b/doc/ovhcloud_cloud_storage_file_share.md index aa8cddb9..10fb7d43 100644 --- a/doc/ovhcloud_cloud_storage_file_share.md +++ b/doc/ovhcloud_cloud_storage_file_share.md @@ -26,17 +26,14 @@ Manage file storage shares --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO -* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage shares in the given cloud project -* [ovhcloud cloud storage file share acl](ovhcloud_cloud_storage_file_share_acl.md) - Manage share access control lists -* [ovhcloud cloud storage file share create](ovhcloud_cloud_storage_file_share_create.md) - Create a new share -* [ovhcloud cloud storage file share delete](ovhcloud_cloud_storage_file_share_delete.md) - Delete the given share -* [ovhcloud cloud storage file share edit](ovhcloud_cloud_storage_file_share_edit.md) - Edit the given share -* [ovhcloud cloud storage file share get](ovhcloud_cloud_storage_file_share_get.md) - Get a specific share -* [ovhcloud cloud storage file share list](ovhcloud_cloud_storage_file_share_list.md) - List shares -* [ovhcloud cloud storage file share snapshot](ovhcloud_cloud_storage_file_share_snapshot.md) - Manage share snapshots +* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage in the given cloud project +* [ovhcloud cloud storage file share create](ovhcloud_cloud_storage_file_share_create.md) - Create a new file storage share +* [ovhcloud cloud storage file share delete](ovhcloud_cloud_storage_file_share_delete.md) - Delete the given file storage share +* [ovhcloud cloud storage file share edit](ovhcloud_cloud_storage_file_share_edit.md) - Edit the given file storage share +* [ovhcloud cloud storage file share get](ovhcloud_cloud_storage_file_share_get.md) - Get a specific file storage share +* [ovhcloud cloud storage file share list](ovhcloud_cloud_storage_file_share_list.md) - List file storage shares diff --git a/doc/ovhcloud_cloud_storage_file_share_create.md b/doc/ovhcloud_cloud_storage_file_share_create.md index 4b499dac..30a9a3b2 100644 --- a/doc/ovhcloud_cloud_storage_file_share_create.md +++ b/doc/ovhcloud_cloud_storage_file_share_create.md @@ -1,27 +1,28 @@ ## ovhcloud cloud storage file share create -Create a new share +Create a new file storage share ``` -ovhcloud cloud storage file share create [flags] +ovhcloud cloud storage file share create [flags] ``` ### Options ``` - --availability-zone string Availability zone (required in 3AZ regions) - --description string Share description + --availability-zone string Availability zone within the region + --description string Description of the file storage share --editor Use a text editor to define parameters --from-file string File containing parameters -h, --help help for create --init-file string Create a file with example parameters - --name string Share name - --network-id string Network ID + --name string Name of the file storage share + --protocol string File sharing protocol (NFS) + --region string Region where the share is created --replace Replace parameters file if it already exists - --size int Share size in GB - --snapshot-id string Snapshot ID to create the share from - --subnet-id string Subnet ID - --type string Share type + --share-network-id string ID of the share network to attach the share to + --share-type string File storage type / performance tier (STANDARD_1AZ) + --size int Size of the file storage share in GB + --wait Wait for the share to be ready before exiting ``` ### Options inherited from parent commands @@ -42,7 +43,6 @@ ovhcloud cloud storage file share create [flags] --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO diff --git a/doc/ovhcloud_cloud_storage_file_share_delete.md b/doc/ovhcloud_cloud_storage_file_share_delete.md index 064f73dc..e9faebcd 100644 --- a/doc/ovhcloud_cloud_storage_file_share_delete.md +++ b/doc/ovhcloud_cloud_storage_file_share_delete.md @@ -1,6 +1,6 @@ ## ovhcloud cloud storage file share delete -Delete the given share +Delete the given file storage share ``` ovhcloud cloud storage file share delete [flags] @@ -30,7 +30,6 @@ ovhcloud cloud storage file share delete [flags] --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO diff --git a/doc/ovhcloud_cloud_storage_file_share_edit.md b/doc/ovhcloud_cloud_storage_file_share_edit.md index 085eec56..5c134cdf 100644 --- a/doc/ovhcloud_cloud_storage_file_share_edit.md +++ b/doc/ovhcloud_cloud_storage_file_share_edit.md @@ -1,6 +1,6 @@ ## ovhcloud cloud storage file share edit -Edit the given share +Edit the given file storage share ``` ovhcloud cloud storage file share edit [flags] @@ -9,11 +9,12 @@ ovhcloud cloud storage file share edit [flags] ### Options ``` - --description string Share description + --description string Description of the file storage share --editor Use a text editor to define parameters + --from-file string File containing parameters -h, --help help for edit - --name string Share name - --new-size int New share size in GB + --name string Name of the file storage share + --size int New size of the file storage share in GB ``` ### Options inherited from parent commands @@ -34,7 +35,6 @@ ovhcloud cloud storage file share edit [flags] --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO diff --git a/doc/ovhcloud_cloud_storage_file_share_get.md b/doc/ovhcloud_cloud_storage_file_share_get.md index be1bbf9a..a6429d70 100644 --- a/doc/ovhcloud_cloud_storage_file_share_get.md +++ b/doc/ovhcloud_cloud_storage_file_share_get.md @@ -1,6 +1,6 @@ ## ovhcloud cloud storage file share get -Get a specific share +Get a specific file storage share ``` ovhcloud cloud storage file share get [flags] @@ -30,7 +30,6 @@ ovhcloud cloud storage file share get [flags] --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO diff --git a/doc/ovhcloud_cloud_storage_file_share_list.md b/doc/ovhcloud_cloud_storage_file_share_list.md index 8dad6874..354abcb2 100644 --- a/doc/ovhcloud_cloud_storage_file_share_list.md +++ b/doc/ovhcloud_cloud_storage_file_share_list.md @@ -1,6 +1,6 @@ ## ovhcloud cloud storage file share list -List shares +List file storage shares ``` ovhcloud cloud storage file share list [flags] @@ -37,7 +37,6 @@ ovhcloud cloud storage file share list [flags] --output 'name+","+type' (to extract and concatenate fields in a string) --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) --profile string Use a specific profile from the configuration file - --region string Region (skip region discovery if set) ``` ### SEE ALSO diff --git a/doc/ovhcloud_cloud_storage_file_snapshot.md b/doc/ovhcloud_cloud_storage_file_snapshot.md new file mode 100644 index 00000000..f20f5084 --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot.md @@ -0,0 +1,39 @@ +## ovhcloud cloud storage file snapshot + +Manage file storage snapshots + +### Options + +``` + -h, --help help for snapshot +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage in the given cloud project +* [ovhcloud cloud storage file snapshot create](ovhcloud_cloud_storage_file_snapshot_create.md) - Create a new file storage snapshot +* [ovhcloud cloud storage file snapshot delete](ovhcloud_cloud_storage_file_snapshot_delete.md) - Delete the given file storage snapshot +* [ovhcloud cloud storage file snapshot edit](ovhcloud_cloud_storage_file_snapshot_edit.md) - Edit the given file storage snapshot +* [ovhcloud cloud storage file snapshot get](ovhcloud_cloud_storage_file_snapshot_get.md) - Get a specific file storage snapshot +* [ovhcloud cloud storage file snapshot list](ovhcloud_cloud_storage_file_snapshot_list.md) - List file storage snapshots + diff --git a/doc/ovhcloud_cloud_storage_file_snapshot_create.md b/doc/ovhcloud_cloud_storage_file_snapshot_create.md new file mode 100644 index 00000000..94f5f0c5 --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot_create.md @@ -0,0 +1,42 @@ +## ovhcloud cloud storage file snapshot create + +Create a new file storage snapshot + +``` +ovhcloud cloud storage file snapshot create [flags] +``` + +### Options + +``` + --description string Description of the snapshot + -h, --help help for create + --name string Name of the snapshot + --share-id string ID of the file storage share to snapshot + --wait Wait for the snapshot to be ready before exiting +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots + diff --git a/doc/ovhcloud_cloud_storage_file_snapshot_delete.md b/doc/ovhcloud_cloud_storage_file_snapshot_delete.md new file mode 100644 index 00000000..48e3855a --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot_delete.md @@ -0,0 +1,38 @@ +## ovhcloud cloud storage file snapshot delete + +Delete the given file storage snapshot + +``` +ovhcloud cloud storage file snapshot delete [flags] +``` + +### Options + +``` + -h, --help help for delete +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots + diff --git a/doc/ovhcloud_cloud_storage_file_snapshot_edit.md b/doc/ovhcloud_cloud_storage_file_snapshot_edit.md new file mode 100644 index 00000000..2c1d6750 --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot_edit.md @@ -0,0 +1,41 @@ +## ovhcloud cloud storage file snapshot edit + +Edit the given file storage snapshot + +``` +ovhcloud cloud storage file snapshot edit [flags] +``` + +### Options + +``` + --description string Description of the snapshot + --editor Use a text editor to define parameters + -h, --help help for edit + --name string Name of the snapshot +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots + diff --git a/doc/ovhcloud_cloud_storage_file_snapshot_get.md b/doc/ovhcloud_cloud_storage_file_snapshot_get.md new file mode 100644 index 00000000..a6cb5cbe --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot_get.md @@ -0,0 +1,38 @@ +## ovhcloud cloud storage file snapshot get + +Get a specific file storage snapshot + +``` +ovhcloud cloud storage file snapshot get [flags] +``` + +### Options + +``` + -h, --help help for get +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots + diff --git a/doc/ovhcloud_cloud_storage_file_snapshot_list.md b/doc/ovhcloud_cloud_storage_file_snapshot_list.md new file mode 100644 index 00000000..a399f91f --- /dev/null +++ b/doc/ovhcloud_cloud_storage_file_snapshot_list.md @@ -0,0 +1,45 @@ +## ovhcloud cloud storage file snapshot list + +List file storage snapshots + +``` +ovhcloud cloud storage file snapshot list [flags] +``` + +### Options + +``` + --filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax + Examples: + --filter 'state=="running"' + --filter 'name=~"^my.*"' + --filter 'nested.property.subproperty>10' + --filter 'startDate>="2023-12-01"' + --filter 'name=~"something" && nbField>10' + -h, --help help for list +``` + +### Options inherited from parent commands + +``` + --cloud-project string Cloud project ID + -d, --debug Activate debug mode (will log all HTTP requests details) + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) + Examples: + --output json + --output yaml + --output interactive + --output 'id' (to extract a single field) + --output 'nested.field.subfield' (to extract a nested field) + --output '[id, "name"]' (to extract multiple fields as an array) + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) + --output 'name+","+type' (to extract and concatenate fields in a string) + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) + --profile string Use a specific profile from the configuration file +``` + +### SEE ALSO + +* [ovhcloud cloud storage file snapshot](ovhcloud_cloud_storage_file_snapshot.md) - Manage file storage snapshots + diff --git a/internal/assets/api-schemas/cloud_v2.json b/internal/assets/api-schemas/cloud_v2.json index d03d70b5..2e55a8ef 100644 --- a/internal/assets/api-schemas/cloud_v2.json +++ b/internal/assets/api-schemas/cloud_v2.json @@ -1157,32 +1157,2642 @@ "description": "Time (e.g., 15:04:05)", "format": "time", "example": "15:04:05" + }, + "publicCloud.storage.file.FileStorageExportLocation": { + "type": "object", + "description": "An NFS export path for a file storage", + "properties": { + "path": { + "type": "string", + "description": "NFS export path for mounting", + "readOnly": true + }, + "preferred": { + "type": "boolean", + "description": "Whether this is the preferred export location", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageUpdate": { + "type": "object", + "description": "Payload to update a Public Cloud file storage", + "properties": { + "checksum": { + "type": "string", + "description": "Computed hash controlling concurrent modifications; represents the current target specification value" + }, + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageUpdateTargetSpec" + } + ], + "description": "Desired target specification for the file storage" + } + }, + "required": [ + "checksum", + "targetSpec" + ] + }, + "publicCloud.storage.file.FileStorageNetworkSubnetRef": { + "type": "object", + "description": "Reference to the Neutron subnet backing a share network", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the Neutron subnet", + "format": "uuid" + } + }, + "required": [ + "id" + ] + }, + "publicCloud.storage.file.FileStorageNetworkNetworkRef": { + "type": "object", + "description": "Reference to the Neutron network backing a share network", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the Neutron network", + "format": "uuid" + } + }, + "required": [ + "id" + ] + }, + "publicCloud.storage.file.FileStorageCapability": { + "type": "object", + "description": "An action availability flag for a file storage, derived from its current status", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the action is currently available on the file storage", + "readOnly": true + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageCapabilityEnum" + } + ], + "description": "The action the flag refers to", + "readOnly": true + }, + "reason": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageCapabilityReasonEnum" + } + ], + "description": "Why the action is unavailable; set only when enabled is false", + "nullable": true, + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageShareNetworkRef": { + "type": "object", + "description": "Reference to a pre-existing file storage share network", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the share network to attach the file storage to", + "format": "uuid" + } + }, + "required": [ + "id" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotCreation": { + "type": "object", + "description": "Payload to create a Public Cloud file storage snapshot", + "properties": { + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotTargetSpec" + } + ], + "description": "Desired target specification for the snapshot" + } + }, + "required": [ + "targetSpec" + ] + }, + "publicCloud.storage.file.FileStorageTypeEnum": { + "type": "string", + "description": "Supported file storage types (performance tiers)", + "enum": [ + "STANDARD_1AZ" + ] + }, + "publicCloud.storage.file.FileStorageCapabilityEnum": { + "type": "string", + "description": "Action availability flags computed from the file storage status", + "enum": [ + "ACL_MANAGEMENT", + "DELETE", + "EDIT", + "REVERT_FROM_SNAPSHOT", + "SNAPSHOT_MANAGEMENT", + "UPDATE_SIZE" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotTargetSpec": { + "type": "object", + "description": "Target specification for a file storage snapshot", + "properties": { + "description": { + "type": "string", + "description": "Description of the snapshot", + "nullable": true + }, + "name": { + "type": "string", + "description": "Desired snapshot name", + "nullable": true + }, + "share": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotShareRef" + } + ], + "description": "Reference to the parent file storage share to snapshot" + } + }, + "required": [ + "share" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotShareRef": { + "type": "object", + "description": "Reference to the parent file storage share of the snapshot", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the parent file storage share", + "format": "uuid" + } + }, + "required": [ + "id" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotUpdateTargetSpec": { + "type": "object", + "description": "Target specification for updating a file storage snapshot (only name and description are mutable)", + "properties": { + "description": { + "type": "string", + "description": "Description of the snapshot", + "nullable": true + }, + "name": { + "type": "string", + "description": "Desired snapshot name", + "nullable": true + } + } + }, + "publicCloud.storage.file.FileStorageAccessRuleInput": { + "type": "object", + "description": "Input for an access rule controlling which IP addresses can access a file storage", + "properties": { + "accessLevel": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessLevelEnum" + } + ], + "description": "Access level granted (read-write or read-only)" + }, + "accessTo": { + "type": "string", + "description": "IP address or CIDR allowed to access the file storage" + } + }, + "required": [ + "accessLevel", + "accessTo" + ] + }, + "publicCloud.storage.file.FileStorageNetworkNetwork": { + "type": "object", + "description": "The Neutron network backing a share network", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the Neutron network", + "format": "uuid", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageAccessRuleStateEnum": { + "type": "string", + "description": "Possible states for a file storage access rule", + "enum": [ + "ACTIVE", + "APPLYING", + "DENYING", + "ERROR" + ] + }, + "publicCloud.storage.file.FileStorageSnapshot": { + "type": "object", + "description": "A snapshot of a Public Cloud file storage (NFS share)", + "properties": { + "checksum": { + "type": "string", + "description": "Computed hash representing the current target specification value", + "readOnly": true + }, + "createdAt": { + "type": "string", + "description": "Creation date of the snapshot", + "format": "date-time", + "readOnly": true + }, + "currentState": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotCurrentState" + } + ], + "description": "Current observed state of the snapshot from the infrastructure", + "nullable": true, + "readOnly": true + }, + "currentTasks": { + "type": "array", + "description": "Ongoing asynchronous tasks related to the snapshot", + "nullable": true, + "items": { + "$ref": "#/components/schemas/common.CurrentTask" + }, + "readOnly": true + }, + "id": { + "type": "string", + "description": "Unique identifier of the snapshot", + "format": "uuid", + "readOnly": true + }, + "resourceStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/common.ResourceStatusEnum" + } + ], + "description": "Snapshot readiness in the system", + "readOnly": true + }, + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotTargetSpec" + } + ], + "description": "Last target specification of the snapshot", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "description": "Last update date of the snapshot", + "format": "date-time", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageCurrentState": { + "type": "object", + "description": "Current state of a file storage as observed from the infrastructure", + "properties": { + "accessRules": { + "type": "array", + "description": "Current access rules on the file storage", + "nullable": true, + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessRule" + }, + "readOnly": true + }, + "capabilities": { + "type": "array", + "description": "Action availability flags derived from the file storage status", + "nullable": true, + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageCapability" + }, + "readOnly": true + }, + "description": { + "type": "string", + "description": "File storage description", + "nullable": true, + "readOnly": true + }, + "exportLocations": { + "type": "array", + "description": "NFS export paths for mounting the file storage", + "nullable": true, + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageExportLocation" + }, + "readOnly": true + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.common.Location" + } + ], + "description": "Current resource location", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Current file storage name", + "readOnly": true + }, + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageProtocolEnum" + } + ], + "description": "File sharing protocol", + "readOnly": true + }, + "shareNetwork": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageShareNetworkRef" + } + ], + "description": "Reference to the share network the file storage is attached to", + "readOnly": true + }, + "shareType": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageTypeEnum" + } + ], + "description": "File storage type (performance tier)", + "readOnly": true + }, + "size": { + "type": "integer", + "description": "Current size of the file storage in GB", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageCapabilityReasonEnum": { + "type": "string", + "description": "Reason a file storage action is currently disabled", + "enum": [ + "HAS_DEPENDENT_SNAPSHOTS", + "INVALID_STATUS" + ] + }, + "publicCloud.storage.file.FileStorageProtocolEnum": { + "type": "string", + "description": "Supported file sharing protocols", + "enum": [ + "NFS" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotCurrentState": { + "type": "object", + "description": "Current state of a file storage snapshot as observed from the infrastructure", + "properties": { + "description": { + "type": "string", + "description": "Snapshot description", + "nullable": true, + "readOnly": true + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.common.Location" + } + ], + "description": "Current resource location", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Current snapshot name", + "nullable": true, + "readOnly": true + }, + "share": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotShareRef" + } + ], + "description": "Reference to the parent file storage share of the snapshot", + "readOnly": true + }, + "size": { + "type": "integer", + "description": "Size of the snapshot in GB", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageNetworkTargetSpec": { + "type": "object", + "description": "Target specification for a file storage share network", + "properties": { + "description": { + "type": "string", + "description": "Description of the share network", + "nullable": true + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.common.Location" + } + ], + "description": "Desired resource location" + }, + "name": { + "type": "string", + "description": "Desired share network name" + }, + "network": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkNetworkRef" + } + ], + "description": "Reference to the Neutron network to back the share network" + }, + "subnet": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkSubnetRef" + } + ], + "description": "Reference to the Neutron subnet to back the share network" + } + }, + "required": [ + "location", + "name", + "network", + "subnet" + ] + }, + "publicCloud.storage.file.FileStorageNetworkCurrentState": { + "type": "object", + "description": "Current state of a file storage share network as observed from the infrastructure", + "properties": { + "description": { + "type": "string", + "description": "Share network description", + "nullable": true, + "readOnly": true + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.common.Location" + } + ], + "description": "Current resource location", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Current share network name", + "readOnly": true + }, + "network": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkNetwork" + } + ], + "description": "The Neutron network backing the share network", + "readOnly": true + }, + "subnet": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkSubnet" + } + ], + "description": "The Neutron subnet backing the share network", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageAccessRule": { + "type": "object", + "description": "An access rule controlling which IP addresses can access a file storage", + "properties": { + "accessLevel": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessLevelEnum" + } + ], + "description": "Access level granted (read-write or read-only)", + "readOnly": true + }, + "accessTo": { + "type": "string", + "description": "IP address or CIDR allowed to access the file storage", + "readOnly": true + }, + "createdAt": { + "type": "string", + "description": "Creation date of the access rule", + "nullable": true, + "format": "date-time", + "readOnly": true + }, + "id": { + "type": "string", + "description": "Unique identifier of the access rule", + "format": "uuid", + "readOnly": true + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessRuleStateEnum" + } + ], + "description": "Current state of the access rule", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageCreation": { + "type": "object", + "description": "Payload to create a Public Cloud file storage", + "properties": { + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageTargetSpec" + } + ], + "description": "Desired target specification for the file storage" + } + }, + "required": [ + "targetSpec" + ] + }, + "publicCloud.storage.file.FileStorageSnapshotUpdate": { + "type": "object", + "description": "Payload to update a Public Cloud file storage snapshot", + "properties": { + "checksum": { + "type": "string", + "description": "Computed hash controlling concurrent modifications; represents the current target specification value" + }, + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotUpdateTargetSpec" + } + ], + "description": "Desired target specification for the snapshot" + } + }, + "required": [ + "checksum", + "targetSpec" + ] + }, + "publicCloud.storage.file.FileStorageNetwork": { + "type": "object", + "description": "A Public Cloud file storage share network", + "properties": { + "checksum": { + "type": "string", + "description": "Computed hash representing the current target specification value", + "readOnly": true + }, + "createdAt": { + "type": "string", + "description": "Creation date of the share network", + "format": "date-time", + "readOnly": true + }, + "currentState": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkCurrentState" + } + ], + "description": "Current observed state of the share network from the infrastructure", + "nullable": true, + "readOnly": true + }, + "currentTasks": { + "type": "array", + "description": "Ongoing asynchronous tasks related to the share network", + "nullable": true, + "items": { + "$ref": "#/components/schemas/common.CurrentTask" + }, + "readOnly": true + }, + "id": { + "type": "string", + "description": "Unique identifier of the share network", + "format": "uuid", + "readOnly": true + }, + "resourceStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/common.ResourceStatusEnum" + } + ], + "description": "Share network readiness in the system", + "readOnly": true + }, + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkTargetSpec" + } + ], + "description": "Last target specification of the share network", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "description": "Last update date of the share network", + "format": "date-time", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageNetworkCreation": { + "type": "object", + "description": "Payload to create a Public Cloud file storage share network", + "properties": { + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkTargetSpec" + } + ], + "description": "Desired target specification for the share network" + } + }, + "required": [ + "targetSpec" + ] + }, + "publicCloud.storage.file.FileStorageTargetSpec": { + "type": "object", + "description": "Target specification for a file storage", + "properties": { + "accessRules": { + "type": "array", + "description": "Access rules controlling which IPs can access the file storage", + "nullable": true, + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessRuleInput" + } + }, + "description": { + "type": "string", + "description": "Description of the file storage", + "nullable": true + }, + "location": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.common.Location" + } + ], + "description": "Desired resource location" + }, + "name": { + "type": "string", + "description": "Desired file storage name" + }, + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageProtocolEnum" + } + ], + "description": "File sharing protocol" + }, + "shareNetwork": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageShareNetworkRef" + } + ], + "description": "Reference to a pre-existing share network to attach the file storage to" + }, + "shareType": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageTypeEnum" + } + ], + "description": "File storage type (performance tier)" + }, + "size": { + "type": "integer", + "description": "Size of the file storage in GB" + } + }, + "required": [ + "location", + "name", + "protocol", + "shareNetwork", + "shareType", + "size" + ] + }, + "publicCloud.storage.file.FileStorage": { + "type": "object", + "description": "A Public Cloud file storage (NFS share)", + "properties": { + "checksum": { + "type": "string", + "description": "Computed hash representing the current target specification value", + "readOnly": true + }, + "createdAt": { + "type": "string", + "description": "Creation date of the file storage", + "format": "date-time", + "readOnly": true + }, + "currentState": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageCurrentState" + } + ], + "description": "Current observed state of the file storage from the infrastructure", + "nullable": true, + "readOnly": true + }, + "currentTasks": { + "type": "array", + "description": "Ongoing asynchronous tasks related to the file storage", + "nullable": true, + "items": { + "$ref": "#/components/schemas/common.CurrentTask" + }, + "readOnly": true + }, + "id": { + "type": "string", + "description": "Unique identifier of the file storage", + "format": "uuid", + "readOnly": true + }, + "resourceStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/common.ResourceStatusEnum" + } + ], + "description": "File storage readiness in the system", + "readOnly": true + }, + "targetSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageTargetSpec" + } + ], + "description": "Last target specification of the file storage", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "description": "Last update date of the file storage", + "format": "date-time", + "readOnly": true + } + } + }, + "publicCloud.common.Location": { + "type": "object", + "description": "Resource location", + "properties": { + "availabilityZone": { + "type": "string", + "description": "Availability zone within the region", + "nullable": true + }, + "region": { + "type": "string", + "description": "Region code" + } + }, + "required": [ + "region" + ] + }, + "publicCloud.storage.file.FileStorageNetworkSubnet": { + "type": "object", + "description": "The Neutron subnet backing a share network", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the Neutron subnet", + "format": "uuid", + "readOnly": true + } + } + }, + "publicCloud.storage.file.FileStorageUpdateTargetSpec": { + "type": "object", + "description": "Target specification for updating a file storage (immutable fields like protocol, shareType, networkId, subnetId are excluded)", + "properties": { + "accessRules": { + "type": "array", + "description": "Access rules controlling which IPs can access the file storage (replaces all existing rules)", + "nullable": true, + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageAccessRuleInput" + } + }, + "description": { + "type": "string", + "description": "Description of the file storage", + "nullable": true + }, + "name": { + "type": "string", + "description": "Desired file storage name" + }, + "size": { + "type": "integer", + "description": "Size of the file storage in GB. The size can only be increased (extend); shrinking a file storage is not supported" + } + }, + "required": [ + "name", + "size" + ] + }, + "publicCloud.storage.file.FileStorageAccessLevelEnum": { + "type": "string", + "description": "Access levels for file storage access rules", + "enum": [ + "READ_ONLY", + "READ_WRITE" + ] + } + }, + "securitySchemes": { + "oAuth2AuthCode": { + "type": "oauth2", + "description": "Oauth2", + "x-client-id": "1bb9c7df371741c0", + "x-client-secret": "a5b4de870aca620d10fbf63cd18d205b", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://www.ovh.com/auth/oauth2/authorize", + "tokenUrl": "https://www.ovh.com/auth/oauth2/token", + "scopes": { + "account/all": "Manage your account", + "all": "Manage your whole account and all your services", + "services/all": "Manage your services lifecycle and billing" + } + } + } + } + } + }, + "paths": { + "/publicCloud/project": { + "get": { + "summary": "List all Public Cloud projects", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "iamTags", + "description": "Filter resources on IAM tags", + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/iam.resource.TagFilter" + } + } + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.project.ProjectAsyncWithIAM" + } + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:get", + "required": true + } + ], + "x-expanded-response": "PublicCloudProjectProjectAsyncWithIAM" + }, + "post": { + "summary": "Create a new cloud project", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.project.ProjectCreation" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.project.ProjectAsync" + } + } + } + } + }, + "x-badges": [ + { + "color": "orange", + "label": "Internal use only" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:create", + "required": true + }, + { + "name": "billingAccount:apiovh:subscription/publicCloudProject/create", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}": { + "get": { + "summary": "Get details on a Public Cloud project", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.project.ProjectAsyncWithIAM" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:get", + "required": true + } + ] + }, + "put": { + "summary": "Update an existing cloud project", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.project.ProjectCreation" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.project.ProjectAsync" + } + } + } + } + }, + "x-badges": [ + { + "color": "orange", + "label": "Internal use only" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:edit", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher": { + "get": { + "summary": "List managed Rancher services", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + } + }, + "examples": { + "Example": { + "value": [ + { + "createdAt": "2020-12-31T07:39:19Z", + "currentState": { + "iamAuthEnabled": false, + "ipRestrictions": [ + { + "cidrBlock": "198.51.100.1/32", + "description": "My IP restriction" + } + ], + "name": "my_rancher", + "networking": { + "egressCidrBlocks": [ + "203.0.113.0/24" + ] + }, + "plan": "OVHCLOUD_EDITION", + "region": "EU_WEST_RBX", + "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", + "usage": { + "datetime": "2020-12-31T13:00:00Z", + "orchestratedVcpus": 16 + }, + "version": "1.0.0" + }, + "currentTasks": [], + "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "resourceStatus": "READY", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [ + { + "cidrBlock": "198.51.100.1/32", + "description": "My IP restriction" + } + ], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.0.0" + }, + "updatedAt": "2020-12-31T07:39:19Z" + }, + { + "createdAt": "2020-12-31T13:37:46Z", + "currentState": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "rancher2", + "plan": "STANDARD", + "region": "EU_WEST_RBX", + "url": "https://cccccc.bbbb.rancher.ovhcloud.example", + "version": "1.0.0" + }, + "currentTasks": [ + { + "id": "30017036-ddb2-40a8-ad56-6d765b059aab", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/222ce105-a3f7-44c4-a7d3-dbb5983c045d/task/30017036-ddb2-40a8-ad56-6d765b059aab", + "type": "RANCHER_UPDATE" + } + ], + "id": "222ce105-a3f7-44c4-a7d3-dbb5983c045d", + "resourceStatus": "UPDATING", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "rancher2", + "plan": "STANDARD", + "version": "1.1.0" + }, + "updatedAt": "2020-12-31T13:40:46Z" + } + ], + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/get", + "required": true + } + ], + "x-response-identifier": "id", + "x-expanded-response": "PublicCloudRancherRancher" + }, + "post": { + "summary": "Create a new managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.RancherCreation" + }, + "examples": { + "Create a STANDARD managed Rancher on the latest version": { + "value": { + "targetSpec": { + "iamAuthEnabled": false, + "name": "my_rancher", + "plan": "STANDARD" + } + }, + "summary": "Request body for creating a managed Rancher on plan STANDARD" + }, + "Create an OVHCLOUD_EDITION managed Rancher on a specific version": { + "value": { + "targetSpec": { + "iamAuthEnabled": false, + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.0.0" + } + }, + "summary": "Request body for creating a managed Rancher on plan OVHCLOUD_EDITION with a specific version" + } + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + }, + "examples": { + "Example": { + "value": { + "createdAt": "2020-12-31T07:39:19Z", + "currentState": { + "bootstrapPassword": "jL%IctBOu)-$D@wa", + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "region": "EU_WEST_RBX", + "version": "1.0.0" + }, + "currentTasks": [ + { + "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "type": "RANCHER_CREATE" + } + ], + "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "resourceStatus": "CREATING", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.0.0" + }, + "updatedAt": "2020-12-31T07:39:19Z" + }, + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/create", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}": { + "delete": { + "summary": "Delete a managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + }, + "examples": { + "Example": { + "value": { + "createdAt": "2020-12-31T07:39:19Z", + "currentState": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "networking": { + "egressCidrBlocks": [ + "203.0.113.0/24" + ] + }, + "plan": "OVHCLOUD_EDITION", + "region": "EU_WEST_RBX", + "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", + "usage": { + "datetime": "2020-12-31T09:00:00Z", + "orchestratedVcpus": 16 + }, + "version": "1.0.0" + }, + "currentTasks": [ + { + "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "type": "RANCHER_DELETE" + } + ], + "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "resourceStatus": "DELETING", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.0.0" + }, + "updatedAt": "2020-12-31T09:10:19Z" + }, + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/delete", + "required": true + } + ] + }, + "get": { + "summary": "Get a managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + }, + "examples": { + "Example": { + "value": { + "createdAt": "2020-12-31T07:39:19Z", + "currentState": { + "iamAuthEnabled": false, + "ipRestrictions": [ + { + "cidrBlock": "198.51.100.1/32", + "description": "My IP restriction" + } + ], + "name": "my_rancher", + "networking": { + "egressCidrBlocks": [ + "203.0.113.0/24" + ] + }, + "plan": "OVHCLOUD_EDITION", + "region": "EU_WEST_RBX", + "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", + "usage": { + "datetime": "2020-12-31T20:00:00Z", + "orchestratedVcpus": 16 + }, + "version": "1.0.0" + }, + "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "resourceStatus": "READY", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [ + { + "cidrBlock": "198.51.100.1/32", + "description": "My IP restriction" + } + ], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.0.0" + }, + "updatedAt": "2020-12-31T07:39:19Z" + }, + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/get", + "required": true + } + ], + "x-response-identifier": "id" + }, + "put": { + "summary": "Update an existing managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.RancherUpdate" + }, + "examples": { + "Update rancher to plan STANDARD": { + "value": { + "targetSpec": { + "iamAuthEnabled": false, + "name": "my_rancher", + "plan": "STANDARD", + "version": "1.0.0" + } + }, + "summary": "Request body when updating plan to STANDARD" + } + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + }, + "examples": { + "Update the version of a managed Rancher version": { + "value": { + "createdAt": "2020-12-31T07:39:19Z", + "currentState": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "networking": { + "egressCidrBlocks": [ + "203.0.113.0/24" + ] + }, + "plan": "OVHCLOUD_EDITION", + "region": "EU_WEST_RBX", + "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", + "usage": { + "datetime": "2020-12-31T09:00:00Z", + "orchestratedVcpus": 16 + }, + "version": "1.0.0" + }, + "currentTasks": [ + { + "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", + "type": "RANCHER_UPDATE" + } + ], + "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "resourceStatus": "UPDATING", + "targetSpec": { + "iamAuthEnabled": false, + "ipRestrictions": [], + "name": "my_rancher", + "plan": "OVHCLOUD_EDITION", + "version": "1.1.0" + }, + "updatedAt": "2020-12-31T09:14:19Z" + }, + "summary": "Response body when updating the version of a managed Rancher" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/edit", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials": { + "post": { + "summary": "Reset the admin password", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.rancher.Credentials" + }, + "examples": { + "Example": { + "value": { + "password": "u}m.ZBA'>g?!D3DD", + "username": "admin" + }, + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/adminCredentials/reset", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan": { + "get": { + "summary": "List available and current plans for the given managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.PlanCapability" + } + }, + "examples": { + "Get plans - can switch to another plan": { + "value": [ + { + "name": "OVHCLOUD_EDITION", + "status": "CURRENT" + }, + { + "name": "STANDARD", + "status": "AVAILABLE" + } + ], + "summary": "Response body when listing plans for a specific rancher that can switch to another plan" + }, + "Get plans - cannot switch to another plan": { + "value": [ + { + "cause": "CANNOT_DOWNGRADE_USING_HIGHER_FEATURES", + "message": "You are currently using STANDARD plan features and cannot downgrade to OVHCLOUD_EDITION plan.", + "name": "OVHCLOUD_EDITION", + "status": "UNAVAILABLE" + }, + { + "name": "STANDARD", + "status": "CURRENT" + } + ], + "summary": "Response body when listing plans for a specific rancher that cannot switch to another plan" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/capabilities/plan/get", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version": { + "get": { + "summary": "List available and current versions for the given managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.VersionCapability" + } + }, + "examples": { + "Example": { + "value": [ + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", + "name": "1.0.0", + "status": "AVAILABLE" + }, + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", + "name": "1.1.0", + "status": "AVAILABLE" + }, + { + "cause": "CANNOT_UPGRADE_MULTIPLE_VERSIONS", + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.2.0", + "message": "You cannot upgrade directly to this version, please upgrade to the next minor first.", + "name": "1.2.0", + "status": "UNAVAILABLE" + } + ], + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/capabilities/version/get", + "required": true + } + ] + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}/event": { + "get": { + "summary": "List all events related to the managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/common.Event" + } + }, + "examples": { + "Example": { + "value": [ + { + "createdAt": "2020-12-31T20:10:01Z", + "kind": "RANCHER_UPDATE", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4/task/8e2478fa-af3b-4576-b344-af3546f52b5b", + "message": "Task started to update Rancher", + "type": "TASK_START" + }, + { + "createdAt": "2020-12-01T20:10:00Z", + "kind": "RANCHER_UPDATE", + "message": "Rancher target spec updated", + "type": "TARGET_SPEC_UPDATE" + } + ], + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/event/get", + "required": true + } + ] } }, - "securitySchemes": { - "oAuth2AuthCode": { - "type": "oauth2", - "description": "Oauth2", - "x-client-id": "1bb9c7df371741c0", - "x-client-secret": "a5b4de870aca620d10fbf63cd18d205b", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://www.ovh.com/auth/oauth2/authorize", - "tokenUrl": "https://www.ovh.com/auth/oauth2/token", - "scopes": { - "account/all": "Manage your account", - "all": "Manage your whole account and all your services", - "services/all": "Manage your services lifecycle and billing" + "/publicCloud/project/{projectId}/rancher/{rancherId}/task": { + "get": { + "summary": "List all asynchronous operations related to the managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/common.Task" + } + }, + "examples": { + "Example": { + "value": [ + { + "createdAt": "2020-12-01T20:00:00Z", + "errors": [], + "id": "6ffe3c08-3b65-4ede-a0e6-8b137e333e54", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4", + "message": "Cloud project a755273a123456788da6d6fcc71a95f3: update rancher 132645az-9c16-4021-b920-dfd22d8848c4", + "progress": [ + { + "name": "test", + "status": "RUNNING" + }, + { + "name": "another step", + "status": "DONE" + }, + { + "name": "yet another step", + "status": "PENDING" + } + ], + "startedAt": "2020-12-01T20:01:00Z", + "status": "RUNNING", + "type": "PlanUpdate", + "updatedAt": "2020-12-01T20:02:00Z" + } + ], + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/task/get", + "required": true + } + ], + "x-response-identifier": "id", + "x-expanded-response": "CommonTask" + } + }, + "/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}": { + "get": { + "summary": "Get a specific task related to the managed Rancher service", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "rancherId", + "description": "Rancher ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "path", + "name": "taskId", + "description": "Task ID", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } } - } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/common.Task" + }, + "examples": { + "Example": { + "value": { + "createdAt": "2020-12-01T20:00:00Z", + "errors": [], + "id": "6ffe3c08-3b65-4ede-a0e6-8b137e333e54", + "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4", + "message": "Cloud project a755273a123456788da6d6fcc71a95f3: update rancher 132645az-9c16-4021-b920-dfd22d8848c4", + "progress": [ + { + "name": "test", + "status": "RUNNING" + }, + { + "name": "another step", + "status": "DONE" + }, + { + "name": "yet another step", + "status": "PENDING" + } + ], + "startedAt": "2020-12-01T20:01:00Z", + "status": "RUNNING", + "type": "RANCHER_UPDATE", + "updatedAt": "2020-12-01T20:02:00Z" + }, + "summary": "Example" + } + } + } + } + }, + "500": { + "description": "Error 500 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Server::InternalServerError::Maintenance": { + "value": { + "class": "Server::InternalServerError::Maintenance", + "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + } + } + } + } + } + } + }, + "tags": [ + "Rancher" + ], + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:rancher/task/get", + "required": true + } + ], + "x-response-identifier": "id" } - } - }, - "paths": { - "/publicCloud/project": { + }, + "/publicCloud/project/{projectId}/reference/rancher/plan": { "get": { - "summary": "List all Public Cloud projects", + "summary": "List available plans for creating a managed Rancher service", "security": [ { "oAuth2AuthCode": [] @@ -1206,17 +3816,12 @@ } }, { - "in": "query", - "name": "iamTags", - "description": "Filter resources on IAM tags", + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/iam.resource.TagFilter" - } - } + "type": "string" } } ], @@ -1228,13 +3833,32 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/publicCloud.project.ProjectAsyncWithIAM" + "$ref": "#/components/schemas/publicCloud.rancher.PlanReference" + } + }, + "examples": { + "Example": { + "value": [ + { + "name": "OVHCLOUD_EDITION", + "status": "AVAILABLE" + }, + { + "name": "STANDARD", + "status": "AVAILABLE" + } + ], + "summary": "Example" } } } } } }, + "tags": [ + "Rancher", + "Reference" + ], "x-badges": [ { "color": "green", @@ -1243,62 +3867,104 @@ ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:get", + "name": "publicCloudProject:apiovh:reference/rancher/plan/get", "required": true } - ], - "x-expanded-response": "PublicCloudProjectProjectAsyncWithIAM" - }, - "post": { - "summary": "Create a new cloud project", + ] + } + }, + "/publicCloud/project/{projectId}/reference/rancher/version": { + "get": { + "summary": "List available versions for creating a managed Rancher service", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/publicCloud.project.ProjectCreation" - } + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.project.ProjectAsync" + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.VersionReference" + } + }, + "examples": { + "Example": { + "value": [ + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", + "name": "1.0.0", + "status": "AVAILABLE" + }, + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", + "name": "1.1.0", + "status": "AVAILABLE" + } + ], + "summary": "Example" + } } } } } }, + "tags": [ + "Rancher", + "Reference" + ], "x-badges": [ { - "color": "orange", - "label": "Internal use only" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:create", - "required": true - }, - { - "name": "billingAccount:apiovh:subscription/publicCloudProject/create", + "name": "publicCloudProject:apiovh:reference/rancher/version/get", "required": true } ] } }, - "/publicCloud/project/{projectId}": { + "/publicCloud/reference/rancher/plan": { "get": { - "summary": "Get details on a Public Cloud project", + "summary": "List available plans for creating a managed Rancher service", + "deprecated": true, + "x-deprecation-date": "2024-05-20T00:00:00Z", + "x-deletion-date": "2024-09-01T00:00:00Z", + "x-replacement-route": "/v2/publicCloud/project/{projectId}/reference/rancher", "security": [ { "oAuth2AuthCode": [] @@ -1306,13 +3972,20 @@ ], "parameters": [ { - "in": "path", - "name": "projectId", - "description": "Project ID", - "required": true, + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", "schema": { "type": "string" } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } } ], "responses": { @@ -1321,27 +3994,48 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.project.ProjectAsyncWithIAM" + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.PlanReference" + } + }, + "examples": { + "Example": { + "value": [ + { + "name": "OVHCLOUD_EDITION", + "status": "AVAILABLE" + }, + { + "name": "STANDARD", + "status": "AVAILABLE" + } + ], + "summary": "Example" + } } } } } }, - "x-badges": [ - { - "color": "green", - "label": "Stable production version" - } + "tags": [ + "Reference" ], - "x-iam-actions": [ + "x-badges": [ { - "name": "publicCloudProject:apiovh:get", - "required": true + "color": "red", + "label": "Deprecated, will be removed" } ] - }, - "put": { - "summary": "Update an existing cloud project", + } + }, + "/publicCloud/reference/rancher/version": { + "get": { + "summary": "List available versions for creating a managed Rancher service", + "deprecated": true, + "x-deprecation-date": "2024-05-20T00:00:00Z", + "x-deletion-date": "2024-09-01T00:00:00Z", + "x-replacement-route": "/v2/publicCloud/project/{projectId}/reference/rancher", "security": [ { "oAuth2AuthCode": [] @@ -1349,54 +4043,68 @@ ], "parameters": [ { - "in": "path", - "name": "projectId", - "description": "Project ID", - "required": true, + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/publicCloud.project.ProjectCreation" - } + }, + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.project.ProjectAsync" + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.rancher.VersionReference" + } + }, + "examples": { + "Example": { + "value": [ + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", + "name": "1.0.0", + "status": "AVAILABLE" + }, + { + "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", + "name": "1.1.0", + "status": "AVAILABLE" + } + ], + "summary": "Example" + } } } } } }, - "x-badges": [ - { - "color": "orange", - "label": "Internal use only" - } + "tags": [ + "Reference" ], - "x-iam-actions": [ + "x-badges": [ { - "name": "publicCloudProject:apiovh:edit", - "required": true + "color": "red", + "label": "Deprecated, will be removed" } ] } }, - "/publicCloud/project/{projectId}/rancher": { + "/publicCloud/project/{projectId}/storage/file/network": { "get": { - "summary": "List managed Rancher services", + "summary": "List Public Cloud file storage share networks", "security": [ { "oAuth2AuthCode": [] @@ -1437,114 +4145,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/publicCloud.rancher.Rancher" - } - }, - "examples": { - "Example": { - "value": [ - { - "createdAt": "2020-12-31T07:39:19Z", - "currentState": { - "iamAuthEnabled": false, - "ipRestrictions": [ - { - "cidrBlock": "198.51.100.1/32", - "description": "My IP restriction" - } - ], - "name": "my_rancher", - "networking": { - "egressCidrBlocks": [ - "203.0.113.0/24" - ] - }, - "plan": "OVHCLOUD_EDITION", - "region": "EU_WEST_RBX", - "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", - "usage": { - "datetime": "2020-12-31T13:00:00Z", - "orchestratedVcpus": 16 - }, - "version": "1.0.0" - }, - "currentTasks": [], - "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", - "resourceStatus": "READY", - "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [ - { - "cidrBlock": "198.51.100.1/32", - "description": "My IP restriction" - } - ], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.0.0" - }, - "updatedAt": "2020-12-31T07:39:19Z" - }, - { - "createdAt": "2020-12-31T13:37:46Z", - "currentState": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "rancher2", - "plan": "STANDARD", - "region": "EU_WEST_RBX", - "url": "https://cccccc.bbbb.rancher.ovhcloud.example", - "version": "1.0.0" - }, - "currentTasks": [ - { - "id": "30017036-ddb2-40a8-ad56-6d765b059aab", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/222ce105-a3f7-44c4-a7d3-dbb5983c045d/task/30017036-ddb2-40a8-ad56-6d765b059aab", - "type": "RANCHER_UPDATE" - } - ], - "id": "222ce105-a3f7-44c4-a7d3-dbb5983c045d", - "resourceStatus": "UPDATING", - "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "rancher2", - "plan": "STANDARD", - "version": "1.1.0" - }, - "updatedAt": "2020-12-31T13:40:46Z" - } - ], - "summary": "Example" - } - } - } - } - }, - "500": { - "description": "Error 500 response", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Common error model", - "properties": { - "class": { - "type": "string", - "description": "Class of the error" - }, - "message": { - "type": "string", - "description": "Error message" - } - } - }, - "examples": { - "Server::InternalServerError::Maintenance": { - "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetwork" } } } @@ -1552,25 +4153,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/get", + "name": "publicCloudProject:apiovh:storage/file/network/get", "required": true } ], "x-response-identifier": "id", - "x-expanded-response": "PublicCloudRancherRancher" + "x-expanded-response": "PublicCloudStorageFileFileStorageNetwork" }, "post": { - "summary": "Create a new managed Rancher service", + "summary": "Create a new Public Cloud file storage share network", "security": [ { "oAuth2AuthCode": [] @@ -1592,29 +4194,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.RancherCreation" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetworkCreation" }, "examples": { - "Create a STANDARD managed Rancher on the latest version": { - "value": { - "targetSpec": { - "iamAuthEnabled": false, - "name": "my_rancher", - "plan": "STANDARD" - } - }, - "summary": "Request body for creating a managed Rancher on plan STANDARD" - }, - "Create an OVHCLOUD_EDITION managed Rancher on a specific version": { - "value": { - "targetSpec": { - "iamAuthEnabled": false, - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.0.0" + "Create share network": { + "value": { + "targetSpec": { + "description": "Share network for production", + "location": { + "region": "GRA1" + }, + "name": "my-share-network", + "network": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" + }, + "subnet": { + "id": "c3d4e5f6-a7b8-9012-cdef-234567890abc" + } } }, - "summary": "Request body for creating a managed Rancher on plan OVHCLOUD_EDITION with a specific version" + "summary": "Create a share network backed by a private network and subnet" } } } @@ -1626,47 +4225,48 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetwork" + } + } + } + }, + "400": { + "description": "Error 400 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } }, "examples": { - "Example": { + "Client::BadRequest::InvalidParameter": { "value": { - "createdAt": "2020-12-31T07:39:19Z", - "currentState": { - "bootstrapPassword": "jL%IctBOu)-$D@wa", - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "region": "EU_WEST_RBX", - "version": "1.0.0" - }, - "currentTasks": [ - { - "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "type": "RANCHER_CREATE" - } - ], - "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", - "resourceStatus": "CREATING", - "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.0.0" - }, - "updatedAt": "2020-12-31T07:39:19Z" - }, - "summary": "Example" + "class": "Client::BadRequest::InvalidParameter", + "message": "Invalid parameter in the request" + } + }, + "Client::BadRequest::ServiceNotAvailableInRegion": { + "value": { + "class": "Client::BadRequest::ServiceNotAvailableInRegion", + "message": "This service is not available in the selected region" + } } } } } }, - "500": { - "description": "Error 500 response", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { @@ -1684,10 +4284,10 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::Conflict::RegionInMaintenance": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::Conflict::RegionInMaintenance", + "message": "This region is currently in maintenance" } } } @@ -1696,25 +4296,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/create", + "name": "publicCloudProject:apiovh:storage/file/network/create", "required": true } ] } }, - "/publicCloud/project/{projectId}/rancher/{rancherId}": { + "/publicCloud/project/{projectId}/storage/file/network/{networkId}": { "delete": { - "summary": "Delete a managed Rancher service", + "summary": "Delete a Public Cloud file storage share network", "security": [ { "oAuth2AuthCode": [] @@ -1723,21 +4324,21 @@ "parameters": [ { "in": "path", - "name": "projectId", - "description": "Project ID", + "name": "networkId", + "description": "Network ID", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { "in": "path", - "name": "rancherId", - "description": "Rancher ID", + "name": "projectId", + "description": "Project ID", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -1747,56 +4348,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.Rancher" - }, - "examples": { - "Example": { - "value": { - "createdAt": "2020-12-31T07:39:19Z", - "currentState": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "networking": { - "egressCidrBlocks": [ - "203.0.113.0/24" - ] - }, - "plan": "OVHCLOUD_EDITION", - "region": "EU_WEST_RBX", - "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", - "usage": { - "datetime": "2020-12-31T09:00:00Z", - "orchestratedVcpus": 16 - }, - "version": "1.0.0" - }, - "currentTasks": [ - { - "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "type": "RANCHER_DELETE" - } - ], - "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", - "resourceStatus": "DELETING", - "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.0.0" - }, - "updatedAt": "2020-12-31T09:10:19Z" - }, - "summary": "Example" - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetwork" } } } }, - "500": { - "description": "Error 500 response", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { @@ -1814,10 +4372,16 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::Conflict::ResourceAlreadyBeingDeleted": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::Conflict::ResourceAlreadyBeingDeleted", + "message": "Resource is already being deleted" + } + }, + "Client::Conflict::ResourceInInvalidState": { + "value": { + "class": "Client::Conflict::ResourceInInvalidState", + "message": "Resource cannot be modified in its current state" } } } @@ -1826,23 +4390,24 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/delete", + "name": "publicCloudProject:apiovh:storage/file/network/delete", "required": true } ] }, "get": { - "summary": "Get a managed Rancher service", + "summary": "Get a Public Cloud file storage share network", "security": [ { "oAuth2AuthCode": [] @@ -1851,21 +4416,21 @@ "parameters": [ { "in": "path", - "name": "projectId", - "description": "Project ID", + "name": "networkId", + "description": "Network ID", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { "in": "path", - "name": "rancherId", - "description": "Rancher ID", + "name": "projectId", + "description": "Project ID", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -1875,81 +4440,115 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.Rancher" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageNetwork" }, "examples": { "Example": { "value": { - "createdAt": "2020-12-31T07:39:19Z", + "checksum": "c3d4e5f6a7b8c9d0e1f2a3b4c5d6a7b8", + "createdAt": "2026-02-10T16:00:00Z", "currentState": { - "iamAuthEnabled": false, - "ipRestrictions": [ - { - "cidrBlock": "198.51.100.1/32", - "description": "My IP restriction" - } - ], - "name": "my_rancher", - "networking": { - "egressCidrBlocks": [ - "203.0.113.0/24" - ] + "description": "Share network for production", + "location": { + "availabilityZone": "eu-west-gra-a", + "region": "GRA1" }, - "plan": "OVHCLOUD_EDITION", - "region": "EU_WEST_RBX", - "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", - "usage": { - "datetime": "2020-12-31T20:00:00Z", - "orchestratedVcpus": 16 + "name": "my-share-network", + "network": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" }, - "version": "1.0.0" + "subnet": { + "id": "c3d4e5f6-a7b8-9012-cdef-234567890abc" + } }, - "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", + "currentTasks": null, + "id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890", "resourceStatus": "READY", "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [ - { - "cidrBlock": "198.51.100.1/32", - "description": "My IP restriction" - } - ], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.0.0" + "description": "Share network for production", + "location": { + "region": "GRA1" + }, + "name": "my-share-network", + "network": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" + }, + "subnet": { + "id": "c3d4e5f6-a7b8-9012-cdef-234567890abc" + } }, - "updatedAt": "2020-12-31T07:39:19Z" + "updatedAt": "2026-02-10T16:05:00Z" }, "summary": "Example" } } } } + } + }, + "tags": [ + "Storage", + "File" + ], + "x-badges": [ + { + "color": "blue", + "label": "Alpha version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:storage/file/network/get", + "required": true + } + ], + "x-response-identifier": "id" + } + }, + "/publicCloud/project/{projectId}/storage/file/share": { + "get": { + "summary": "List Public Cloud file storages", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "X-Pagination-Cursor", + "description": "Pagination cursor", + "schema": { + "type": "string" + } }, - "500": { - "description": "Error 500 response", - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Common error model", - "properties": { - "class": { - "type": "string", - "description": "Class of the error" - }, - "message": { - "type": "string", - "description": "Error message" - } - } - }, - "examples": { - "Server::InternalServerError::Maintenance": { - "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." - } + { + "in": "header", + "name": "X-Pagination-Size", + "description": "Pagination size", + "schema": { + "type": "integer" + } + }, + { + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorage" } } } @@ -1957,24 +4556,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/get", + "name": "publicCloudProject:apiovh:share/get", "required": true } ], - "x-response-identifier": "id" + "x-response-identifier": "id", + "x-expanded-response": "PublicCloudStorageFileFileStorage" }, - "put": { - "summary": "Update an existing managed Rancher service", + "post": { + "summary": "Create a new Public Cloud file storage", "security": [ { "oAuth2AuthCode": [] @@ -1989,16 +4590,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } ], "requestBody": { @@ -2006,19 +4597,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.RancherUpdate" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageCreation" }, "examples": { - "Update rancher to plan STANDARD": { + "Create file storage": { "value": { "targetSpec": { - "iamAuthEnabled": false, - "name": "my_rancher", - "plan": "STANDARD", - "version": "1.0.0" + "accessRules": [ + { + "accessLevel": "READ_WRITE", + "accessTo": "10.0.0.42" + } + ], + "description": "Production data share", + "location": { + "region": "GRA1" + }, + "name": "my-share", + "protocol": "NFS", + "shareNetwork": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" + }, + "shareType": "STANDARD_1AZ", + "size": 100 } }, - "summary": "Request body when updating plan to STANDARD" + "summary": "Create an NFS file storage with access rules" } } } @@ -2030,56 +4634,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.Rancher" - }, - "examples": { - "Update the version of a managed Rancher version": { - "value": { - "createdAt": "2020-12-31T07:39:19Z", - "currentState": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "networking": { - "egressCidrBlocks": [ - "203.0.113.0/24" - ] - }, - "plan": "OVHCLOUD_EDITION", - "region": "EU_WEST_RBX", - "url": "https://aaaaaa.bbbb.rancher.ovhcloud.example", - "usage": { - "datetime": "2020-12-31T09:00:00Z", - "orchestratedVcpus": 16 - }, - "version": "1.0.0" - }, - "currentTasks": [ - { - "id": "aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/d6b6579e-8d60-4487-bf08-8b4ddf98f7d3/task/aad7c39d-ed0e-44c3-9624-096a0ef569f2", - "type": "RANCHER_UPDATE" - } - ], - "id": "d6b6579e-8d60-4487-bf08-8b4ddf98f7d3", - "resourceStatus": "UPDATING", - "targetSpec": { - "iamAuthEnabled": false, - "ipRestrictions": [], - "name": "my_rancher", - "plan": "OVHCLOUD_EDITION", - "version": "1.1.0" - }, - "updatedAt": "2020-12-31T09:14:19Z" - }, - "summary": "Response body when updating the version of a managed Rancher" - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorage" } } } }, - "500": { - "description": "Error 500 response", + "400": { + "description": "Error 400 response", "content": { "application/json": { "schema": { @@ -2097,85 +4658,24 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::BadRequest::InvalidParameter": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::BadRequest::InvalidParameter", + "message": "Invalid parameter in the request" } - } - } - } - } - } - }, - "tags": [ - "Rancher" - ], - "x-badges": [ - { - "color": "green", - "label": "Stable production version" - } - ], - "x-iam-actions": [ - { - "name": "publicCloudProject:apiovh:rancher/edit", - "required": true - } - ] - } - }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials": { - "post": { - "summary": "Reset the admin password", - "security": [ - { - "oAuth2AuthCode": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "projectId", - "description": "Project ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/publicCloud.rancher.Credentials" - }, - "examples": { - "Example": { + }, + "Client::BadRequest::ServiceNotAvailableInRegion": { "value": { - "password": "u}m.ZBA'>g?!D3DD", - "username": "admin" - }, - "summary": "Example" + "class": "Client::BadRequest::ServiceNotAvailableInRegion", + "message": "This service is not available in the selected region" + } } } } } }, - "500": { - "description": "Error 500 response", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { @@ -2193,10 +4693,10 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::Conflict::RegionInMaintenance": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::Conflict::RegionInMaintenance", + "message": "This region is currently in maintenance" } } } @@ -2205,25 +4705,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/adminCredentials/reset", + "name": "publicCloudProject:apiovh:share/create", "required": true } ] } }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan": { - "get": { - "summary": "List available and current plans for the given managed Rancher service", + "/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}": { + "delete": { + "summary": "Delete a Public Cloud file storage", "security": [ { "oAuth2AuthCode": [] @@ -2231,19 +4732,13 @@ ], "parameters": [ { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", - "schema": { - "type": "string" - } - }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", + "in": "path", + "name": "fileStorageId", + "description": "File storage ID", + "required": true, "schema": { - "type": "integer" + "type": "string", + "format": "uuid" } }, { @@ -2254,16 +4749,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } ], "responses": { @@ -2272,46 +4757,42 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.PlanCapability" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorage" + } + } + } + }, + "404": { + "description": "Error 404 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Get plans - can switch to another plan": { - "value": [ - { - "name": "OVHCLOUD_EDITION", - "status": "CURRENT" - }, - { - "name": "STANDARD", - "status": "AVAILABLE" - } - ], - "summary": "Response body when listing plans for a specific rancher that can switch to another plan" - }, - "Get plans - cannot switch to another plan": { - "value": [ - { - "cause": "CANNOT_DOWNGRADE_USING_HIGHER_FEATURES", - "message": "You are currently using STANDARD plan features and cannot downgrade to OVHCLOUD_EDITION plan.", - "name": "OVHCLOUD_EDITION", - "status": "UNAVAILABLE" - }, - { - "name": "STANDARD", - "status": "CURRENT" - } - ], - "summary": "Response body when listing plans for a specific rancher that cannot switch to another plan" + "Client::NotFound::ShareDoesNotExist": { + "value": { + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } } } } } }, - "500": { - "description": "Error 500 response", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { @@ -2329,10 +4810,16 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::Conflict::ResourceAlreadyBeingDeleted": { + "value": { + "class": "Client::Conflict::ResourceAlreadyBeingDeleted", + "message": "Resource is already being deleted" + } + }, + "Client::Conflict::ResourceInInvalidState": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::Conflict::ResourceInInvalidState", + "message": "Resource cannot be modified in its current state" } } } @@ -2341,25 +4828,24 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/capabilities/plan/get", + "name": "publicCloudProject:apiovh:share/delete", "required": true } ] - } - }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version": { + }, "get": { - "summary": "List available and current versions for the given managed Rancher service", + "summary": "Get a Public Cloud file storage", "security": [ { "oAuth2AuthCode": [] @@ -2367,19 +4853,13 @@ ], "parameters": [ { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", - "schema": { - "type": "string" - } - }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", + "in": "path", + "name": "fileStorageId", + "description": "File storage ID", + "required": true, "schema": { - "type": "integer" + "type": "string", + "format": "uuid" } }, { @@ -2390,16 +4870,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } ], "responses": { @@ -2408,40 +4878,73 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.VersionCapability" - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorage" }, "examples": { "Example": { - "value": [ - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", - "name": "1.0.0", - "status": "AVAILABLE" + "value": { + "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", + "createdAt": "2026-02-10T14:30:00Z", + "currentState": { + "accessRules": [ + { + "accessLevel": "READ_WRITE", + "accessTo": "10.0.0.42", + "createdAt": "2026-02-10T14:32:00Z", + "id": "e5f6a7b8-c901-2345-def6-789012abcdef", + "state": "ACTIVE" + } + ], + "description": "Production data share", + "exportLocations": [ + { + "path": "10.0.0.1:/shares/share-abc123", + "preferred": true + } + ], + "location": { + "region": "GRA1" + }, + "name": "my-share", + "protocol": "NFS", + "shareNetwork": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" + }, + "shareType": "STANDARD_1AZ", + "size": 100 }, - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", - "name": "1.1.0", - "status": "AVAILABLE" + "currentTasks": null, + "id": "d4e5f6a7-b890-1234-cdef-567890abcdef", + "resourceStatus": "READY", + "targetSpec": { + "accessRules": [ + { + "accessLevel": "READ_WRITE", + "accessTo": "10.0.0.42" + } + ], + "description": "Production data share", + "location": { + "region": "GRA1" + }, + "name": "my-share", + "protocol": "NFS", + "shareNetwork": { + "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" + }, + "shareType": "STANDARD_1AZ", + "size": 100 }, - { - "cause": "CANNOT_UPGRADE_MULTIPLE_VERSIONS", - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.2.0", - "message": "You cannot upgrade directly to this version, please upgrade to the next minor first.", - "name": "1.2.0", - "status": "UNAVAILABLE" - } - ], + "updatedAt": "2026-02-10T14:35:00Z" + }, "summary": "Example" } } } } }, - "500": { - "description": "Error 500 response", + "404": { + "description": "Error 404 response", "content": { "application/json": { "schema": { @@ -2459,10 +4962,10 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::NotFound::ShareDoesNotExist": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" } } } @@ -2471,25 +4974,25 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/capabilities/version/get", + "name": "publicCloudProject:apiovh:share/get", "required": true } - ] - } - }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/event": { - "get": { - "summary": "List all events related to the managed Rancher service", + ], + "x-response-identifier": "id" + }, + "put": { + "summary": "Update an existing Public Cloud file storage", "security": [ { "oAuth2AuthCode": [] @@ -2497,19 +5000,13 @@ ], "parameters": [ { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", - "schema": { - "type": "string" - } - }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", + "in": "path", + "name": "fileStorageId", + "description": "File storage ID", + "required": true, "schema": { - "type": "integer" + "type": "string", + "format": "uuid" } }, { @@ -2520,54 +5017,82 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageUpdate" + }, + "examples": { + "Update file storage": { + "value": { + "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", + "targetSpec": { + "accessRules": [ + { + "accessLevel": "READ_WRITE", + "accessTo": "10.0.0.42" + }, + { + "accessLevel": "READ_ONLY", + "accessTo": "10.0.0.43" + } + ], + "name": "my-share-renamed", + "size": 200 + } + }, + "summary": "Update name, extend size, or modify access rules" + } + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/common.Event" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorage" + } + } + } + }, + "400": { + "description": "Error 400 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Example": { - "value": [ - { - "createdAt": "2020-12-31T20:10:01Z", - "kind": "RANCHER_UPDATE", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4/task/8e2478fa-af3b-4576-b344-af3546f52b5b", - "message": "Task started to update Rancher", - "type": "TASK_START" - }, - { - "createdAt": "2020-12-01T20:10:00Z", - "kind": "RANCHER_UPDATE", - "message": "Rancher target spec updated", - "type": "TARGET_SPEC_UPDATE" - } - ], - "summary": "Example" + "Client::BadRequest::InvalidParameter": { + "value": { + "class": "Client::BadRequest::InvalidParameter", + "message": "Invalid parameter in the request" + } } } } } }, - "500": { - "description": "Error 500 response", + "404": { + "description": "Error 404 response", "content": { "application/json": { "schema": { @@ -2585,10 +5110,45 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::NotFound::ShareDoesNotExist": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } + } + } + } + } + }, + "409": { + "description": "Error 409 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Client::Conflict::ChecksumMismatch": { + "value": { + "class": "Client::Conflict::ChecksumMismatch", + "message": "Checksum mismatch — a concurrent update was detected. Refresh the resource and retry" + } + }, + "Client::Conflict::ResourceInInvalidState": { + "value": { + "class": "Client::Conflict::ResourceInInvalidState", + "message": "Resource cannot be modified in its current state" } } } @@ -2597,25 +5157,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/event/get", + "name": "publicCloudProject:apiovh:share/edit", "required": true } ] } }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/task": { + "/publicCloud/project/{projectId}/storage/file/snapshot": { "get": { - "summary": "List all asynchronous operations related to the managed Rancher service", + "summary": "List Public Cloud file storage snapshots", "security": [ { "oAuth2AuthCode": [] @@ -2646,66 +5207,126 @@ "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshot" + } + } + } + } + } + }, + "tags": [ + "Storage", + "File" + ], + "x-badges": [ + { + "color": "blue", + "label": "Alpha version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:storage/file/snapshot/get", + "required": true + } + ], + "x-response-identifier": "id", + "x-expanded-response": "PublicCloudStorageFileFileStorageSnapshot" + }, + "post": { + "summary": "Create a new Public Cloud file storage snapshot", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ { "in": "path", - "name": "rancherId", - "description": "Rancher ID", + "name": "projectId", + "description": "Project ID", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotCreation" + }, + "examples": { + "Create snapshot": { + "value": { + "targetSpec": { + "description": "Daily backup snapshot", + "name": "my-share-snapshot", + "share": { + "id": "d4e5f6a7-b890-1234-cdef-567890abcdef" + } + } + }, + "summary": "Create a snapshot of a file storage" + } + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/common.Task" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshot" + } + } + } + }, + "400": { + "description": "Error 400 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Example": { - "value": [ - { - "createdAt": "2020-12-01T20:00:00Z", - "errors": [], - "id": "6ffe3c08-3b65-4ede-a0e6-8b137e333e54", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4", - "message": "Cloud project a755273a123456788da6d6fcc71a95f3: update rancher 132645az-9c16-4021-b920-dfd22d8848c4", - "progress": [ - { - "name": "test", - "status": "RUNNING" - }, - { - "name": "another step", - "status": "DONE" - }, - { - "name": "yet another step", - "status": "PENDING" - } - ], - "startedAt": "2020-12-01T20:01:00Z", - "status": "RUNNING", - "type": "PlanUpdate", - "updatedAt": "2020-12-01T20:02:00Z" - } - ], - "summary": "Example" + "Client::BadRequest::ServiceNotAvailableInRegion": { + "value": { + "class": "Client::BadRequest::ServiceNotAvailableInRegion", + "message": "This service is not available in the selected region" + } } } } } }, - "500": { - "description": "Error 500 response", + "404": { + "description": "Error 404 response", "content": { "application/json": { "schema": { @@ -2723,10 +5344,39 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::NotFound::ShareDoesNotExist": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } + } + } + } + } + }, + "409": { + "description": "Error 409 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Client::Conflict::RegionInMaintenance": { + "value": { + "class": "Client::Conflict::RegionInMaintenance", + "message": "This region is currently in maintenance" } } } @@ -2735,27 +5385,26 @@ } }, "tags": [ - "Rancher" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:rancher/task/get", + "name": "publicCloudProject:apiovh:storage/file/snapshot/create", "required": true } - ], - "x-response-identifier": "id", - "x-expanded-response": "CommonTask" + ] } }, - "/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}": { - "get": { - "summary": "Get a specific task related to the managed Rancher service", + "/publicCloud/project/{projectId}/storage/file/snapshot/{snapshotId}": { + "delete": { + "summary": "Delete a Public Cloud file storage snapshot", "security": [ { "oAuth2AuthCode": [] @@ -2773,18 +5422,8 @@ }, { "in": "path", - "name": "rancherId", - "description": "Rancher ID", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "in": "path", - "name": "taskId", - "description": "Task ID", + "name": "snapshotId", + "description": "Snapshot ID", "required": true, "schema": { "type": "string", @@ -2798,43 +5437,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/common.Task" - }, - "examples": { - "Example": { - "value": { - "createdAt": "2020-12-01T20:00:00Z", - "errors": [], - "id": "6ffe3c08-3b65-4ede-a0e6-8b137e333e54", - "link": "/v2/publicCloud/project/a755273a123456788da6d6fcc71a95f3/rancher/132645az-9c16-4021-b920-dfd22d8848c4", - "message": "Cloud project a755273a123456788da6d6fcc71a95f3: update rancher 132645az-9c16-4021-b920-dfd22d8848c4", - "progress": [ - { - "name": "test", - "status": "RUNNING" - }, - { - "name": "another step", - "status": "DONE" - }, - { - "name": "yet another step", - "status": "PENDING" - } - ], - "startedAt": "2020-12-01T20:01:00Z", - "status": "RUNNING", - "type": "RANCHER_UPDATE", - "updatedAt": "2020-12-01T20:02:00Z" - }, - "summary": "Example" - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshot" } } } }, - "500": { - "description": "Error 500 response", + "404": { + "description": "Error 404 response", "content": { "application/json": { "schema": { @@ -2852,94 +5461,52 @@ } }, "examples": { - "Server::InternalServerError::Maintenance": { + "Client::NotFound::ShareDoesNotExist": { "value": { - "class": "Server::InternalServerError::Maintenance", - "message": "The Managed Rancher Service API is in maintenance mode. Only GET endpoints are available." + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } + }, + "Client::NotFound::SnapshotDoesNotExist": { + "value": { + "class": "Client::NotFound::SnapshotDoesNotExist", + "message": "Snapshot not found" } } } } } - } - }, - "tags": [ - "Rancher" - ], - "x-badges": [ - { - "color": "green", - "label": "Stable production version" - } - ], - "x-iam-actions": [ - { - "name": "publicCloudProject:apiovh:rancher/task/get", - "required": true - } - ], - "x-response-identifier": "id" - } - }, - "/publicCloud/project/{projectId}/reference/rancher/plan": { - "get": { - "summary": "List available plans for creating a managed Rancher service", - "security": [ - { - "oAuth2AuthCode": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", - "schema": { - "type": "string" - } - }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", - "schema": { - "type": "integer" - } }, - { - "in": "path", - "name": "projectId", - "description": "Project ID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "successful operation", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.PlanReference" + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Example": { - "value": [ - { - "name": "OVHCLOUD_EDITION", - "status": "AVAILABLE" - }, - { - "name": "STANDARD", - "status": "AVAILABLE" - } - ], - "summary": "Example" + "Client::Conflict::ResourceAlreadyBeingDeleted": { + "value": { + "class": "Client::Conflict::ResourceAlreadyBeingDeleted", + "message": "Resource is already being deleted" + } + }, + "Client::Conflict::ResourceInInvalidState": { + "value": { + "class": "Client::Conflict::ResourceInInvalidState", + "message": "Resource cannot be modified in its current state" + } } } } @@ -2947,26 +5514,24 @@ } }, "tags": [ - "Rancher", - "Reference" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:reference/rancher/plan/get", + "name": "publicCloudProject:apiovh:storage/file/snapshot/delete", "required": true } ] - } - }, - "/publicCloud/project/{projectId}/reference/rancher/version": { + }, "get": { - "summary": "List available versions for creating a managed Rancher service", + "summary": "Get a Public Cloud file storage snapshot", "security": [ { "oAuth2AuthCode": [] @@ -2974,28 +5539,22 @@ ], "parameters": [ { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, "schema": { "type": "string" } }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", - "schema": { - "type": "integer" - } - }, { "in": "path", - "name": "projectId", - "description": "Project ID", + "name": "snapshotId", + "description": "Snapshot ID", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -3005,57 +5564,98 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.VersionReference" - } + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshot" }, "examples": { "Example": { - "value": [ - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", - "name": "1.0.0", - "status": "AVAILABLE" + "value": { + "checksum": "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6a7", + "createdAt": "2026-02-10T15:00:00Z", + "currentState": { + "description": "Daily backup snapshot", + "location": { + "region": "GRA1" + }, + "name": "my-share-snapshot", + "share": { + "id": "d4e5f6a7-b890-1234-cdef-567890abcdef" + }, + "size": 1 }, - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", - "name": "1.1.0", - "status": "AVAILABLE" - } - ], + "currentTasks": null, + "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "resourceStatus": "READY", + "targetSpec": { + "description": "Daily backup snapshot", + "name": "my-share-snapshot", + "share": { + "id": "d4e5f6a7-b890-1234-cdef-567890abcdef" + } + }, + "updatedAt": "2026-02-10T15:05:00Z" + }, "summary": "Example" } } } } + }, + "404": { + "description": "Error 404 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "examples": { + "Client::NotFound::ShareDoesNotExist": { + "value": { + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } + }, + "Client::NotFound::SnapshotDoesNotExist": { + "value": { + "class": "Client::NotFound::SnapshotDoesNotExist", + "message": "Snapshot not found" + } + } + } + } + } } }, "tags": [ - "Rancher", - "Reference" + "Storage", + "File" ], "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "publicCloudProject:apiovh:reference/rancher/version/get", + "name": "publicCloudProject:apiovh:storage/file/snapshot/get", "required": true } - ] - } - }, - "/publicCloud/reference/rancher/plan": { - "get": { - "summary": "List available plans for creating a managed Rancher service", - "deprecated": true, - "x-deprecation-date": "2024-05-20T00:00:00Z", - "x-deletion-date": "2024-09-01T00:00:00Z", - "x-replacement-route": "/v2/publicCloud/project/{projectId}/reference/rancher", + ], + "x-response-identifier": "id" + }, + "put": { + "summary": "Update an existing Public Cloud file storage snapshot", "security": [ { "oAuth2AuthCode": [] @@ -3063,119 +5663,123 @@ ], "parameters": [ { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", + "in": "path", + "name": "projectId", + "description": "Project ID", + "required": true, "schema": { "type": "string" } }, { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", + "in": "path", + "name": "snapshotId", + "description": "Snapshot ID", + "required": true, "schema": { - "type": "integer" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshotUpdate" + }, + "examples": { + "Update snapshot": { + "value": { + "checksum": "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6a7", + "targetSpec": { + "description": "Updated backup snapshot", + "name": "my-share-snapshot-renamed" + } + }, + "summary": "Update snapshot name and description" + } + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.PlanReference" + "$ref": "#/components/schemas/publicCloud.storage.file.FileStorageSnapshot" + } + } + } + }, + "404": { + "description": "Error 404 response", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Example": { - "value": [ - { - "name": "OVHCLOUD_EDITION", - "status": "AVAILABLE" - }, - { - "name": "STANDARD", - "status": "AVAILABLE" - } - ], - "summary": "Example" + "Client::NotFound::ShareDoesNotExist": { + "value": { + "class": "Client::NotFound::ShareDoesNotExist", + "message": "File share not found" + } + }, + "Client::NotFound::SnapshotDoesNotExist": { + "value": { + "class": "Client::NotFound::SnapshotDoesNotExist", + "message": "Snapshot not found" + } } } } } - } - }, - "tags": [ - "Reference" - ], - "x-badges": [ - { - "color": "red", - "label": "Deprecated, will be removed" - } - ] - } - }, - "/publicCloud/reference/rancher/version": { - "get": { - "summary": "List available versions for creating a managed Rancher service", - "deprecated": true, - "x-deprecation-date": "2024-05-20T00:00:00Z", - "x-deletion-date": "2024-09-01T00:00:00Z", - "x-replacement-route": "/v2/publicCloud/project/{projectId}/reference/rancher", - "security": [ - { - "oAuth2AuthCode": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "X-Pagination-Cursor", - "description": "Pagination cursor", - "schema": { - "type": "string" - } }, - { - "in": "header", - "name": "X-Pagination-Size", - "description": "Pagination size", - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "successful operation", + "409": { + "description": "Error 409 response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/publicCloud.rancher.VersionReference" + "type": "object", + "description": "Common error model", + "properties": { + "class": { + "type": "string", + "description": "Class of the error" + }, + "message": { + "type": "string", + "description": "Error message" + } } }, "examples": { - "Example": { - "value": [ - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.0.0", - "name": "1.0.0", - "status": "AVAILABLE" - }, - { - "changelogUrl": "https://github.com/rancher/rancher/releases/tag/v1.1.0", - "name": "1.1.0", - "status": "AVAILABLE" - } - ], - "summary": "Example" + "Client::Conflict::ChecksumMismatch": { + "value": { + "class": "Client::Conflict::ChecksumMismatch", + "message": "Checksum mismatch — a concurrent update was detected. Refresh the resource and retry" + } + }, + "Client::Conflict::ResourceInInvalidState": { + "value": { + "class": "Client::Conflict::ResourceInInvalidState", + "message": "Resource cannot be modified in its current state" + } } } } @@ -3183,12 +5787,19 @@ } }, "tags": [ - "Reference" + "Storage", + "File" ], "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "blue", + "label": "Alpha version" + } + ], + "x-iam-actions": [ + { + "name": "publicCloudProject:apiovh:storage/file/snapshot/edit", + "required": true } ] } diff --git a/internal/assets/api-schemas/domain.json b/internal/assets/api-schemas/domain.json index 86e0b638..618021fa 100644 --- a/internal/assets/api-schemas/domain.json +++ b/internal/assets/api-schemas/domain.json @@ -11,7 +11,7 @@ }, "servers": [ { - "url": "https://eu.api.ovh.com/1.0" + "url": "https://eu.api.ovh.com/v1" } ], "components": { @@ -76,15 +76,19 @@ }, "dnssec.KeyAlgorithmEnum": { "type": "integer", - "description": "DNSSEC Algorithm\n5: RSASHA1\n7: RSASHA1-NSEC3-SHA1\n8: RSASHA256\n10: RSASHA512\n13: ECDSAP256SHA256\n14: ECDSAP384SHA384\n15: ED25519", + "description": "DNSSEC Algorithm\n3: DSA\n5: RSASHA1\n6: DSA-NSEC3-SHA1\n7: RSASHA1-NSEC3-SHA1\n8: RSASHA256\n10: RSASHA512\n12: ECC-GOST\n13: ECDSAP256SHA256\n14: ECDSAP384SHA384\n15: ED25519\n16: ED448", "enum": [ + 3, 5, + 6, 7, 8, 10, + 12, 13, 14, - 15 + 15, + 16 ] }, "dnssec.KeyFlagEnum": { @@ -1200,10 +1204,12 @@ "DnssecResigning", "DnssecRollKsk", "DnssecRollZsk", + "ZoneCheck", "ZoneCreate", "ZoneCut", "ZoneDelete", "ZoneImport", + "ZoneRefresh", "ZoneRestore" ] }, @@ -2265,6 +2271,15 @@ "type": "object", "description": "The registry configurations applied to a domain name", "properties": { + "extension_type": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.extensions.registryConfigurations.ExtensionTypeEnum" + } + ], + "description": "The type of an extension (cctld or gtld)", + "readOnly": true + }, "isPremiumSupported": { "type": "boolean", "description": "Whether premium domains are supported by the registry and handled by OVHcloud", @@ -2281,6 +2296,14 @@ } } }, + "domain.extensions.registryConfigurations.ExtensionTypeEnum": { + "type": "string", + "description": "The type of an extension (country-code TLD or generic TLD)", + "enum": [ + "cctld", + "gtld" + ] + }, "domain.extensions.registryConfigurations.LabelDomainRegistryConfiguration": { "type": "object", "description": "The registry configurations applied to the domain name label", @@ -2692,6 +2715,320 @@ "nameServers" ] }, + "domain.order.ContactOwner": { + "type": "object", + "description": "Owner contact reference for a domain order: an OVH contact resource, not a NIC handle.", + "properties": { + "id": { + "type": "integer", + "description": "Numeric identifier of the OVH contact resource (e.g. obtained from /me/contact). Distinct from a NIC handle such as xxxxx-ovh.", + "nullable": true + } + } + }, + "domain.order.Contacts": { + "type": "object", + "description": "Admin, tech and owner contacts for a domain order. admin and tech are OVH NIC handles (e.g. xxxxx-ovh); owner is an OVH contact resource referenced by its numeric id (see /me/contact), not a NIC handle. Billing is forced to the customer code by the server and is not exposed.", + "properties": { + "admin": { + "type": "string", + "description": "Administrative contact, given as an OVH NIC handle (e.g. xxxxx-ovh). Defaults to the calling customer's NIC if omitted.", + "nullable": true + }, + "owner": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.ContactOwner" + } + ], + "description": "Owner contact of the domain. Unlike admin/tech which are NIC handles, the owner is an OVH contact resource referenced by its numeric id.", + "nullable": true + }, + "tech": { + "type": "string", + "description": "Technical contact, given as an OVH NIC handle (e.g. xxxxx-ovh). Defaults to the admin contact if omitted.", + "nullable": true + } + } + }, + "domain.order.Contract": { + "type": "object", + "description": "A contract (terms) the customer subscribes to when placing a domain order", + "properties": { + "name": { + "type": "string", + "description": "Name of the contract (e.g. registration terms, general conditions of service)", + "readOnly": true + }, + "url": { + "type": "string", + "description": "URL to the contract terms document (PDF)", + "readOnly": true + } + } + }, + "domain.order.OrderRequest": { + "type": "object", + "description": "Payload to order a new domain name", + "properties": { + "contacts": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Contacts" + } + ], + "description": "Admin, tech and owner contacts", + "nullable": true + }, + "dns": { + "type": "array", + "description": "List of DNS servers (hostnames) to set on the domain. Optional: if omitted, OVHcloud's recommended DNS servers for the domain are used.", + "nullable": true, + "items": { + "type": "string" + } + }, + "domain": { + "type": "string", + "description": "Fully-qualified domain name to order, including the extension (e.g. example.com)" + }, + "duration": { + "type": "string", + "description": "Order duration in ISO-8601 format, whole years only (e.g. P1Y). Allowed values depend on the extension's registry configuration; an unsupported duration is rejected. Defaults to P1Y if omitted.", + "nullable": true, + "format": "duration" + }, + "priceAcknowledge": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.PriceAcknowledge" + } + ], + "description": "Price the customer acknowledged before placing the order. Required for aftermarket or premium domains, optional otherwise. Its value/currency must equal the retail price quoted for this domain (e.g. via a dryRun order); a mismatch rejects the order.", + "nullable": true + }, + "promoCodes": { + "type": "array", + "description": "Promotion codes to apply. Optional.", + "nullable": true, + "items": { + "type": "string" + } + }, + "waiveRetractationPeriod": { + "type": "boolean", + "description": "Acknowledgment that the customer waives the legal retractation period. Must be set to true to place the order.", + "nullable": true + }, + "zone": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.ZoneOptions" + } + ], + "description": "DNS zone options", + "nullable": true + } + }, + "required": [ + "domain" + ] + }, + "domain.order.OrderResponse": { + "type": "object", + "description": "Response returned after placing a domain order", + "properties": { + "contacts": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Contacts" + } + ], + "description": "Contacts attached to the order", + "nullable": true, + "readOnly": true + }, + "contracts": { + "type": "array", + "description": "Legal contracts (terms, as PDFs) the customer subscribes to with this order", + "nullable": true, + "items": { + "$ref": "#/components/schemas/domain.order.Contract" + }, + "readOnly": true + }, + "dns": { + "type": "array", + "description": "DNS servers set on the domain", + "nullable": true, + "items": { + "type": "string" + }, + "readOnly": true + }, + "domain": { + "type": "string", + "description": "Ordered domain name", + "readOnly": true + }, + "duration": { + "type": "string", + "description": "Order duration in ISO-8601 format, whole years only (e.g. P1Y)", + "format": "duration", + "readOnly": true + }, + "orderId": { + "type": "integer", + "description": "Identifier of the created order, used with url to finalize and pay it", + "nullable": true, + "readOnly": true + }, + "pricing": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Pricing" + } + ], + "description": "Pricing breakdown of the order", + "readOnly": true + }, + "url": { + "type": "string", + "description": "Payment/finalization URL where the customer completes and pays the order", + "nullable": true, + "readOnly": true + }, + "zone": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.ZoneOptions" + } + ], + "description": "DNS zone options applied to the order", + "nullable": true, + "readOnly": true + } + } + }, + "domain.order.Price": { + "type": "object", + "description": "Price with its currency and textual representation as returned by domain/order", + "properties": { + "currencyCode": { + "allOf": [ + { + "$ref": "#/components/schemas/order.CurrencyCodeEnum" + } + ], + "description": "Currency code", + "readOnly": true + }, + "text": { + "type": "string", + "description": "Human-readable price with currency, e.g. \"6.08 EUR\"", + "readOnly": true + }, + "value": { + "type": "number", + "description": "The effective price as a number, e.g. 6.08", + "readOnly": true + } + } + }, + "domain.order.PriceAcknowledge": { + "type": "object", + "description": "Minimal price payload sent by the client to acknowledge the price seen, before placing the actual order", + "properties": { + "currencyCode": { + "allOf": [ + { + "$ref": "#/components/schemas/order.CurrencyCodeEnum" + } + ], + "description": "Currency code of the acknowledged price" + }, + "value": { + "type": "number", + "description": "The effective price acknowledged by the client" + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "domain.order.Pricing": { + "type": "object", + "description": "Pricing breakdown with and without tax", + "properties": { + "basePriceWithoutTax": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Price" + } + ], + "description": "Price excluding tax before any promotion", + "readOnly": true + }, + "discount": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Price" + } + ], + "description": "Total reduction applied by promotions, as a positive amount (0 if none)", + "readOnly": true + }, + "finalPriceWithTax": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Price" + } + ], + "description": "Final price including tax, after any reduction", + "readOnly": true + }, + "finalPriceWithoutTax": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Price" + } + ], + "description": "Final price excluding tax, after any reduction", + "readOnly": true + }, + "tax": { + "allOf": [ + { + "$ref": "#/components/schemas/domain.order.Price" + } + ], + "description": "Tax amount on the final price", + "readOnly": true + } + } + }, + "domain.order.ZoneOptions": { + "type": "object", + "description": "DNS zone options for a domain order", + "properties": { + "anycast": { + "type": "boolean", + "description": "Enable Anycast on the DNS zone. Applied only when a new zone is created (create=true and no existing zone); ignored otherwise.", + "nullable": true + }, + "create": { + "type": "boolean", + "description": "Whether to create the DNS zone along with the domain. Defaults to true if omitted.", + "nullable": true + }, + "dnssec": { + "type": "boolean", + "description": "Enable DNSSEC on the DNS zone. Applied only when a new zone is created (create=true and no existing zone); ignored otherwise.", + "nullable": true + } + } + }, "domain.outgoingTransfer.Approve": { "type": "object", "description": "Definition of Outgoing Transfer applying to a domain name", @@ -2926,14 +3263,17 @@ "DKIM", "DMARC", "DNAME", + "HTTPS", "LOC", "MX", "NAPTR", "NS", "PTR", + "RP", "SPF", "SRV", "SSHFP", + "SVCB", "TLSA", "TXT" ] @@ -3483,6 +3823,16 @@ "format": "uuid", "readOnly": true }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/iam.ResourceMetadata.StateEnum" + } + ], + "description": "Resource state", + "nullable": true, + "readOnly": true + }, "tags": { "type": "object", "description": "Resource tags. Tags that were internally computed are prefixed with ovh:", @@ -3499,6 +3849,16 @@ } } }, + "iam.ResourceMetadata.StateEnum": { + "type": "string", + "description": "Resource state", + "enum": [ + "EXPIRED", + "IN_CREATION", + "OK", + "SUSPENDED" + ] + }, "iam.resource.TagFilter": { "type": "object", "description": "Resource tag filter", @@ -3581,9 +3941,9 @@ }, "macAddress": { "type": "string", - "description": "MAC address (e.g., 2001:4860:4860::8844)", + "description": "MAC address (e.g., 00:00:5e:00:53:01)", "format": "mac-address", - "example": "2001:4860:4860::8888. 2001:4860:4860::8844" + "example": "00:00:5e:00:53:01" }, "nichandle.CountryEnum": { "type": "string", @@ -3971,6 +4331,11 @@ "nullable": true, "readOnly": true }, + "displayName": { + "type": "string", + "description": "Display name shown instead of the organisation name.", + "nullable": true + }, "email": { "type": "string", "description": "Email address", @@ -4161,6 +4526,27 @@ "incomplete" ] }, + "order.CurrencyCodeEnum": { + "type": "string", + "description": "Currency code", + "enum": [ + "AUD", + "CAD", + "CZK", + "EUR", + "GBP", + "INR", + "LTL", + "MAD", + "N/A", + "PLN", + "SGD", + "TND", + "USD", + "XOF", + "points" + ] + }, "phoneNumber": { "type": "string", "description": "Phone number", @@ -4357,6 +4743,14 @@ "type": "string", "description": "Commentary about your termination request" }, + "commentaryFutureUse": { + "type": "string", + "description": "Commentary about your future use" + }, + "commentaryReason": { + "type": "string", + "description": "Commentary about your reason for termination request" + }, "futureUse": { "allOf": [ { @@ -4477,6 +4871,25 @@ } } } + }, + "securitySchemes": { + "oAuth2AuthCode": { + "type": "oauth2", + "description": "Oauth2", + "x-client-id": "1bb9c7df371741c0", + "x-client-secret": "a5b4de870aca620d10fbf63cd18d205b", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.eu.ovhcloud.com/oauth2/authorize", + "tokenUrl": "https://auth.eu.ovhcloud.com/oauth2/token", + "scopes": { + "account/all": "Manage your account", + "all": "Manage your whole account and all your services", + "services/all": "Manage your services lifecycle and billing" + } + } + } + } } }, "paths": { @@ -5425,6 +5838,60 @@ ] } }, + "/domain/order/create": { + "post": { + "summary": "Order a new domain name", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "dryRun", + "description": "If true, simulate the order and return the pricing without actually placing it. Default to false.", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/domain.order.OrderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/domain.order.OrderResponse" + } + } + } + } + }, + "x-badges": [ + { + "color": "orange", + "label": "Internal use only" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:domain/order/create", + "required": true + } + ] + } + }, "/domain/zone": { "get": { "operationId": "getZones", diff --git a/internal/assets/api-schemas/me.json b/internal/assets/api-schemas/me.json index 3bce87dc..3c04b42d 100644 --- a/internal/assets/api-schemas/me.json +++ b/internal/assets/api-schemas/me.json @@ -1632,12 +1632,23 @@ "name" ] }, + "auth.GroupUser": { + "type": "object", + "description": "An IAM Group User", + "properties": { + "user": { + "type": "string", + "description": "Username to add to the group" + } + } + }, "auth.HTTPMethodEnum": { "type": "string", "description": "All HTTP methods available", "enum": [ "DELETE", "GET", + "PATCH", "POST", "PUT" ] @@ -1921,6 +1932,32 @@ "UNPRIVILEGED" ] }, + "auth.ServiceProviderInfo": { + "type": "object", + "description": "An IAM Federation Provider", + "properties": { + "assertionConsumerServiceUrl": { + "type": "string", + "description": "URL of the SAMLv2 Assertion Consumer Service for OVHcloud", + "readOnly": true + }, + "entityId": { + "type": "string", + "description": "Entity ID of OVHcloud as a service provider ", + "readOnly": true + }, + "metadata": { + "type": "string", + "description": "XML metadata of OVHcloud as a service provider", + "readOnly": true + }, + "metadataUrl": { + "type": "string", + "description": "URL of the SAMLv2 metadata for OVHcloud", + "readOnly": true + } + } + }, "auth.User": { "type": "object", "description": "An IAM User", @@ -1942,7 +1979,15 @@ }, "group": { "type": "string", - "description": "User's group" + "description": "User's main group" + }, + "groups": { + "type": "array", + "description": "User's groups", + "items": { + "type": "string" + }, + "readOnly": true }, "lastUpdate": { "type": "string", @@ -2095,6 +2140,20 @@ "format": "date-time", "readOnly": true }, + "eInvoicingId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "eInvoicingStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.EInvoicingStatusEnum" + } + ], + "nullable": true, + "readOnly": true + }, "orderId": { "type": "integer", "readOnly": true @@ -2213,6 +2272,137 @@ "purchase-web" ] }, + "billing.CorrectiveInvoice": { + "type": "object", + "description": "Details about a CorrectiveInvoice", + "properties": { + "category": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.CategoryEnum" + } + ], + "readOnly": true + }, + "correctedInvoiceId": { + "type": "string", + "readOnly": true + }, + "correctiveInvoiceId": { + "type": "string", + "readOnly": true + }, + "date": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "eInvoicingId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "eInvoicingStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.EInvoicingStatusEnum" + } + ], + "nullable": true, + "readOnly": true + }, + "orderId": { + "type": "integer", + "readOnly": true + }, + "password": { + "type": "string", + "readOnly": true + }, + "pdfUrl": { + "type": "string", + "readOnly": true + }, + "priceWithTax": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, + "priceWithoutTax": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, + "tax": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, + "url": { + "type": "string", + "readOnly": true + } + } + }, + "billing.CorrectiveInvoiceDetail": { + "type": "object", + "description": "Information about a Bill entry", + "properties": { + "correctiveInvoiceDetailId": { + "type": "string", + "readOnly": true + }, + "description": { + "type": "string", + "readOnly": true + }, + "domain": { + "type": "string", + "readOnly": true + }, + "periodEnd": { + "type": "string", + "nullable": true, + "format": "date", + "readOnly": true + }, + "periodStart": { + "type": "string", + "nullable": true, + "format": "date", + "readOnly": true + }, + "quantity": { + "type": "integer", + "readOnly": true + }, + "totalPrice": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, + "unitPrice": { + "allOf": [ + { + "$ref": "#/components/schemas/order.LongPrice" + } + ], + "readOnly": true + } + } + }, "billing.CreditBalance": { "type": "object", "description": "Credit balance applied on an Order", @@ -2319,103 +2509,247 @@ } } }, - "billing.FidelityAccount": { + "billing.DownPaymentInvoice": { "type": "object", - "description": "Balance of the fidelity account", + "description": "Details about a DownPaymentInvoice", "properties": { - "alertThreshold": { - "type": "integer", - "nullable": true - }, - "balance": { - "type": "integer", + "category": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.CategoryEnum" + } + ], "readOnly": true }, - "canBeCredited": { - "type": "boolean", + "date": { + "type": "string", + "format": "date-time", "readOnly": true }, - "lastUpdate": { + "downPaymentInvoiceId": { "type": "string", - "format": "date-time", "readOnly": true }, - "openDate": { + "eInvoicingId": { "type": "string", - "format": "date-time", + "nullable": true, "readOnly": true - } - } - }, - "billing.FidelityMovement": { - "type": "object", - "description": "Details about a fidelity account", - "properties": { - "amount": { - "type": "integer", + }, + "eInvoicingStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.EInvoicingStatusEnum" + } + ], + "nullable": true, "readOnly": true }, - "balance": { + "orderId": { "type": "integer", "readOnly": true }, - "date": { + "password": { "type": "string", - "format": "date-time", + "format": "password", "readOnly": true }, - "description": { + "pdfUrl": { "type": "string", "readOnly": true }, - "movementId": { - "type": "integer", - "readOnly": true - }, - "operation": { + "priceWithTax": { "allOf": [ { - "$ref": "#/components/schemas/billing.fidelityAccount.OperationEnum" + "$ref": "#/components/schemas/order.Price" } ], "readOnly": true }, - "order": { - "type": "integer", + "priceWithoutTax": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], "readOnly": true }, - "previousBalance": { - "type": "integer", - "readOnly": true - } - } - }, - "billing.ItemDetail": { - "type": "object", - "description": "Extensions of a detail", - "properties": { - "order": { + "tax": { "allOf": [ { - "$ref": "#/components/schemas/billing.ItemDetail.Order" + "$ref": "#/components/schemas/order.Price" } ], "readOnly": true + }, + "url": { + "type": "string", + "readOnly": true } } }, - "billing.ItemDetail.Order": { + "billing.DownPaymentInvoiceDetail": { "type": "object", - "description": "Order data for this Detail", + "description": "Information about a DownPaymentInvoice entry", "properties": { - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/billing.ItemDetail.OrderActionEnum" - } - ], - "description": "The meaning of this order detail", - "nullable": true + "description": { + "type": "string", + "readOnly": true + }, + "domain": { + "type": "string", + "readOnly": true + }, + "downPaymentInvoiceDetailId": { + "type": "string", + "readOnly": true + }, + "periodEnd": { + "type": "string", + "nullable": true, + "format": "date", + "readOnly": true + }, + "periodStart": { + "type": "string", + "nullable": true, + "format": "date", + "readOnly": true + }, + "quantity": { + "type": "integer", + "readOnly": true + }, + "totalPrice": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, + "unitPrice": { + "allOf": [ + { + "$ref": "#/components/schemas/order.LongPrice" + } + ], + "readOnly": true + } + } + }, + "billing.EInvoicingStatusEnum": { + "type": "string", + "description": "List of available eInvoicing Status types", + "enum": [ + "accepted", + "error", + "ignored", + "invalid", + "new", + "ok", + "processing", + "readyToSubmit", + "rejected", + "submitted" + ] + }, + "billing.FidelityAccount": { + "type": "object", + "description": "Balance of the fidelity account", + "properties": { + "alertThreshold": { + "type": "integer", + "nullable": true + }, + "balance": { + "type": "integer", + "readOnly": true + }, + "canBeCredited": { + "type": "boolean", + "readOnly": true + }, + "lastUpdate": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "openDate": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + }, + "billing.FidelityMovement": { + "type": "object", + "description": "Details about a fidelity account", + "properties": { + "amount": { + "type": "integer", + "readOnly": true + }, + "balance": { + "type": "integer", + "readOnly": true + }, + "date": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "description": { + "type": "string", + "readOnly": true + }, + "movementId": { + "type": "integer", + "readOnly": true + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.fidelityAccount.OperationEnum" + } + ], + "readOnly": true + }, + "order": { + "type": "integer", + "readOnly": true + }, + "previousBalance": { + "type": "integer", + "readOnly": true + } + } + }, + "billing.ItemDetail": { + "type": "object", + "description": "Extensions of a detail", + "properties": { + "order": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.ItemDetail.Order" + } + ], + "readOnly": true + } + } + }, + "billing.ItemDetail.Order": { + "type": "object", + "description": "Order data for this Detail", + "properties": { + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/billing.ItemDetail.OrderActionEnum" + } + ], + "description": "The meaning of this order detail", + "nullable": true }, "configurations": { "type": "array", @@ -2620,6 +2954,14 @@ "format": "date-time", "readOnly": true }, + "metadatas": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "readOnly": true + }, "orderId": { "type": "integer", "readOnly": true @@ -2727,6 +3069,14 @@ "type": "integer", "nullable": true }, + "availableAfterCredit": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true + }, "balance": { "allOf": [ { @@ -2756,6 +3106,14 @@ "ovhAccountId": { "type": "string", "readOnly": true + }, + "retrievableAmount": { + "allOf": [ + { + "$ref": "#/components/schemas/order.Price" + } + ], + "readOnly": true } } }, @@ -3816,18 +4174,6 @@ } } }, - "complexType.UnitAndValue_long": { - "type": "object", - "description": "A numeric value tagged with its unit", - "properties": { - "unit": { - "type": "string" - }, - "value": { - "type": "integer" - } - } - }, "consumption.ConsumptionExportFormatsEnum": { "type": "string", "description": "Export file format", @@ -4116,7 +4462,7 @@ "resource": { "allOf": [ { - "$ref": "#/components/schemas/dbaas.logs.LogSubscriptionResource" + "$ref": "#/components/schemas/dbaas.logs.SubscriptionResource" } ], "description": "Subscribed resource, where the logs come from", @@ -4165,22 +4511,6 @@ "streamId" ] }, - "dbaas.logs.LogSubscriptionResource": { - "type": "object", - "description": "Log subscription resource", - "properties": { - "name": { - "type": "string", - "description": "Name of subscribed resource", - "readOnly": true - }, - "type": { - "type": "string", - "description": "Type of subscribed resource", - "readOnly": true - } - } - }, "dbaas.logs.LogSubscriptionResponse": { "type": "object", "description": "Asynchronous operation after subscribing or unsubscribing to a resource logs", @@ -4211,6 +4541,22 @@ "kind" ] }, + "dbaas.logs.SubscriptionResource": { + "type": "object", + "description": "Log subscription resource", + "properties": { + "name": { + "type": "string", + "description": "Name of subscribed resource", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of subscribed resource", + "readOnly": true + } + } + }, "dbaas.logs.TemporaryLogsLink": { "type": "object", "description": "Temporary url information", @@ -4574,1014 +4920,30 @@ "TODO" ] }, - "dedicated.TemplateOsHardwareRaidEnum": { + "domain.DocumentFormatsEnum": { "type": "string", - "description": "Hardware RAID enum", + "description": "Document file format", "enum": [ - "raid0", - "raid1", - "raid10", - "raid5", - "raid50", - "raid6", - "raid60" + "gif", + "jpeg", + "jpg", + "pdf", + "png" ] }, - "dedicated.TemplateOsInfoLicense": { - "type": "object", - "description": "A structure describing some interesting facts about an OS template licensing", - "properties": { - "os": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoLicenseItem" - } - ], - "description": "OS template license OS details", - "nullable": true - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoLicenseItem" - } - ], - "description": "OS template license usage details", - "nullable": true - } - } - }, - "dedicated.TemplateOsInfoLicenseItem": { - "type": "object", - "description": "A structure describing some interesting facts about an OS template license item", - "properties": { - "name": { - "type": "array", - "description": "OS template license item names", - "nullable": true, - "items": { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoLicenseItemEnum" - } - }, - "url": { - "type": "string", - "description": "OS template license item url", - "nullable": true - } - } + "domain.OperationActionEnum": { + "type": "string", + "description": "Operation actions", + "enum": [ + "canCancel", + "canCorrect", + "canRelaunch", + "canReset" + ] }, - "dedicated.TemplateOsInfoLicenseItemEnum": { + "domain.OperationFunctionEnum": { "type": "string", - "description": "Standard license name according to SPDX", - "enum": [ - "0BSD", - "AAL", - "ADSL", - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0", - "AGPL-1.0-only", - "AGPL-1.0-or-later", - "AGPL-3.0-only", - "AGPL-3.0-or-later", - "AMDPLPA", - "AML", - "AMPAS", - "ANTLR-PD", - "ANTLR-PD-fallback", - "APAFML", - "APL-1.0", - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0", - "Abstyles", - "Adobe-2006", - "Adobe-Glyph", - "Afmparse", - "Aladdin", - "Apache-1.0", - "Apache-1.1", - "Apache-2.0", - "Artistic-1.0", - "Artistic-1.0-Perl", - "Artistic-1.0-cl8", - "Artistic-2.0", - "BSD-1-Clause", - "BSD-2-Clause", - "BSD-2-Clause-Patent", - "BSD-2-Clause-Views", - "BSD-3-Clause", - "BSD-3-Clause-Attribution", - "BSD-3-Clause-Clear", - "BSD-3-Clause-LBNL", - "BSD-3-Clause-Modification", - "BSD-3-Clause-No-Nuclear-License", - "BSD-3-Clause-No-Nuclear-License-2014", - "BSD-3-Clause-No-Nuclear-Warranty", - "BSD-3-Clause-Open-MPI", - "BSD-4-Clause", - "BSD-4-Clause-Shortened", - "BSD-4-Clause-UC", - "BSD-Protection", - "BSD-Source-Code", - "BSL-1.0", - "BUSL-1.1", - "Bahyph", - "Barr", - "Beerware", - "BitTorrent-1.0", - "BitTorrent-1.1", - "BlueOak-1.0.0", - "Borceux", - "C-UDA-1.0", - "CAL-1.0", - "CAL-1.0-Combined-Work-Exception", - "CATOSL-1.1", - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-4.0", - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-4.0", - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-ND-3.0", - "CC-BY-NC-ND-4.0", - "CC-BY-NC-SA-1.0", - "CC-BY-NC-SA-2.0", - "CC-BY-NC-SA-2.5", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-4.0", - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-ND-4.0", - "CC-BY-SA-1.0", - "CC-BY-SA-2.0", - "CC-BY-SA-2.5", - "CC-BY-SA-3.0", - "CC-BY-SA-4.0", - "CC-PDDC", - "CC0-1.0", - "CDDL-1.0", - "CDDL-1.1", - "CDLA-Permissive-1.0", - "CDLA-Sharing-1.0", - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0", - "CECILL-2.1", - "CECILL-B", - "CECILL-C", - "CERN-OHL-1.1", - "CERN-OHL-1.2", - "CERN-OHL-P-2.0", - "CERN-OHL-S-2.0", - "CERN-OHL-W-2.0", - "CNRI-Jython", - "CNRI-Python", - "CNRI-Python-GPL-Compatible", - "CPAL-1.0", - "CPL-1.0", - "CPOL-1.02", - "CUA-OPL-1.0", - "Caldera", - "ClArtistic", - "Condor-1.1", - "Crossword", - "CrystalStacker", - "Cube", - "D-FSL-1.0", - "DFSG", - "DOC", - "DRL-1.0", - "DSDP", - "Dotseqn", - "ECL-1.0", - "ECL-2.0", - "EFL-1.0", - "EFL-2.0", - "EPICS", - "EPL-1.0", - "EPL-2.0", - "EUDatagrid", - "EUPL-1.0", - "EUPL-1.1", - "EUPL-1.2", - "Entessa", - "ErlPL-1.1", - "Eurosym", - "FSFAP", - "FSFUL", - "FSFULLR", - "FTL", - "Fair", - "Frameworx-1.0", - "FreeBSD-DOC", - "FreeImage", - "GD", - "GFDL-1.1-invariants-only", - "GFDL-1.1-invariants-or-later", - "GFDL-1.1-no-invariants-only", - "GFDL-1.1-no-invariants-or-later", - "GFDL-1.1-only", - "GFDL-1.1-or-later", - "GFDL-1.2-invariants-only", - "GFDL-1.2-invariants-or-later", - "GFDL-1.2-no-invariants-only", - "GFDL-1.2-no-invariants-or-later", - "GFDL-1.2-only", - "GFDL-1.2-or-later", - "GFDL-1.3-invariants-only", - "GFDL-1.3-invariants-or-later", - "GFDL-1.3-no-invariants-only", - "GFDL-1.3-no-invariants-or-later", - "GFDL-1.3-only", - "GFDL-1.3-or-later", - "GL2PS", - "GLWTPL", - "GPL-1.0-only", - "GPL-1.0-or-later", - "GPL-2.0-only", - "GPL-2.0-or-later", - "GPL-3.0-only", - "GPL-3.0-or-later", - "Giftware", - "Glide", - "Glulxe", - "HPND", - "HPND-sell-variant", - "HTMLTIDY", - "HaskellReport", - "Hippocratic-2.1", - "IBM-pibs", - "ICU", - "IJG", - "IPA", - "IPL-1.0", - "ISC", - "ImageMagick", - "Imlib2", - "Info-ZIP", - "Intel", - "Intel-ACPI", - "Interbase-1.0", - "JPNIC", - "JSON", - "JasPer-2.0", - "LAL-1.2", - "LAL-1.3", - "LGPL-2.0-only", - "LGPL-2.0-or-later", - "LGPL-2.1-only", - "LGPL-2.1-or-later", - "LGPL-3.0-only", - "LGPL-3.0-or-later", - "LGPLLR", - "LPL-1.0", - "LPL-1.02", - "LPPL-1.0", - "LPPL-1.1", - "LPPL-1.2", - "LPPL-1.3a", - "LPPL-1.3c", - "Latex2e", - "Leptonica", - "LiLiQ-P-1.1", - "LiLiQ-R-1.1", - "LiLiQ-Rplus-1.1", - "Libpng", - "Linux-OpenIB", - "MIT", - "MIT-0", - "MIT-CMU", - "MIT-Modern-Variant", - "MIT-advertising", - "MIT-enna", - "MIT-feh", - "MIT-open-group", - "MITNFA", - "MPL-1.0", - "MPL-1.1", - "MPL-2.0", - "MPL-2.0-no-copyleft-exception", - "MS-PL", - "MS-RL", - "MTLL", - "MakeIndex", - "MirOS", - "Motosoto", - "MulanPSL-1.0", - "MulanPSL-2.0", - "Multics", - "Mup", - "NAIST-2003", - "NASA-1.3", - "NBPL-1.0", - "NCGL-UK-2.0", - "NCSA", - "NGPL", - "NIST-PD", - "NIST-PD-fallback", - "NLOD-1.0", - "NLPL", - "NOSL", - "NPL-1.0", - "NPL-1.1", - "NPOSL-3.0", - "NRL", - "NTP", - "NTP-0", - "Naumen", - "Net-SNMP", - "NetCDF", - "Newsletr", - "Nokia", - "Noweb", - "O-UDA-1.0", - "OCCT-PL", - "OCLC-2.0", - "ODC-By-1.0", - "ODbL-1.0", - "OFL-1.0", - "OFL-1.0-RFN", - "OFL-1.0-no-RFN", - "OFL-1.1", - "OFL-1.1-RFN", - "OFL-1.1-no-RFN", - "OGC-1.0", - "OGDL-Taiwan-1.0", - "OGL-Canada-2.0", - "OGL-UK-1.0", - "OGL-UK-2.0", - "OGL-UK-3.0", - "OGTSL", - "OLDAP-1.1", - "OLDAP-1.2", - "OLDAP-1.3", - "OLDAP-1.4", - "OLDAP-2.0", - "OLDAP-2.0.1", - "OLDAP-2.1", - "OLDAP-2.2", - "OLDAP-2.2.1", - "OLDAP-2.2.2", - "OLDAP-2.3", - "OLDAP-2.4", - "OLDAP-2.5", - "OLDAP-2.6", - "OLDAP-2.7", - "OLDAP-2.8", - "OML", - "OPL-1.0", - "OSET-PL-2.1", - "OSL-1.0", - "OSL-1.1", - "OSL-2.0", - "OSL-2.1", - "OSL-3.0", - "OpenSSL", - "PDDL-1.0", - "PHP-3.0", - "PHP-3.01", - "PSF-2.0", - "Parity-6.0.0", - "Parity-7.0.0", - "Plexus", - "PolyForm-Noncommercial-1.0.0", - "PolyForm-Small-Business-1.0.0", - "PostgreSQL", - "Python-2.0", - "QPL-1.0", - "Qhull", - "RHeCos-1.1", - "RPL-1.1", - "RPL-1.5", - "RPSL-1.0", - "RSA-MD", - "RSCPL", - "Rdisc", - "Ruby", - "SAX-PD", - "SCEA", - "SGI-B-1.0", - "SGI-B-1.1", - "SGI-B-2.0", - "SHL-0.5", - "SHL-0.51", - "SISSL", - "SISSL-1.2", - "SMLNJ", - "SMPPL", - "SNIA", - "SPL-1.0", - "SSH-OpenSSH", - "SSH-short", - "SSPL-1.0", - "SWL", - "Saxpath", - "Sendmail", - "Sendmail-8.23", - "SimPL-2.0", - "Sleepycat", - "Spencer-86", - "Spencer-94", - "Spencer-99", - "SugarCRM-1.1.3", - "TAPR-OHL-1.0", - "TCL", - "TCP-wrappers", - "TMate", - "TORQUE-1.1", - "TOSL", - "TU-Berlin-1.0", - "TU-Berlin-2.0", - "UCL-1.0", - "UPL-1.0", - "Unicode-DFS-2015", - "Unicode-DFS-2016", - "Unicode-TOU", - "Unlicense", - "VOSTROM", - "VSL-1.0", - "Vim", - "W3C", - "W3C-19980720", - "W3C-20150513", - "WTFPL", - "Watcom-1.0", - "Wsuipa", - "X11", - "XFree86-1.1", - "XSkat", - "Xerox", - "Xnet", - "ZPL-1.1", - "ZPL-2.0", - "ZPL-2.1", - "Zed", - "Zend-2.0", - "Zimbra-1.3", - "Zimbra-1.4", - "Zlib", - "blessing", - "bzip2-1.0.5", - "bzip2-1.0.6", - "copyleft-next-0.3.0", - "copyleft-next-0.3.1", - "curl", - "diffmark", - "dvipdfm", - "eGenix", - "etalab-2.0", - "freeware", - "gSOAP-1.3b", - "gnuplot", - "iMatix", - "libpng-2.0", - "libselinux-1.0", - "libtiff", - "mpich2", - "proprietary", - "psfrag", - "psutils", - "unknown", - "xinetd", - "xpp", - "zlib-acknowledgement" - ] - }, - "dedicated.TemplateOsInfoProject": { - "type": "object", - "description": "A structure describing some interesting facts about an OS template project", - "properties": { - "os": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoProjectItem" - } - ], - "description": "OS template project OS details", - "nullable": true - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoProjectItem" - } - ], - "description": "OS template project usage details", - "nullable": true - } - } - }, - "dedicated.TemplateOsInfoProjectItem": { - "type": "object", - "description": "A structure describing some interesting facts about an OS template project item", - "properties": { - "governance": { - "type": "array", - "description": "OS template project item governance", - "nullable": true, - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "description": "OS template project item name", - "nullable": true - }, - "releaseNotes": { - "type": "string", - "description": "OS template project item release notes", - "nullable": true - }, - "url": { - "type": "string", - "description": "OS template project item url", - "nullable": true - }, - "version": { - "type": "string", - "description": "OS template project item version", - "nullable": true - } - } - }, - "dedicated.TemplateOsInput": { - "type": "object", - "description": "A structure describing input questions for the specific OS template", - "properties": { - "default": { - "type": "string", - "description": "Default value", - "nullable": true - }, - "description": { - "type": "string", - "description": "Input question description", - "nullable": true - }, - "enum": { - "type": "array", - "description": "When type is enum: name of the possible enum values", - "items": { - "type": "string" - } - }, - "mandatory": { - "type": "boolean", - "description": "Whether answering to that question is mandatory in order to trigger an install with that specific OS or not" - }, - "name": { - "type": "string", - "description": "Input question name" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInputTypeEnum" - } - ], - "description": "Input type" - } - } - }, - "dedicated.TemplateOsInputTypeEnum": { - "type": "string", - "description": "Template OS Input type enum", - "enum": [ - "boolean", - "date", - "email", - "enum", - "hexstring", - "hostname", - "ip", - "keyValue", - "number", - "sshPubKey", - "string", - "text", - "time", - "url", - "uuid" - ] - }, - "dedicated.TemplateOsProperties": { - "type": "object", - "description": "A structure describing properties customizables about this dedicated installation template", - "properties": { - "customHostname": { - "type": "string", - "description": "Set up the server using the provided hostname instead of the default hostname", - "nullable": true - }, - "postInstallationScriptLink": { - "type": "string", - "description": "Indicate the URL where your postinstall customisation script is located", - "nullable": true - }, - "postInstallationScriptReturn": { - "type": "string", - "description": "indicate the string returned by your postinstall customisation script on successful execution. Advice: your script should return a unique validation string in case of succes. A good example is \"loh1Xee7eo OK OK OK UGh8Ang1Gu", - "nullable": true - } - } - }, - "dedicated.TemplateOsSubfamilyEnum": { - "type": "string", - "description": "Os subfamily definition", - "enum": [ - "alma", - "aos", - "arch", - "byoi", - "byolinux", - "centos", - "cloudlinux", - "coreos", - "debian", - "dgx", - "esxi", - "fedora", - "freebsd", - "gentoo", - "hyperv", - "omnios", - "openio", - "openmediavault", - "opensuse", - "ovh", - "pcs", - "power", - "proxmox", - "rhel", - "rocky", - "slackware", - "sles-sap", - "smartos", - "solusvm", - "ubuntu", - "windows-server-core", - "windows-server-desktop-exp", - "xcp", - "xen" - ] - }, - "dedicated.TemplateOsTypeEnum": { - "type": "string", - "description": "Os type", - "enum": [ - "bsd", - "custom", - "ibm", - "linux", - "solaris", - "unix", - "windows" - ] - }, - "dedicated.TemplateOsUsageEnum": { - "type": "string", - "description": "Os usage definition", - "enum": [ - "backup", - "basic", - "customer", - "database", - "erp", - "hosting", - "management", - "other", - "readyToUse", - "virtualisation", - "virtualization" - ] - }, - "dedicated.TemplatePartitionTypeEnum": { - "type": "string", - "description": "partition type", - "enum": [ - "logical", - "lv", - "primary" - ] - }, - "dedicated.installationTemplate.Templates": { - "type": "object", - "description": "Available installation templates", - "properties": { - "bitFormat": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.server.BitFormatEnum" - } - ], - "description": "this template bit format", - "readOnly": true - }, - "category": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsUsageEnum" - } - ], - "description": "category of this template (informative only)", - "readOnly": true - }, - "customization": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsProperties" - } - ], - "description": "Customizable template properties ", - "nullable": true, - "readOnly": true - }, - "description": { - "type": "string", - "description": "information about this template", - "readOnly": true - }, - "distribution": { - "type": "string", - "description": "the distribution this template is based on", - "readOnly": true - }, - "endOfInstall": { - "type": "string", - "description": "after this date, install of this template will not be possible at OVH", - "format": "date", - "readOnly": true - }, - "family": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsTypeEnum" - } - ], - "description": "this template family type", - "readOnly": true - }, - "filesystems": { - "type": "array", - "description": "list of all filesystems available for this template", - "items": { - "$ref": "#/components/schemas/dedicated.server.FileSystemEnum" - }, - "readOnly": true - }, - "inputs": { - "type": "array", - "description": "Inputs", - "nullable": true, - "items": { - "$ref": "#/components/schemas/dedicated.TemplateOsInput" - }, - "readOnly": true - }, - "license": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoLicense" - } - ], - "description": "This distribution licensing details", - "nullable": true, - "readOnly": true - }, - "lvmReady": { - "type": "boolean", - "description": "This distribution supports Logical Volumes (Linux LVM)", - "nullable": true, - "readOnly": true - }, - "noPartitioning": { - "type": "boolean", - "description": "Partitioning customization is not available for this OS template", - "readOnly": true - }, - "project": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsInfoProject" - } - ], - "description": "This distribution project details", - "nullable": true, - "readOnly": true - }, - "rootMountpoint": { - "type": "string", - "description": "The mandatory mount point of the root filesystem on this OS", - "nullable": true, - "readOnly": true - }, - "softRaidOnlyMirroring": { - "type": "boolean", - "description": "Partitioning customization is available but limited to mirroring for this OS template", - "readOnly": true - }, - "subfamily": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsSubfamilyEnum" - } - ], - "description": "this template subfamily type", - "readOnly": true - }, - "templateName": { - "type": "string", - "description": "This template name", - "readOnly": true - } - } - }, - "dedicated.installationTemplate.hardwareRaid": { - "type": "object", - "description": "Hardware RAID defined in this partitioning scheme", - "properties": { - "disks": { - "type": "array", - "description": "Disk list", - "items": { - "type": "string" - }, - "readOnly": true - }, - "mode": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplateOsHardwareRaidEnum" - } - ], - "description": "RAID mode", - "readOnly": true - }, - "name": { - "type": "string", - "description": "Hardware RAID name", - "readOnly": true - }, - "step": { - "type": "integer", - "description": "Specifies the creation order of the hardware RAID", - "readOnly": true - } - } - }, - "dedicated.installationTemplate.templatePartitioningSchemes": { - "type": "object", - "description": "Partitioning schemes available on this template", - "properties": { - "name": { - "type": "string", - "description": "This partitioning scheme name", - "readOnly": true - }, - "priority": { - "type": "integer", - "description": "on a reinstall, if a partitioning scheme is not specified, the one with the higher priority will be used by default, among all the compatible partitioning schemes (given the underlying hardware specifications)", - "readOnly": true - } - } - }, - "dedicated.installationTemplate.templatePartitions": { - "type": "object", - "description": " Partitions defined in this partitioning scheme", - "properties": { - "filesystem": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.server.FileSystemEnum" - } - ], - "description": "Partition filesytem", - "readOnly": true - }, - "mountpoint": { - "type": "string", - "description": "Partition mount point", - "readOnly": true - }, - "order": { - "type": "integer", - "description": "specifies the creation order of the partition on the disk", - "readOnly": true - }, - "raid": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.server.PartitionRaidEnum" - } - ], - "description": "Partition raid", - "nullable": true, - "readOnly": true - }, - "size": { - "allOf": [ - { - "$ref": "#/components/schemas/complexType.UnitAndValue_long" - } - ], - "description": "Partition size (unit: MB GB TB, MB by default), 0 => rest of the space", - "readOnly": true - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/dedicated.TemplatePartitionTypeEnum" - } - ], - "description": "Partition type", - "readOnly": true - }, - "volumeName": { - "type": "string", - "description": "Logical volume name (required if type is lv) or optional zpool name if filesystem is ZFS", - "nullable": true, - "readOnly": true - } - } - }, - "dedicated.server.BitFormatEnum": { - "type": "integer", - "description": "Available os bit format", - "enum": [ - 32, - 64 - ] - }, - "dedicated.server.FileSystemEnum": { - "type": "string", - "description": "FileSystems", - "enum": [ - "btrfs", - "ext3", - "ext4", - "fat16", - "none", - "ntfs", - "reiserfs", - "swap", - "ufs", - "vmfs5", - "vmfs6", - "vmfsl", - "xfs", - "zfs" - ] - }, - "dedicated.server.PartitionRaidEnum": { - "type": "string", - "description": "partition raid type", - "enum": [ - "0", - "1", - "10", - "5", - "6", - "7" - ] - }, - "domain.DocumentFormatsEnum": { - "type": "string", - "description": "Document file format", - "enum": [ - "gif", - "jpeg", - "jpg", - "pdf", - "png" - ] - }, - "domain.OperationActionEnum": { - "type": "string", - "description": "Operation actions", - "enum": [ - "canCancel", - "canCorrect", - "canRelaunch", - "canReset" - ] - }, - "domain.OperationFunctionEnum": { - "type": "string", - "description": "Operation functions", + "description": "Operation functions", "enum": [ "ContactControl", "ContactControlAcknowledge", @@ -5759,10 +5121,12 @@ "DnssecResigning", "DnssecRollKsk", "DnssecRollZsk", + "ZoneCheck", "ZoneCreate", "ZoneCut", "ZoneDelete", "ZoneImport", + "ZoneRefresh", "ZoneRestore" ] }, @@ -5819,6 +5183,7 @@ "GRA", "HIL", "LIM", + "MIL", "PAR", "RBX", "SBG", @@ -5868,9 +5233,9 @@ }, "macAddress": { "type": "string", - "description": "MAC address (e.g., 2001:4860:4860::8844)", + "description": "MAC address (e.g., 00:00:5e:00:53:01)", "format": "mac-address", - "example": "2001:4860:4860::8888. 2001:4860:4860::8844" + "example": "00:00:5e:00:53:01" }, "me.Migration": { "type": "object", @@ -10209,6 +9574,11 @@ "nullable": true, "readOnly": true }, + "displayName": { + "type": "string", + "description": "Display name shown instead of the organisation name.", + "nullable": true + }, "email": { "type": "string", "description": "Email address", @@ -12434,6 +11804,25 @@ } } } + }, + "securitySchemes": { + "oAuth2AuthCode": { + "type": "oauth2", + "description": "Oauth2", + "x-client-id": "1bb9c7df371741c0", + "x-client-secret": "a5b4de870aca620d10fbf63cd18d205b", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.eu.ovhcloud.com/oauth2/authorize", + "tokenUrl": "https://auth.eu.ovhcloud.com/oauth2/token", + "scopes": { + "account/all": "Manage your account", + "all": "Manage your whole account and all your services", + "services/all": "Manage your services lifecycle and billing" + } + } + } + } } }, "paths": { @@ -14755,8 +14144,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -14801,8 +14190,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -14850,8 +14239,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -14893,8 +14282,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -14944,8 +14333,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -14988,8 +14377,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -15033,8 +14422,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -16080,7 +15469,237 @@ "name": "billId", "required": true, "schema": { - "type": "string" + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.Order" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/bill/debt/pay", + "required": true + } + ] + } + }, + "/me/bill/{billId}/details": { + "get": { + "summary": "Give access to all entries of the bill", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "billId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/bill/details/get", + "required": true + } + ], + "x-expanded-response": "BillingBillDetail" + } + }, + "/me/bill/{billId}/details/{billDetailId}": { + "get": { + "summary": "Get this object properties", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "billDetailId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "billId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.BillDetail" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/bill/details/get", + "required": true + } + ] + } + }, + "/me/bill/{billId}/payment": { + "get": { + "summary": "Get this object properties", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "billId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.Payment" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/bill/payment/get", + "required": true + } + ] + } + }, + "/me/billing/capacities": { + "get": { + "summary": "Customer billing capacities", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nichandle.BillingCapacities" + } + } + } + } + }, + "x-badges": [ + { + "color": "orange", + "label": "Internal use only" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/billing/capacities/get", + "required": true + } + ] + } + }, + "/me/billing/group": { + "get": { + "summary": "Retrieve all billing groups", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "name", + "description": "Filter by name", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "serviceId", + "description": "Filter by Service ID", + "schema": { + "type": "integer" } } ], @@ -16090,7 +15709,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/billing.Order" + "type": "array", + "items": { + "type": "integer" + } } } } @@ -16098,46 +15720,42 @@ }, "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/bill/debt/pay", + "name": "account:apiovh:me/billing/group/get", "required": true } - ] - } - }, - "/me/bill/{billId}/details": { - "get": { - "summary": "Give access to all entries of the bill", + ], + "x-expanded-response": "MeBillingGroupBillingGroup" + }, + "post": { + "summary": "Create a new billing group", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "billId", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.group.BillingGroup" + } } } - ], + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/me.billing.group.BillingGroup" } } } @@ -16145,22 +15763,21 @@ }, "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/bill/details/get", + "name": "account:apiovh:me/billing/group/create", "required": true } - ], - "x-expanded-response": "BillingBillDetail" + ] } }, - "/me/bill/{billId}/details/{billDetailId}": { - "get": { - "summary": "Get this object properties", + "/me/billing/group/{groupId}": { + "delete": { + "summary": "Delete a billing group", "security": [ { "oAuth2AuthCode": [] @@ -16169,50 +15786,34 @@ "parameters": [ { "in": "path", - "name": "billDetailId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "billId", + "name": "groupId", + "description": "Group ID", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/billing.BillDetail" - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/bill/details/get", + "name": "account:apiovh:me/billing/group/delete", "required": true } ] - } - }, - "/me/bill/{billId}/payment": { + }, "get": { - "summary": "Get this object properties", + "summary": "Retrieve information about a billing group", "security": [ { "oAuth2AuthCode": [] @@ -16221,10 +15822,11 @@ "parameters": [ { "in": "path", - "name": "billId", + "name": "groupId", + "description": "Group ID", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], @@ -16234,7 +15836,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/billing.Payment" + "$ref": "#/components/schemas/me.billing.group.BillingGroup" } } } @@ -16242,55 +15844,68 @@ }, "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/bill/payment/get", + "name": "account:apiovh:me/billing/group/get", "required": true } - ] - } - }, - "/me/billing/capacities": { - "get": { - "summary": "Customer billing capacities", + ], + "x-response-identifier": "groupId" + }, + "put": { + "summary": "Edit billing group", "security": [ { "oAuth2AuthCode": [] } ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/nichandle.BillingCapacities" - } + "parameters": [ + { + "in": "path", + "name": "groupId", + "description": "Group ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.group.BillingGroup" } } } }, + "responses": { + "200": { + "description": "successful operation" + } + }, "x-badges": [ { - "color": "orange", - "label": "Internal use only" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/capacities/get", + "name": "account:apiovh:me/billing/group/edit", "required": true } ] } }, - "/me/billing/group": { + "/me/billing/group/{groupId}/service": { "get": { - "summary": "Retrieve all billing groups", + "summary": "Retrieve billing group service ID list", "security": [ { "oAuth2AuthCode": [] @@ -16298,17 +15913,10 @@ ], "parameters": [ { - "in": "query", - "name": "name", - "description": "Filter by name", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "serviceId", - "description": "Filter by Service ID", + "in": "path", + "name": "groupId", + "description": "Group ID", + "required": true, "schema": { "type": "integer" } @@ -16337,25 +15945,36 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/get", + "name": "account:apiovh:me/billing/group/service/get", "required": true } ], - "x-expanded-response": "MeBillingGroupBillingGroup" + "x-expanded-response": "MeBillingGroupService" }, "post": { - "summary": "Create a new billing group", + "summary": "Associate a service to a billing group", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "groupId", + "description": "Group ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.BillingGroup" + "$ref": "#/components/schemas/me.billing.group.service.Create" } } } @@ -16366,7 +15985,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.BillingGroup" + "$ref": "#/components/schemas/me.billing.group.Service" } } } @@ -16380,15 +15999,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/create", + "name": "account:apiovh:me/billing/group/service/create", "required": true } ] } }, - "/me/billing/group/{groupId}": { + "/me/billing/group/{groupId}/service/{serviceId}": { "delete": { - "summary": "Delete a billing group", + "summary": "Unlink a service from a billing group", "security": [ { "oAuth2AuthCode": [] @@ -16403,6 +16022,15 @@ "schema": { "type": "integer" } + }, + { + "in": "path", + "name": "serviceId", + "description": "Service ID", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { @@ -16418,13 +16046,13 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/delete", + "name": "account:apiovh:me/billing/group/service/delete", "required": true } ] }, "get": { - "summary": "Retrieve information about a billing group", + "summary": "Retrieve information about a billing group service", "security": [ { "oAuth2AuthCode": [] @@ -16439,6 +16067,50 @@ "schema": { "type": "integer" } + }, + { + "in": "path", + "name": "serviceId", + "description": "Service ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.group.Service" + } + } + } + } + }, + "x-badges": [ + { + "color": "blue", + "label": "Beta version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/billing/group/service/get", + "required": true + } + ], + "x-response-identifier": "serviceId" + } + }, + "/me/billing/invoicesByPostalMail": { + "get": { + "summary": "Send invoices through postal mail", + "security": [ + { + "oAuth2AuthCode": [] } ], "responses": { @@ -16447,7 +16119,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.BillingGroup" + "type": "boolean" } } } @@ -16461,36 +16133,33 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/get", + "name": "account:apiovh:me/billing/invoicesByPostalMail/get", "required": true } - ], - "x-response-identifier": "groupId" + ] }, - "put": { - "summary": "Edit billing group", + "post": { + "summary": "Enable or disable invoices by postal mail", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "groupId", - "description": "Group ID", - "required": true, - "schema": { - "type": "integer" - } - } - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.BillingGroup" + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "description": "Send invoices through postal mail" + } + }, + "required": [ + "enable" + ] } } } @@ -16508,15 +16177,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/edit", + "name": "account:apiovh:me/billing/invoicesByPostalMail/create", "required": true } ] } }, - "/me/billing/group/{groupId}/service": { + "/me/billing/purchaseOrder": { "get": { - "summary": "Retrieve billing group service ID list", + "summary": "Retrieve all purchase orders", "security": [ { "oAuth2AuthCode": [] @@ -16524,10 +16193,9 @@ ], "parameters": [ { - "in": "path", - "name": "groupId", - "description": "Group ID", - "required": true, + "in": "query", + "name": "billingGroupId", + "description": "Billing Group Identifier", "schema": { "type": "integer" } @@ -16556,36 +16224,25 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/service/get", + "name": "account:apiovh:me/billing/purchaseOrder/get", "required": true } ], - "x-expanded-response": "MeBillingGroupService" + "x-expanded-response": "MeBillingPurchaseOrderPurchaseOrder" }, "post": { - "summary": "Associate a service to a billing group", + "summary": "Create a purchase order", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "groupId", - "description": "Group ID", - "required": true, - "schema": { - "type": "integer" - } - } - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.service.Create" + "$ref": "#/components/schemas/me.billing.purchaseOrder.Creation" } } } @@ -16596,7 +16253,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.Service" + "$ref": "#/components/schemas/me.billing.purchaseOrder.PurchaseOrder" } } } @@ -16610,15 +16267,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/service/create", + "name": "account:apiovh:me/billing/purchaseOrder/create", "required": true } ] } }, - "/me/billing/group/{groupId}/service/{serviceId}": { + "/me/billing/purchaseOrder/{id}": { "delete": { - "summary": "Unlink a service from a billing group", + "summary": "Delete a purchase order", "security": [ { "oAuth2AuthCode": [] @@ -16627,17 +16284,8 @@ "parameters": [ { "in": "path", - "name": "groupId", - "description": "Group ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "in": "path", - "name": "serviceId", - "description": "Service ID", + "name": "id", + "description": "Id", "required": true, "schema": { "type": "integer" @@ -16657,13 +16305,13 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/service/delete", + "name": "account:apiovh:me/billing/purchaseOrder/delete", "required": true } ] }, "get": { - "summary": "Retrieve information about a billing group service", + "summary": "Retrieve information about a purchase order", "security": [ { "oAuth2AuthCode": [] @@ -16672,17 +16320,8 @@ "parameters": [ { "in": "path", - "name": "groupId", - "description": "Group ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "in": "path", - "name": "serviceId", - "description": "Service ID", + "name": "id", + "description": "Id", "required": true, "schema": { "type": "integer" @@ -16695,7 +16334,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.group.Service" + "$ref": "#/components/schemas/me.billing.purchaseOrder.PurchaseOrder" } } } @@ -16709,16 +16348,62 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/group/service/get", + "name": "account:apiovh:me/billing/purchaseOrder/get", "required": true } ], - "x-response-identifier": "serviceId" + "x-response-identifier": "id" + }, + "put": { + "summary": "Update a purchase order", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.purchaseOrder.Update" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation" + } + }, + "x-badges": [ + { + "color": "blue", + "label": "Beta version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/billing/purchaseOrder/edit", + "required": true + } + ] } }, - "/me/billing/invoicesByPostalMail": { + "/me/billing/report/consumption": { "get": { - "summary": "Send invoices through postal mail", + "summary": "Retrieve all billing reports of consumption", "security": [ { "oAuth2AuthCode": [] @@ -16730,7 +16415,10 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } } @@ -16738,19 +16426,20 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/invoicesByPostalMail/get", + "name": "account:apiovh:me/billing/report/consumption/get", "required": true } - ] + ], + "x-expanded-response": "MeBillingReportConsumption" }, "post": { - "summary": "Enable or disable invoices by postal mail", + "summary": "Generate consumption billing report for a period", "security": [ { "oAuth2AuthCode": [] @@ -16761,42 +16450,40 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enable": { - "type": "boolean", - "description": "Send invoices through postal mail" - } - }, - "required": [ - "enable" - ] + "$ref": "#/components/schemas/me.billing.report.consumption.CreationRequest" } } } }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.report.consumption.CreationResponse" + } + } + } } }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/invoicesByPostalMail/create", + "name": "account:apiovh:me/billing/report/consumption/post", "required": true } ] } }, - "/me/billing/purchaseOrder": { + "/me/billing/report/consumption/{taskId}": { "get": { - "summary": "Retrieve all purchase orders", + "summary": "Retrieve a consumption billing report with task id", "security": [ { "oAuth2AuthCode": [] @@ -16804,11 +16491,12 @@ ], "parameters": [ { - "in": "query", - "name": "billingGroupId", - "description": "Billing Group Identifier", + "in": "path", + "name": "taskId", + "description": "Task ID", + "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -16818,10 +16506,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "integer" - } + "$ref": "#/components/schemas/me.billing.report.Consumption" } } } @@ -16829,42 +16514,55 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/purchaseOrder/get", + "name": "account:apiovh:me/billing/report/consumption/get", "required": true } ], - "x-expanded-response": "MeBillingPurchaseOrderPurchaseOrder" - }, - "post": { - "summary": "Create a purchase order", + "x-response-identifier": "taskId" + } + }, + "/me/billing/task": { + "get": { + "summary": "List of tasks", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.billing.purchaseOrder.Creation" - } + "parameters": [ + { + "in": "query", + "name": "name", + "description": "Filter tasks by name", + "schema": { + "$ref": "#/components/schemas/me.billing.tasks.TaskNameEnum" + } + }, + { + "in": "query", + "name": "status", + "description": "Filter tasks by status", + "schema": { + "$ref": "#/components/schemas/me.billing.tasks.TaskStatusEnum" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.purchaseOrder.PurchaseOrder" + "type": "array", + "items": { + "type": "integer" + } } } } @@ -16872,21 +16570,22 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "orange", + "label": "Internal use only" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/purchaseOrder/create", + "name": "account:apiovh:me/billing/task/get", "required": true } - ] + ], + "x-expanded-response": "MeBillingTasksTask" } }, - "/me/billing/purchaseOrder/{id}": { - "delete": { - "summary": "Delete a purchase order", + "/me/billing/task/{id}": { + "get": { + "summary": "Get details about a task", "security": [ { "oAuth2AuthCode": [] @@ -16905,24 +16604,34 @@ ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.billing.tasks.Task" + } + } + } } }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "orange", + "label": "Internal use only" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/purchaseOrder/delete", + "name": "account:apiovh:me/billing/task/get", "required": true } - ] - }, + ], + "x-response-identifier": "id" + } + }, + "/me/bringYourOwnIp/token": { "get": { - "summary": "Retrieve information about a purchase order", + "summary": "Get your Bring your own IP token", "security": [ { "oAuth2AuthCode": [] @@ -16930,12 +16639,12 @@ ], "parameters": [ { - "in": "path", - "name": "id", - "description": "Id", + "in": "query", + "name": "campus", + "description": "Campus where you plan to bring your own IP range in. See /ip/campus to get more details.", "required": true, "schema": { - "type": "integer" + "$ref": "#/components/schemas/ip.CampusEnum" } } ], @@ -16945,7 +16654,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.purchaseOrder.PurchaseOrder" + "type": "string" } } } @@ -16959,14 +16668,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/purchaseOrder/get", + "name": "account:apiovh:me/bringYourOwnIp/token/get", "required": true } - ], - "x-response-identifier": "id" - }, - "put": { - "summary": "Update a purchase order", + ] + } + }, + "/me/carbonCalculator/hasInvoice": { + "get": { + "summary": "Find out if the account has data to generate invoice", "security": [ { "oAuth2AuthCode": [] @@ -16974,47 +16684,44 @@ ], "parameters": [ { - "in": "path", - "name": "id", - "description": "Id", - "required": true, + "in": "query", + "name": "date", + "description": "Month of the requested invoice (day is ignored)", "schema": { - "type": "integer" + "type": "string", + "format": "date" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.billing.purchaseOrder.Update" - } - } - } - }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/carbonCalculator.HasInvoiceResponse" + } + } + } } }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/purchaseOrder/edit", + "name": "account:apiovh:me/carbonCalculator/hasInvoice/get", "required": true } ] } }, - "/me/billing/report/consumption": { + "/me/carbonCalculator/task": { "get": { - "summary": "Retrieve all billing reports of consumption", + "summary": "List all tasks", "security": [ { "oAuth2AuthCode": [] @@ -17028,7 +16735,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/carbonCalculator.Task" } } } @@ -17043,14 +16750,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/report/consumption/get", + "name": "account:apiovh:me/carbonCalculator/task/get", "required": true } ], - "x-expanded-response": "MeBillingReportConsumption" + "x-response-identifier": "taskID", + "x-expanded-response": "CarbonCalculatorTask" }, "post": { - "summary": "Generate consumption billing report for a period", + "summary": "Create a carbon footprint generation task", "security": [ { "oAuth2AuthCode": [] @@ -17061,7 +16769,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.report.consumption.CreationRequest" + "$ref": "#/components/schemas/carbonCalculator.CalculationRequest" } } } @@ -17072,7 +16780,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.report.consumption.CreationResponse" + "$ref": "#/components/schemas/carbonCalculator.CalculationResponse" } } } @@ -17086,15 +16794,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/report/consumption/post", + "name": "account:apiovh:me/carbonCalculator/task/create", "required": true } ] } }, - "/me/billing/report/consumption/{taskId}": { + "/me/carbonCalculator/task/{taskID}": { "get": { - "summary": "Retrieve a consumption billing report with task id", + "summary": "Fetch a task by its ID", "security": [ { "oAuth2AuthCode": [] @@ -17103,8 +16811,8 @@ "parameters": [ { "in": "path", - "name": "taskId", - "description": "Task ID", + "name": "taskID", + "description": "TaskID", "required": true, "schema": { "type": "string" @@ -17117,7 +16825,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.report.Consumption" + "$ref": "#/components/schemas/carbonCalculator.Task" } } } @@ -17131,16 +16839,17 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/report/consumption/get", + "name": "account:apiovh:me/carbonCalculator/task/get", "required": true } ], - "x-response-identifier": "taskId" + "x-response-identifier": "taskID" } }, - "/me/billing/task": { + "/me/certificates": { "get": { - "summary": "List of tasks", + "operationId": "getCertificates", + "summary": "Get all certificates of the account", "security": [ { "oAuth2AuthCode": [] @@ -17150,18 +16859,121 @@ { "in": "query", "name": "name", - "description": "Filter tasks by name", + "description": "Certificate definition name", "schema": { - "$ref": "#/components/schemas/me.billing.tasks.TaskNameEnum" + "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "x-badges": [ + { + "color": "blue", + "label": "Alpha version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/certificates/get", + "required": true + } + ] + } + }, + "/me/changeEmail": { + "post": { + "summary": "Initiate an email change procedure", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "newEmail": { + "type": "string", + "description": "New email to associate to your account" + } + }, + "required": [ + "newEmail" + ] + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/nichandle.emailChange.Task" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/changeEmail", + "required": true + } + ] + } + }, + "/me/changePassword": { + "post": { + "summary": "Initiate a password change procedure", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "responses": { + "200": { + "description": "successful operation" + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ] + } + }, + "/me/consent": { + "get": { + "summary": "List all consent campaign available", + "security": [ { - "in": "query", - "name": "status", - "description": "Filter tasks by status", - "schema": { - "$ref": "#/components/schemas/me.billing.tasks.TaskStatusEnum" - } + "oAuth2AuthCode": [] } ], "responses": { @@ -17172,7 +16984,7 @@ "schema": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/me.consent.Campaign" } } } @@ -17181,22 +16993,23 @@ }, "x-badges": [ { - "color": "orange", - "label": "Internal use only" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/task/get", + "name": "account:apiovh:me/consent/get", "required": true } ], - "x-expanded-response": "MeBillingTasksTask" + "x-response-identifier": "name", + "x-expanded-response": "MeConsentCampaign" } }, - "/me/billing/task/{id}": { + "/me/consent/{campaignName}": { "get": { - "summary": "Get details about a task", + "summary": "Retrieve information about a consent campaign", "security": [ { "oAuth2AuthCode": [] @@ -17205,11 +17018,11 @@ "parameters": [ { "in": "path", - "name": "id", - "description": "Id", + "name": "campaignName", + "description": "Campaign name", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -17219,7 +17032,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.billing.tasks.Task" + "$ref": "#/components/schemas/me.consent.Campaign" } } } @@ -17227,22 +17040,22 @@ }, "x-badges": [ { - "color": "orange", - "label": "Internal use only" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/billing/task/get", + "name": "account:apiovh:me/consent/get", "required": true } ], - "x-response-identifier": "id" + "x-response-identifier": "name" } }, - "/me/bringYourOwnIp/token": { + "/me/consent/{campaignName}/decision": { "get": { - "summary": "Get your Bring your own IP token", + "summary": "Get decision value for a consent campaign", "security": [ { "oAuth2AuthCode": [] @@ -17250,12 +17063,12 @@ ], "parameters": [ { - "in": "query", - "name": "campus", - "description": "Campus where you plan to bring your own IP range in. See /ip/campus to get more details.", + "in": "path", + "name": "campaignName", + "description": "Campaign name", "required": true, "schema": { - "$ref": "#/components/schemas/ip.CampusEnum" + "type": "string" } } ], @@ -17265,7 +17078,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/me.consent.Consent" } } } @@ -17273,21 +17086,19 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/bringYourOwnIp/token/get", + "name": "account:apiovh:me/consent/decision/get", "required": true } ] - } - }, - "/me/carbonCalculator/hasInvoice": { - "get": { - "summary": "Find out if the account has data to generate invoice", + }, + "put": { + "summary": "Update decision of a consent campaign", "security": [ { "oAuth2AuthCode": [] @@ -17295,27 +17106,30 @@ ], "parameters": [ { - "in": "query", - "name": "date", - "description": "Month of the requested invoice (day is ignored)", + "in": "path", + "name": "campaignName", + "description": "Campaign name", + "required": true, "schema": { - "type": "string", - "format": "date" + "type": "string" } } ], - "responses": { - "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/carbonCalculator.HasInvoiceResponse" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.consent.Decision" } } } }, + "responses": { + "200": { + "description": "successful operation" + } + }, "x-badges": [ { "color": "green", @@ -17324,15 +17138,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/carbonCalculator/hasInvoice/get", + "name": "account:apiovh:me/consent/decision/edit", "required": true } ] } }, - "/me/carbonCalculator/task": { + "/me/consumption/usage/current": { "get": { - "summary": "List all tasks", + "summary": "Get on-going consumptions for all services", "security": [ { "oAuth2AuthCode": [] @@ -17346,7 +17160,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/carbonCalculator.Task" + "$ref": "#/components/schemas/me.consumption.Transaction" } } } @@ -17361,37 +17175,30 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/carbonCalculator/task/get", + "name": "account:apiovh:me/consumption/usage/current/get", "required": true } - ], - "x-response-identifier": "taskID", - "x-expanded-response": "CarbonCalculatorTask" - }, - "post": { - "summary": "Create a carbon footprint generation task", + ] + } + }, + "/me/consumption/usage/forecast": { + "get": { + "summary": "Get forecasted consumptions for all services", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/carbonCalculator.CalculationRequest" - } - } - } - }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/carbonCalculator.CalculationResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/me.consumption.Transaction" + } } } } @@ -17405,15 +17212,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/carbonCalculator/task/create", + "name": "account:apiovh:me/consumption/usage/forecast/get", "required": true } ] } }, - "/me/carbonCalculator/task/{taskID}": { + "/me/consumption/usage/history": { "get": { - "summary": "Fetch a task by its ID", + "summary": "Get list of transactions between two dates", "security": [ { "oAuth2AuthCode": [] @@ -17421,12 +17228,23 @@ ], "parameters": [ { - "in": "path", - "name": "taskID", - "description": "TaskID", + "in": "query", + "name": "beginDate", + "description": "Begin date", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "endDate", + "description": "End date", + "required": true, + "schema": { + "type": "string", + "format": "date-time" } } ], @@ -17436,7 +17254,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/carbonCalculator.Task" + "type": "array", + "items": { + "$ref": "#/components/schemas/me.consumption.Transaction" + } } } } @@ -17450,32 +17271,20 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/carbonCalculator/task/get", + "name": "account:apiovh:me/consumption/usage/history/get", "required": true } - ], - "x-response-identifier": "taskID" + ] } }, - "/me/certificates": { + "/me/contact": { "get": { - "operationId": "getCertificates", - "summary": "Get all certificates of the account", + "summary": "Retrieve every contact your created", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "query", - "name": "name", - "description": "Certificate definition name", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "successful operation", @@ -17484,7 +17293,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "integer" } } } @@ -17493,21 +17302,20 @@ }, "x-badges": [ { - "color": "blue", - "label": "Alpha version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/certificates/get", + "name": "account:apiovh:me/contact/get", "required": true } - ] - } - }, - "/me/changeEmail": { + ], + "x-expanded-response": "MeContactContact" + }, "post": { - "summary": "Initiate an email change procedure", + "summary": "Create a new contact", "security": [ { "oAuth2AuthCode": [] @@ -17518,27 +17326,63 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "newEmail": { - "type": "string", - "description": "New email to associate to your account" - } - }, - "required": [ - "newEmail" - ] + "$ref": "#/components/schemas/me.contact.Contact" + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.contact.Contact" + } } } } - }, + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/contact/create", + "required": true + } + ] + } + }, + "/me/contact/{contactId}": { + "get": { + "summary": "Retrieve information about a contact", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "contactId", + "description": "Contact ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/nichandle.emailChange.Task" + "$ref": "#/components/schemas/me.contact.Contact" } } } @@ -17552,51 +17396,47 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/changeEmail", + "name": "account:apiovh:me/contact/get", "required": true } - ] - } - }, - "/me/changePassword": { - "post": { - "summary": "Initiate a password change procedure", + ], + "x-response-identifier": "id" + }, + "put": { + "summary": "Update an existing contact", "security": [ { "oAuth2AuthCode": [] } ], - "responses": { - "200": { - "description": "successful operation" - } - }, - "x-badges": [ - { - "color": "green", - "label": "Stable production version" - } - ] - } - }, - "/me/consent": { - "get": { - "summary": "List all consent campaign available", - "security": [ + "parameters": [ { - "oAuth2AuthCode": [] + "in": "path", + "name": "contactId", + "description": "Contact ID", + "required": true, + "schema": { + "type": "integer" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.contact.Contact" + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/me.consent.Campaign" - } + "$ref": "#/components/schemas/me.contact.Contact" } } } @@ -17610,17 +17450,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consent/get", + "name": "account:apiovh:me/contact/edit", "required": true } - ], - "x-response-identifier": "name", - "x-expanded-response": "MeConsentCampaign" + ] } }, - "/me/consent/{campaignName}": { + "/me/contact/{contactId}/fields": { "get": { - "summary": "Retrieve information about a consent campaign", + "summary": "Get mandatory/read-only information about the fields of a contact", "security": [ { "oAuth2AuthCode": [] @@ -17629,11 +17467,11 @@ "parameters": [ { "in": "path", - "name": "campaignName", - "description": "Campaign name", + "name": "contactId", + "description": "Contact ID", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], @@ -17643,7 +17481,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.consent.Campaign" + "type": "array", + "items": { + "$ref": "#/components/schemas/me.contact.FieldInformation" + } } } } @@ -17657,16 +17498,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consent/get", + "name": "account:apiovh:me/contact/fields/get", "required": true } - ], - "x-response-identifier": "name" + ] } }, - "/me/consent/{campaignName}/decision": { + "/me/correctiveInvoice": { "get": { - "summary": "Get decision value for a consent campaign", + "summary": "List of all the correctiveInvoice the logged account has", "security": [ { "oAuth2AuthCode": [] @@ -17674,12 +17514,37 @@ ], "parameters": [ { - "in": "path", - "name": "campaignName", - "description": "Campaign name", - "required": true, + "in": "query", + "name": "category", + "description": "Filter the value of category property (=)", "schema": { - "type": "string" + "$ref": "#/components/schemas/billing.CategoryEnum" + } + }, + { + "in": "query", + "name": "date.from", + "description": "Filter the value of date property (>=)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "date.to", + "description": "Filter the value of date property (<=)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "orderId", + "description": "Filter the value of orderId property (=)", + "schema": { + "type": "integer" } } ], @@ -17689,7 +17554,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.consent.Consent" + "type": "array", + "items": { + "type": "string" + } } } } @@ -17703,13 +17571,17 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consent/decision/get", + "name": "account:apiovh:me/correctiveInvoice/get", + "description": "Get corrective invoices for your account", "required": true } - ] - }, - "put": { - "summary": "Update decision of a consent campaign", + ], + "x-expanded-response": "BillingCorrectiveInvoice" + } + }, + "/me/correctiveInvoice/{correctiveInvoiceId}": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] @@ -17718,27 +17590,23 @@ "parameters": [ { "in": "path", - "name": "campaignName", - "description": "Campaign name", + "name": "correctiveInvoiceId", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.consent.Decision" - } - } - } - }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.CorrectiveInvoice" + } + } + } } }, "x-badges": [ @@ -17749,30 +17617,38 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consent/decision/edit", + "name": "account:apiovh:me/correctiveInvoice/get", + "description": "Get corrective invoices for your account", "required": true } ] } }, - "/me/consumption/usage/current": { + "/me/correctiveInvoice/{correctiveInvoiceId}/debt": { "get": { - "summary": "Get on-going consumptions for all services", + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "correctiveInvoiceId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/me.consumption.Transaction" - } + "$ref": "#/components/schemas/debt.Debt" } } } @@ -17786,20 +17662,39 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consumption/usage/current/get", + "name": "account:apiovh:me/correctiveInvoice/debt/get", + "description": "Get debt information for a corrective invoice of your account", "required": true } ] } }, - "/me/consumption/usage/forecast": { + "/me/correctiveInvoice/{correctiveInvoiceId}/debt/operation": { "get": { - "summary": "Get forecasted consumptions for all services", + "summary": "All operations related to these debts", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "correctiveInvoiceId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "depositOrderId", + "description": "Filter the value of depositOrderId property (=)", + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "successful operation", @@ -17808,7 +17703,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/me.consumption.Transaction" + "type": "integer" } } } @@ -17823,15 +17718,17 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consumption/usage/forecast/get", + "name": "account:apiovh:me/correctiveInvoice/debt/operation/get", + "description": "Get debt operations for a specific corrective invoice of your account", "required": true } - ] + ], + "x-expanded-response": "DebtOperation" } }, - "/me/consumption/usage/history": { + "/me/correctiveInvoice/{correctiveInvoiceId}/debt/operation/{operationId}": { "get": { - "summary": "Get list of transactions between two dates", + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] @@ -17839,23 +17736,19 @@ ], "parameters": [ { - "in": "query", - "name": "beginDate", - "description": "Begin date", + "in": "path", + "name": "correctiveInvoiceId", "required": true, "schema": { - "type": "string", - "format": "date-time" + "type": "string" } }, { - "in": "query", - "name": "endDate", - "description": "End date", + "in": "path", + "name": "operationId", "required": true, "schema": { - "type": "string", - "format": "date-time" + "type": "integer" } } ], @@ -17865,10 +17758,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/me.consumption.Transaction" - } + "$ref": "#/components/schemas/debt.Operation" } } } @@ -17882,30 +17772,46 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/consumption/usage/history/get", + "name": "account:apiovh:me/correctiveInvoice/debt/operation/get", + "description": "Get a specific debt operation of a corrective invoice for your account", "required": true } ] } }, - "/me/contact": { + "/me/correctiveInvoice/{correctiveInvoiceId}/debt/operation/{operationId}/associatedObject": { "get": { - "summary": "Retrieve every contact your created", + "summary": "Return main data about the object related to this debt operation", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "correctiveInvoiceId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "operationId", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer" - } + "application/json": { + "schema": { + "$ref": "#/components/schemas/debt.entry.AssociatedObject" } } } @@ -17919,36 +17825,38 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/contact/get", + "name": "account:apiovh:me/correctiveInvoice/debt/operation/associatedObject/get", + "description": "Get associated objects of a debt operation for a corrective invoice of your account", "required": true } - ], - "x-expanded-response": "MeContactContact" - }, + ] + } + }, + "/me/correctiveInvoice/{correctiveInvoiceId}/debt/pay": { "post": { - "summary": "Create a new contact", + "summary": "Create an order in order to pay this order's debt", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.contact.Contact" - } + "parameters": [ + { + "in": "path", + "name": "correctiveInvoiceId", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.contact.Contact" + "$ref": "#/components/schemas/billing.Order" } } } @@ -17962,15 +17870,16 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/contact/create", + "name": "account:apiovh:me/correctiveInvoice/debt/pay", + "description": "Pay the debt of a corrective invoice for your account", "required": true } ] } }, - "/me/contact/{contactId}": { + "/me/correctiveInvoice/{correctiveInvoiceId}/details": { "get": { - "summary": "Retrieve information about a contact", + "summary": "Give access to all entries of the CorrectiveInvoice", "security": [ { "oAuth2AuthCode": [] @@ -17979,11 +17888,10 @@ "parameters": [ { "in": "path", - "name": "contactId", - "description": "Contact ID", + "name": "correctiveInvoiceId", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -17993,7 +17901,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.contact.Contact" + "type": "array", + "items": { + "type": "string" + } } } } @@ -18007,14 +17918,17 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/contact/get", + "name": "account:apiovh:me/correctiveInvoice/details/get", + "description": "Get details of a corrective invoice for your account", "required": true } ], - "x-response-identifier": "id" - }, - "put": { - "summary": "Update an existing contact", + "x-expanded-response": "BillingCorrectiveInvoiceDetail" + } + }, + "/me/correctiveInvoice/{correctiveInvoiceId}/details/{correctiveInvoiceDetailId}": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] @@ -18023,31 +17937,28 @@ "parameters": [ { "in": "path", - "name": "contactId", - "description": "Contact ID", + "name": "correctiveInvoiceDetailId", "required": true, "schema": { - "type": "integer" + "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.contact.Contact" - } + }, + { + "in": "path", + "name": "correctiveInvoiceId", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.contact.Contact" + "$ref": "#/components/schemas/billing.CorrectiveInvoiceDetail" } } } @@ -18061,15 +17972,16 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/contact/edit", + "name": "account:apiovh:me/correctiveInvoice/details/get", + "description": "Get details of a corrective invoice for your account", "required": true } ] } }, - "/me/contact/{contactId}/fields": { + "/me/correctiveInvoice/{correctiveInvoiceId}/payment": { "get": { - "summary": "Get mandatory/read-only information about the fields of a contact", + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] @@ -18078,11 +17990,10 @@ "parameters": [ { "in": "path", - "name": "contactId", - "description": "Contact ID", + "name": "correctiveInvoiceId", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -18092,10 +18003,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/me.contact.FieldInformation" - } + "$ref": "#/components/schemas/billing.Payment" } } } @@ -18109,7 +18017,8 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/contact/fields/get", + "name": "account:apiovh:me/correctiveInvoice/payment/get", + "description": "Get payment information for a corrective invoice of your account", "required": true } ] @@ -19794,14 +19703,50 @@ ] } }, - "/me/fax/customDomains": { + "/me/downPaymentInvoice": { "get": { - "summary": "Get the fax custom domains linked to the customer account", + "summary": "List of all the downPaymentInvoice the logged account has", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "query", + "name": "category", + "description": "Filter the value of category property (=)", + "schema": { + "$ref": "#/components/schemas/billing.CategoryEnum" + } + }, + { + "in": "query", + "name": "date.from", + "description": "Filter the value of date property (>=)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "date.to", + "description": "Filter the value of date property (<=)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "orderId", + "description": "Filter the value of orderId property (=)", + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "successful operation", @@ -19810,7 +19755,7 @@ "schema": { "type": "array", "items": { - "type": "integer" + "type": "string" } } } @@ -19825,45 +19770,39 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fax/customDomains/get", + "name": "account:apiovh:me/downPaymentInvoice/get", + "description": "Get downPayment invoices for your account", "required": true } ], - "x-expanded-response": "TelephonyMailDomain2Service" - }, - "post": { - "summary": "Create a custom domain for your fax services", + "x-expanded-response": "BillingDownPaymentInvoice" + } + }, + "/me/downPaymentInvoice/{downPaymentInvoiceId}": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "The custom domain of your fax services" - } - }, - "required": [ - "domain" - ] - } + "parameters": [ + { + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/telephony.MailDomain2Service" + "$ref": "#/components/schemas/billing.DownPaymentInvoice" } } } @@ -19877,15 +19816,16 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fax/customDomains/create", + "name": "account:apiovh:me/downPaymentInvoice/get", + "description": "Get downPayment invoices for your account", "required": true } ] } }, - "/me/fax/customDomains/{id}": { - "delete": { - "summary": "Delete a custom domain of your fax services", + "/me/downPaymentInvoice/{downPaymentInvoiceId}/debt": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] @@ -19894,16 +19834,23 @@ "parameters": [ { "in": "path", - "name": "id", + "name": "downPaymentInvoiceId", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/debt.Debt" + } + } + } } }, "x-badges": [ @@ -19914,25 +19861,36 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fax/customDomains/delete", + "name": "account:apiovh:me/downPaymentInvoice/debt/get", + "description": "Get debt information for a downPayment invoice of your account", "required": true } ] - }, + } + }, + "/me/downPaymentInvoice/{downPaymentInvoiceId}/debt/operation": { "get": { - "summary": "Get this object properties", + "summary": "All operations related to these debts", "security": [ { "oAuth2AuthCode": [] } ], "parameters": [ + { + "in": "query", + "name": "depositOrderId", + "description": "Filter the value of depositOrderId property (=)", + "schema": { + "type": "integer" + } + }, { "in": "path", - "name": "id", + "name": "downPaymentInvoiceId", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], @@ -19942,7 +19900,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/telephony.MailDomain2Service" + "type": "array", + "items": { + "type": "integer" + } } } } @@ -19956,69 +19917,38 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fax/customDomains/get", + "name": "account:apiovh:me/downPaymentInvoice/debt/operation/get", + "description": "Get debt operations for a specific downPayment invoice of your account", "required": true } - ] + ], + "x-expanded-response": "DebtOperation" } }, - "/me/feedback": { - "post": { - "summary": "Post customer feedback on V6 Manager", + "/me/downPaymentInvoice/{downPaymentInvoiceId}/debt/operation/{operationId}": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "description": "Your feedback text" - }, - "subject": { - "type": "string", - "description": "Subject of your request" - } - }, - "required": [ - "body", - "subject" - ] - } - } - } - }, - "responses": { - "200": { - "description": "successful operation" - } - }, - "x-badges": [ - { - "color": "orange", - "label": "Internal use only" - } - ], - "x-iam-actions": [ - { - "name": "account:apiovh:me/feedback/create", - "required": true - } - ] - } - }, - "/me/fidelityAccount": { - "get": { - "summary": "Get this object properties", - "security": [ + "parameters": [ { - "oAuth2AuthCode": [] + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "operationId", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { @@ -20027,7 +19957,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/billing.FidelityAccount" + "$ref": "#/components/schemas/debt.Operation" } } } @@ -20041,31 +19971,49 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fidelityAccount/get", + "name": "account:apiovh:me/downPaymentInvoice/debt/operation/get", + "description": "Get a specific debt operation of a downPayment invoice for your account", "required": true } ] - }, - "put": { - "summary": "Alter this object properties", + } + }, + "/me/downPaymentInvoice/{downPaymentInvoiceId}/debt/operation/{operationId}/associatedObject": { + "get": { + "summary": "Return main data about the object related to this debt operation", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/billing.FidelityAccount" - } + "parameters": [ + { + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "operationId", + "required": true, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/debt.entry.AssociatedObject" + } + } + } } }, "x-badges": [ @@ -20076,39 +20024,31 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fidelityAccount/edit", + "name": "account:apiovh:me/downPaymentInvoice/debt/operation/associatedObject/get", + "description": "Get associated objects of a debt operation for a downPayment invoice of your account", "required": true } ] } }, - "/me/fidelityAccount/creditOrder": { + "/me/downPaymentInvoice/{downPaymentInvoiceId}/debt/pay": { "post": { - "summary": "Generate an order that can be paid in order to credit the fidelity account", + "summary": "Create an order in order to pay this order's debt", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "amount": { - "type": "integer", - "description": "The amount of points you want to credit your fidelity account of" - } - }, - "required": [ - "amount" - ] - } + "parameters": [ + { + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "successful operation", @@ -20129,15 +20069,16 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fidelityAccount/creditOrder", + "name": "account:apiovh:me/downPaymentInvoice/debt/pay", + "description": "Pay the debt of a downPayment invoice for your account", "required": true } ] } }, - "/me/fidelityAccount/movements": { + "/me/downPaymentInvoice/{downPaymentInvoiceId}/details": { "get": { - "summary": "List of entries of the fidelity account", + "summary": "Give access to all entries of the DownPaymentInvoice", "security": [ { "oAuth2AuthCode": [] @@ -20145,21 +20086,11 @@ ], "parameters": [ { - "in": "query", - "name": "date.from", - "description": "Filter the value of date property (>=)", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "in": "query", - "name": "date.to", - "description": "Filter the value of date property (<=)", + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, "schema": { - "type": "string", - "format": "date-time" + "type": "string" } } ], @@ -20171,7 +20102,7 @@ "schema": { "type": "array", "items": { - "type": "integer" + "type": "string" } } } @@ -20186,14 +20117,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fidelityAccount/movements/get", + "name": "account:apiovh:me/downPaymentInvoice/details/get", + "description": "Get details of a downPayment invoice for your account", "required": true } ], - "x-expanded-response": "BillingFidelityMovement" + "x-expanded-response": "BillingDownPaymentInvoiceDetail" } }, - "/me/fidelityAccount/movements/{movementId}": { + "/me/downPaymentInvoice/{downPaymentInvoiceId}/details/{downPaymentInvoiceDetailId}": { "get": { "summary": "Get this object properties", "security": [ @@ -20204,10 +20136,18 @@ "parameters": [ { "in": "path", - "name": "movementId", + "name": "downPaymentInvoiceDetailId", "required": true, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" } } ], @@ -20217,7 +20157,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/billing.FidelityMovement" + "$ref": "#/components/schemas/billing.DownPaymentInvoiceDetail" } } } @@ -20231,22 +20171,38 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/fidelityAccount/movements/get", + "name": "account:apiovh:me/downPaymentInvoice/details/get", + "description": "Get details of a downPayment invoice for your account", "required": true } ] } }, - "/me/geolocation": { - "post": { - "summary": "Fetch visitor country & region", + "/me/downPaymentInvoice/{downPaymentInvoiceId}/payment": { + "get": { + "summary": "Get this object properties", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "downPaymentInvoiceId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.geolocation.ContinentCountryLocation" + "$ref": "#/components/schemas/billing.Payment" } } } @@ -20257,12 +20213,19 @@ "color": "green", "label": "Stable production version" } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/downPaymentInvoice/payment/get", + "description": "Get payment information for a downPayment invoice of your account", + "required": true + } ] } }, - "/me/identity/group": { + "/me/fax/customDomains": { "get": { - "summary": "Retrieve all IAM groups of this account", + "summary": "Get the fax custom domains linked to the customer account", "security": [ { "oAuth2AuthCode": [] @@ -20276,7 +20239,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "type": "integer" } } } @@ -20291,14 +20254,14 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/group/get", + "name": "account:apiovh:me/fax/customDomains/get", "required": true } ], - "x-expanded-response": "AuthGroup" + "x-expanded-response": "TelephonyMailDomain2Service" }, "post": { - "summary": "Create a new IAM group", + "summary": "Create a custom domain for your fax services", "security": [ { "oAuth2AuthCode": [] @@ -20309,7 +20272,16 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.GroupRequest" + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "The custom domain of your fax services" + } + }, + "required": [ + "domain" + ] } } } @@ -20320,7 +20292,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.Group" + "$ref": "#/components/schemas/telephony.MailDomain2Service" } } } @@ -20334,31 +20306,123 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/group/create", + "name": "account:apiovh:me/fax/customDomains/create", "required": true } ] } }, - "/me/identity/group/{group}": { + "/me/fax/customDomains/{id}": { "delete": { - "summary": "Delete an IAM group", + "summary": "Delete a custom domain of your fax services", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "successful operation" + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/fax/customDomains/delete", + "required": true + } + ] + }, + "get": { + "summary": "Get this object properties", + "security": [ + { + "oAuth2AuthCode": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/telephony.MailDomain2Service" + } + } + } + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/fax/customDomains/get", + "required": true + } + ] + } + }, + "/me/feedback": { + "post": { + "summary": "Post customer feedback on V6 Manager", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "group", - "description": "Group", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "Your feedback text" + }, + "subject": { + "type": "string", + "description": "Subject of your request" + } + }, + "required": [ + "body", + "subject" + ] + } } } - ], + }, "responses": { "200": { "description": "successful operation" @@ -20366,42 +20430,33 @@ }, "x-badges": [ { - "color": "green", - "label": "Stable production version" + "color": "orange", + "label": "Internal use only" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/group/delete", + "name": "account:apiovh:me/feedback/create", "required": true } ] - }, + } + }, + "/me/fidelityAccount": { "get": { - "summary": "Get an IAM group", + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "group", - "description": "Group", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.Group" + "$ref": "#/components/schemas/billing.FidelityAccount" } } } @@ -20415,36 +20470,24 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/group/get", + "name": "account:apiovh:me/fidelityAccount/get", "required": true } - ], - "x-response-identifier": "name" + ] }, "put": { - "summary": "Alter an IAM group", + "summary": "Alter this object properties", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "group", - "description": "Group", - "required": true, - "schema": { - "type": "string" - } - } - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.Group" + "$ref": "#/components/schemas/billing.FidelityAccount" } } } @@ -20462,23 +20505,49 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/group/edit", + "name": "account:apiovh:me/fidelityAccount/edit", "required": true } ] } }, - "/me/identity/provider": { - "delete": { - "summary": "Remove the identity provider", + "/me/fidelityAccount/creditOrder": { + "post": { + "summary": "Generate an order that can be paid in order to credit the fidelity account", "security": [ { "oAuth2AuthCode": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "description": "The amount of points you want to credit your fidelity account of" + } + }, + "required": [ + "amount" + ] + } + } + } + }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/billing.Order" + } + } + } } }, "x-badges": [ @@ -20489,25 +20558,50 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/provider/delete", + "name": "account:apiovh:me/fidelityAccount/creditOrder", "required": true } ] - }, + } + }, + "/me/fidelityAccount/movements": { "get": { - "summary": "Get the identity provider linked to this account", + "summary": "List of entries of the fidelity account", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "query", + "name": "date.from", + "description": "Filter the value of date property (>=)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "in": "query", + "name": "date.to", + "description": "Filter the value of date property (<=)", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.Provider" + "type": "array", + "items": { + "type": "integer" + } } } } @@ -20521,35 +20615,38 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/provider/get", + "name": "account:apiovh:me/fidelityAccount/movements/get", "required": true } - ] - }, - "post": { - "summary": "Define an identity provider (SAML 2.0)", + ], + "x-expanded-response": "BillingFidelityMovement" + } + }, + "/me/fidelityAccount/movements/{movementId}": { + "get": { + "summary": "Get this object properties", "security": [ { "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/auth.ProviderRequest" - } + "parameters": [ + { + "in": "path", + "name": "movementId", + "required": true, + "schema": { + "type": "integer" } } - }, + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.Provider" + "$ref": "#/components/schemas/billing.FidelityMovement" } } } @@ -20563,31 +20660,25 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/provider/create", + "name": "account:apiovh:me/fidelityAccount/movements/get", "required": true } ] - }, - "put": { - "summary": "Alter the provider", - "security": [ - { - "oAuth2AuthCode": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/auth.Provider" - } - } - } - }, + } + }, + "/me/geolocation": { + "post": { + "summary": "Fetch visitor country & region", "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.geolocation.ContinentCountryLocation" + } + } + } } }, "x-badges": [ @@ -20595,18 +20686,12 @@ "color": "green", "label": "Stable production version" } - ], - "x-iam-actions": [ - { - "name": "account:apiovh:me/identity/provider/edit", - "required": true - } ] } }, - "/me/identity/user": { + "/me/identity/group": { "get": { - "summary": "Retrieve all IAM users of this account", + "summary": "Retrieve all IAM groups of this account", "security": [ { "oAuth2AuthCode": [] @@ -20635,14 +20720,14 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/get", + "name": "account:apiovh:me/identity/group/get", "required": true } ], - "x-expanded-response": "AuthUser" + "x-expanded-response": "AuthGroup" }, "post": { - "summary": "Create a new IAM user", + "summary": "Create a new IAM group", "security": [ { "oAuth2AuthCode": [] @@ -20653,27 +20738,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.UserRequest" - }, - "examples": { - "regular user": { - "value": { - "description": "My 1st user", - "email": "user@mycompany.example", - "group": "DEFAULT", - "login": "my_user", - "password": "ItsASecret", - "type": "USER" - }, - "summary": "Create a new IAM user" - } + "$ref": "#/components/schemas/auth.GroupRequest" } } } }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.Group" + } + } + } } }, "x-badges": [ @@ -20684,15 +20763,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/create", + "name": "account:apiovh:me/identity/group/create", "required": true } ] } }, - "/me/identity/user/{user}": { + "/me/identity/group/{group}": { "delete": { - "summary": "Delete an IAM user", + "summary": "Delete an IAM group", "security": [ { "oAuth2AuthCode": [] @@ -20701,8 +20780,8 @@ "parameters": [ { "in": "path", - "name": "user", - "description": "User", + "name": "group", + "description": "Group", "required": true, "schema": { "type": "string" @@ -20722,13 +20801,13 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/delete", + "name": "account:apiovh:me/identity/group/delete", "required": true } ] }, "get": { - "summary": "Get an IAM user", + "summary": "Get an IAM group", "security": [ { "oAuth2AuthCode": [] @@ -20737,8 +20816,8 @@ "parameters": [ { "in": "path", - "name": "user", - "description": "User", + "name": "group", + "description": "Group", "required": true, "schema": { "type": "string" @@ -20751,7 +20830,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.User" + "$ref": "#/components/schemas/auth.Group" } } } @@ -20765,14 +20844,14 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/get", + "name": "account:apiovh:me/identity/group/get", "required": true } ], - "x-response-identifier": "login" + "x-response-identifier": "name" }, "put": { - "summary": "Alter an IAM user", + "summary": "Alter an IAM group", "security": [ { "oAuth2AuthCode": [] @@ -20781,8 +20860,8 @@ "parameters": [ { "in": "path", - "name": "user", - "description": "User", + "name": "group", + "description": "Group", "required": true, "schema": { "type": "string" @@ -20794,7 +20873,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.User" + "$ref": "#/components/schemas/auth.Group" } } } @@ -20812,15 +20891,15 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/edit", + "name": "account:apiovh:me/identity/group/edit", "required": true } ] } }, - "/me/identity/user/{user}/disable": { - "post": { - "summary": "Disable this user", + "/me/identity/group/{group}/user": { + "get": { + "summary": "List the users of this group", "security": [ { "oAuth2AuthCode": [] @@ -20829,8 +20908,8 @@ "parameters": [ { "in": "path", - "name": "user", - "description": "User", + "name": "group", + "description": "Group", "required": true, "schema": { "type": "string" @@ -20839,7 +20918,17 @@ ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } }, "x-badges": [ @@ -20850,15 +20939,13 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/disable", + "name": "account:apiovh:me/identity/group/user/get", "required": true } ] - } - }, - "/me/identity/user/{user}/enable": { + }, "post": { - "summary": "Enable this user", + "summary": "Add a user to the group", "security": [ { "oAuth2AuthCode": [] @@ -20867,14 +20954,24 @@ "parameters": [ { "in": "path", - "name": "user", - "description": "User", + "name": "group", + "description": "Group", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.GroupUser" + } + } + } + }, "responses": { "200": { "description": "successful operation" @@ -20888,21 +20985,30 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/enable", + "name": "account:apiovh:me/identity/group/user/add", "required": true } ] } }, - "/me/identity/user/{user}/token": { - "get": { - "summary": "Retrieve all personal access tokens from this user", + "/me/identity/group/{group}/user/{user}": { + "delete": { + "summary": "Remove a user from the group", "security": [ { "oAuth2AuthCode": [] } ], "parameters": [ + { + "in": "path", + "name": "group", + "description": "Group", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "path", "name": "user", @@ -20915,17 +21021,7 @@ ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "description": "successful operation" } }, "x-badges": [ @@ -20936,50 +21032,23 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/token/get", + "name": "account:apiovh:me/identity/group/user/remove", "required": true } - ], - "x-expanded-response": "AuthPersonalAccessToken" - }, - "post": { - "summary": "Create a new personal access token", + ] + } + }, + "/me/identity/provider": { + "delete": { + "summary": "Remove the identity provider", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "user", - "description": "User", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/auth.PersonalAccessTokenRequest" - } - } - } - }, "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/auth.PersonalAccessTokenResponse" - } - } - } + "description": "successful operation" } }, "x-badges": [ @@ -20990,43 +21059,28 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/token/create", + "name": "account:apiovh:me/identity/provider/delete", "required": true } ] - } - }, - "/me/identity/user/{user}/token/{name}": { - "delete": { - "summary": "Delete a personal access token", + }, + "get": { + "summary": "Get the identity provider linked to this account", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "user", - "description": "User", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.Provider" + } + } + } } }, "x-badges": [ @@ -21037,45 +21091,35 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/token/delete", + "name": "account:apiovh:me/identity/provider/get", "required": true } ] }, - "get": { - "summary": "Get a personal access token's information", + "post": { + "summary": "Define an identity provider (SAML 2.0)", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "user", - "description": "User", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.ProviderRequest" + } } } - ], + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.PersonalAccessToken" + "$ref": "#/components/schemas/auth.Provider" } } } @@ -21089,56 +21133,62 @@ ], "x-iam-actions": [ { - "name": "account:apiovh:me/identity/user/token/get", + "name": "account:apiovh:me/identity/provider/create", "required": true } - ], - "x-response-identifier": "name" + ] }, "put": { - "summary": "Alter a user personal acces token", + "summary": "Alter the provider", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "name", - "description": "Name", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.Provider" + } } - }, + } + }, + "responses": { + "200": { + "description": "successful operation" + } + }, + "x-badges": [ + { + "color": "green", + "label": "Stable production version" + } + ], + "x-iam-actions": [ + { + "name": "account:apiovh:me/identity/provider/edit", + "required": true + } + ] + } + }, + "/me/identity/provider/samlServiceProviderInfo": { + "get": { + "summary": "Get information related to OVHcloud as a SAMLv2 service provider", + "security": [ { - "in": "path", - "name": "user", - "description": "User", - "required": true, - "schema": { - "type": "string" - } + "oAuth2AuthCode": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/auth.PersonalAccessTokenModifyRequest" - } - } - } - }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/auth.PersonalAccessToken" + "$ref": "#/components/schemas/auth.ServiceProviderInfo" } } } @@ -21146,21 +21196,15 @@ }, "x-badges": [ { - "color": "green", - "label": "Stable production version" - } - ], - "x-iam-actions": [ - { - "name": "account:apiovh:me/identity/user/token/edit", - "required": true + "color": "orange", + "label": "Internal use only" } ] } }, - "/me/incident/sbg/migrateServices": { + "/me/identity/user": { "get": { - "summary": "Get all services you can migrate", + "summary": "Retrieve all IAM users of this account", "security": [ { "oAuth2AuthCode": [] @@ -21174,7 +21218,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/me.incident.ServiceMigration" + "type": "string" } } } @@ -21183,19 +21227,20 @@ }, "x-badges": [ { - "color": "blue", - "label": "Alpha version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/incident/sbg/migrateServices/get", + "name": "account:apiovh:me/identity/user/get", "required": true } - ] + ], + "x-expanded-response": "AuthUser" }, "post": { - "summary": "Ask for impacted services migration", + "summary": "Create a new IAM user", "security": [ { "oAuth2AuthCode": [] @@ -21206,92 +21251,105 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/me.incident.MigrateServices" + "$ref": "#/components/schemas/auth.UserRequest" + }, + "examples": { + "regular user": { + "value": { + "description": "My 1st user", + "email": "user@mycompany.example", + "group": "DEFAULT", + "login": "my_user", + "password": "ItsASecret", + "type": "USER" + }, + "summary": "Create a new IAM user" + } } } } }, "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.incident.Order" - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "blue", - "label": "Alpha version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/incident/sbg/migrateServices/create", + "name": "account:apiovh:me/identity/user/create", "required": true } ] } }, - "/me/insight": { - "get": { - "summary": "Get your insight access token", + "/me/identity/user/{user}": { + "delete": { + "summary": "Delete an IAM user", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "user", + "description": "User", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/me.insight.Access" - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/insight/get", + "name": "account:apiovh:me/identity/user/delete", "required": true } ] - } - }, - "/me/installationTemplate": { + }, "get": { - "summary": "Your customized operating system installation templates", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "summary": "Get an IAM user", "security": [ { "oAuth2AuthCode": [] } ], + "parameters": [ + { + "in": "path", + "name": "user", + "description": "User", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/auth.User" } } } @@ -21299,25 +21357,20 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/get", + "name": "account:apiovh:me/identity/user/get", "required": true } ], - "x-expanded-response": "DedicatedInstallationTemplateTemplates" - } - }, - "/me/installationTemplate/{templateName}": { - "delete": { - "summary": "Remove this template", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "x-response-identifier": "login" + }, + "put": { + "summary": "Alter an IAM user", "security": [ { "oAuth2AuthCode": [] @@ -21326,14 +21379,24 @@ "parameters": [ { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.User" + } + } + } + }, "responses": { "200": { "description": "successful operation" @@ -21341,22 +21404,21 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/delete", + "name": "account:apiovh:me/identity/user/edit", "required": true } ] - }, - "get": { - "summary": "Get this object properties", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + } + }, + "/me/identity/user/{user}/disable": { + "post": { + "summary": "Disable this user", "security": [ { "oAuth2AuthCode": [] @@ -21365,8 +21427,8 @@ "parameters": [ { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" @@ -21375,36 +21437,26 @@ ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dedicated.installationTemplate.Templates" - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/get", + "name": "account:apiovh:me/identity/user/disable", "required": true } ] } }, - "/me/installationTemplate/{templateName}/partitionScheme": { - "get": { - "summary": "Partitioning schemes available on this template", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "/me/identity/user/{user}/enable": { + "post": { + "summary": "Enable this user", "security": [ { "oAuth2AuthCode": [] @@ -21413,8 +21465,8 @@ "parameters": [ { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" @@ -21423,40 +21475,26 @@ ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/get", + "name": "account:apiovh:me/identity/user/enable", "required": true } - ], - "x-expanded-response": "DedicatedInstallationTemplateTemplatePartitioningSchemes" + ] } }, - "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}": { - "delete": { - "summary": "Remove this scheme of partition", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "/me/identity/user/{user}/token": { + "get": { + "summary": "Retrieve all personal access tokens from this user", "security": [ { "oAuth2AuthCode": [] @@ -21465,17 +21503,8 @@ "parameters": [ { "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" @@ -21484,59 +21513,68 @@ ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/delete", + "name": "account:apiovh:me/identity/user/token/get", "required": true } - ] + ], + "x-expanded-response": "AuthPersonalAccessToken" }, - "get": { - "summary": "Get this object properties", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "post": { + "summary": "Create a new personal access token", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", - "required": true, - "schema": { - "type": "string" - } - }, + "parameters": [ { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.PersonalAccessTokenRequest" + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dedicated.installationTemplate.templatePartitioningSchemes" + "$ref": "#/components/schemas/auth.PersonalAccessTokenResponse" } } } @@ -21544,24 +21582,21 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/get", + "name": "account:apiovh:me/identity/user/token/create", "required": true } ] } }, - "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid": { - "get": { - "summary": "Hardware RAIDs defined in this partitioning scheme", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "/me/identity/user/{user}/token/{name}": { + "delete": { + "summary": "Delete a personal access token", "security": [ { "oAuth2AuthCode": [] @@ -21570,8 +21605,8 @@ "parameters": [ { "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", + "name": "name", + "description": "Name", "required": true, "schema": { "type": "string" @@ -21579,8 +21614,8 @@ }, { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" @@ -21589,40 +21624,24 @@ ], "responses": { "200": { - "description": "successful operation", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "description": "successful operation" } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/hardwareRaid/get", + "name": "account:apiovh:me/identity/user/token/delete", "required": true } - ], - "x-expanded-response": "DedicatedInstallationTemplateHardwareRaid" - } - }, - "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name}": { - "delete": { - "summary": "Remove this RAID", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + ] + }, + "get": { + "summary": "Get a personal access token's information", "security": [ { "oAuth2AuthCode": [] @@ -21632,16 +21651,7 @@ { "in": "path", "name": "name", - "description": "Hardware RAID name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", + "description": "Name", "required": true, "schema": { "type": "string" @@ -21649,8 +21659,8 @@ }, { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" @@ -21659,27 +21669,32 @@ ], "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.PersonalAccessToken" + } + } + } } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/hardwareRaid/delete", + "name": "account:apiovh:me/identity/user/token/get", "required": true } - ] + ], + "x-response-identifier": "name" }, - "get": { - "summary": "Get this object properties", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "put": { + "summary": "Alter a user personal acces token", "security": [ { "oAuth2AuthCode": [] @@ -21689,16 +21704,7 @@ { "in": "path", "name": "name", - "description": "Hardware RAID name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", + "description": "Name", "required": true, "schema": { "type": "string" @@ -21706,21 +21712,31 @@ }, { "in": "path", - "name": "templateName", - "description": "This template name", + "name": "user", + "description": "User", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/auth.PersonalAccessTokenModifyRequest" + } + } + } + }, "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dedicated.installationTemplate.hardwareRaid" + "$ref": "#/components/schemas/auth.PersonalAccessToken" } } } @@ -21728,49 +21744,26 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/hardwareRaid/get", + "name": "account:apiovh:me/identity/user/token/edit", "required": true } ] } }, - "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/partition": { + "/me/incident/sbg/migrateServices": { "get": { - "summary": "Partitions defined in this partitioning scheme", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "summary": "Get all services you can migrate", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "templateName", - "description": "This template name", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "successful operation", @@ -21779,7 +21772,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/me.incident.ServiceMigration" } } } @@ -21788,123 +21781,75 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/partition/get", + "name": "account:apiovh:me/incident/sbg/migrateServices/get", "required": true } - ], - "x-expanded-response": "DedicatedInstallationTemplateTemplatePartitions" - } - }, - "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/partition/{mountpoint}": { - "delete": { - "summary": "Remove this partition", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + ] + }, + "post": { + "summary": "Ask for impacted services migration", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "mountpoint", - "description": "Partition mount point", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "templateName", - "description": "This template name", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.incident.MigrateServices" + } } } - ], + }, "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/me.incident.Order" + } + } + } } }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "blue", + "label": "Alpha version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/partition/delete", + "name": "account:apiovh:me/incident/sbg/migrateServices/create", "required": true } ] - }, + } + }, + "/me/insight": { "get": { - "summary": "Get this object properties", - "deprecated": true, - "x-deprecation-date": "2025-04-28T00:00:00Z", - "x-deletion-date": "2025-10-07T00:00:00Z", + "summary": "Get your insight access token", "security": [ { "oAuth2AuthCode": [] } ], - "parameters": [ - { - "in": "path", - "name": "mountpoint", - "description": "Partition mount point", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "schemeName", - "description": "This partitioning scheme name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "templateName", - "description": "This template name", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dedicated.installationTemplate.templatePartitions" + "$ref": "#/components/schemas/me.insight.Access" } } } @@ -21912,13 +21857,13 @@ }, "x-badges": [ { - "color": "red", - "label": "Deprecated, will be removed" + "color": "blue", + "label": "Beta version" } ], "x-iam-actions": [ { - "name": "account:apiovh:me/installationTemplate/partitionScheme/partition/get", + "name": "account:apiovh:me/insight/get", "required": true } ] @@ -22189,7 +22134,7 @@ "x-badges": [ { "color": "blue", - "label": "Beta version" + "label": "Alpha version" } ], "x-iam-actions": [ @@ -22225,8 +22170,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22271,8 +22216,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22320,8 +22265,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22363,8 +22308,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22414,8 +22359,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22458,8 +22403,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ @@ -22503,8 +22448,8 @@ }, "x-badges": [ { - "color": "blue", - "label": "Beta version" + "color": "green", + "label": "Stable production version" } ], "x-iam-actions": [ diff --git a/internal/cmd/cloud_storage_file.go b/internal/cmd/cloud_storage_file.go index b183182b..fdb71782 100644 --- a/internal/cmd/cloud_storage_file.go +++ b/internal/cmd/cloud_storage_file.go @@ -6,6 +6,7 @@ package cmd import ( "github.com/ovh/ovhcloud-cli/internal/assets" + "github.com/ovh/ovhcloud-cli/internal/flags" "github.com/ovh/ovhcloud-cli/internal/services/cloud" "github.com/spf13/cobra" ) @@ -13,12 +14,18 @@ import ( func initCloudStorageFileCommand(cloudCmd *cobra.Command) { storageFileCmd := &cobra.Command{ Use: "file", - Short: "Manage file storage shares in the given cloud project", + Short: "Manage file storage in the given cloud project", } storageFileCmd.PersistentFlags().StringVar(&cloud.CloudProject, "cloud-project", "", "Cloud project ID") - storageFileCmd.PersistentFlags().StringVar(&cloud.ShareRegion, "region", "", "Region (skip region discovery if set)") - // Share commands + initCloudStorageFileShareCommand(storageFileCmd) + initCloudStorageFileSnapshotCommand(storageFileCmd) + initCloudStorageFileNetworkCommand(storageFileCmd) + + cloudCmd.AddCommand(storageFileCmd) +} + +func initCloudStorageFileShareCommand(storageFileCmd *cobra.Command) { shareCmd := &cobra.Command{ Use: "share", Short: "Manage file storage shares", @@ -28,141 +35,171 @@ func initCloudStorageFileCommand(cloudCmd *cobra.Command) { shareListCmd := &cobra.Command{ Use: "list", Aliases: []string{"ls"}, - Short: "List shares", + Short: "List file storage shares", Run: cloud.ListShares, } shareCmd.AddCommand(withFilterFlag(shareListCmd)) shareCmd.AddCommand(&cobra.Command{ Use: "get ", - Short: "Get a specific share", + Short: "Get a specific file storage share", Run: cloud.GetShare, Args: cobra.ExactArgs(1), }) shareCmd.AddCommand(getShareCreateCmd()) - - shareEditCmd := &cobra.Command{ - Use: "edit ", - Short: "Edit the given share", - Run: cloud.EditShare, - Args: cobra.ExactArgs(1), - } - shareEditCmd.Flags().StringVar(&cloud.ShareEditSpec.Description, "description", "", "Share description") - shareEditCmd.Flags().StringVar(&cloud.ShareEditSpec.Name, "name", "", "Share name") - shareEditCmd.Flags().IntVar(&cloud.ShareEditSpec.NewSize, "new-size", 0, "New share size in GB") - addInteractiveEditorFlag(shareEditCmd) - shareCmd.AddCommand(shareEditCmd) + shareCmd.AddCommand(getShareEditCmd()) shareCmd.AddCommand(&cobra.Command{ Use: "delete ", - Short: "Delete the given share", + Short: "Delete the given file storage share", Run: cloud.DeleteShare, Args: cobra.ExactArgs(1), }) +} - // ACL subcommands - aclCmd := &cobra.Command{ - Use: "acl", - Short: "Manage share access control lists", - } - shareCmd.AddCommand(aclCmd) - - aclListCmd := &cobra.Command{ - Use: "list ", - Aliases: []string{"ls"}, - Short: "List ACLs for the given share", - Run: cloud.ListShareACLs, - Args: cobra.ExactArgs(1), +func getShareCreateCmd() *cobra.Command { + shareCreateCmd := &cobra.Command{ + Use: "create", + Short: "Create a new file storage share", + Run: cloud.CreateShare, } - aclCmd.AddCommand(withFilterFlag(aclListCmd)) + shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.TargetSpec.Name, "name", "", "Name of the file storage share") + shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.TargetSpec.Description, "description", "", "Description of the file storage share") + shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.TargetSpec.Protocol, "protocol", "", "File sharing protocol (NFS)") + shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.TargetSpec.ShareType, "share-type", "", "File storage type / performance tier (STANDARD_1AZ)") + shareCreateCmd.Flags().IntVar(&cloud.ShareSpec.TargetSpec.Size, "size", 0, "Size of the file storage share in GB") + shareCreateCmd.Flags().StringVar(&cloud.ShareLocationRegion, "region", "", "Region where the share is created") + shareCreateCmd.Flags().StringVar(&cloud.ShareLocationAvailabilityZone, "availability-zone", "", "Availability zone within the region") + shareCreateCmd.Flags().StringVar(&cloud.ShareNetworkID, "share-network-id", "", "ID of the share network to attach the share to") + shareCreateCmd.Flags().BoolVar(&flags.WaitForTask, "wait", false, "Wait for the share to be ready before exiting") + + addParameterFileFlags(shareCreateCmd, false, assets.CloudV2OpenapiSchema, "/publicCloud/project/{projectId}/storage/file/share", "post", cloud.FileStorageShareCreateExample, nil) + addInteractiveEditorFlag(shareCreateCmd) + markFlagsMutuallyExclusive(shareCreateCmd, "from-file", "editor") - aclCmd.AddCommand(&cobra.Command{ - Use: "get ", - Short: "Get a specific ACL for the given share", - Run: cloud.GetShareACL, - Args: cobra.ExactArgs(2), - }) + return shareCreateCmd +} - aclCreateCmd := &cobra.Command{ - Use: "create ", - Short: "Create an ACL for the given share", - Run: cloud.CreateShareACL, +func getShareEditCmd() *cobra.Command { + shareEditCmd := &cobra.Command{ + Use: "edit ", + Short: "Edit the given file storage share", + Run: cloud.EditShare, Args: cobra.ExactArgs(1), } - aclCreateCmd.Flags().StringVar(&cloud.ShareACLSpec.AccessLevel, "access-level", "", "Access level (ro, rw)") - aclCreateCmd.Flags().StringVar(&cloud.ShareACLSpec.AccessTo, "access-to", "", "Access target (IP address or CIDR)") - aclCmd.AddCommand(aclCreateCmd) - - aclCmd.AddCommand(&cobra.Command{ - Use: "delete ", - Short: "Delete an ACL from the given share", - Run: cloud.DeleteShareACL, - Args: cobra.ExactArgs(2), - }) + shareEditCmd.Flags().StringVar(&cloud.ShareEditSpec.TargetSpec.Name, "name", "", "Name of the file storage share") + shareEditCmd.Flags().StringVar(&cloud.ShareEditSpec.TargetSpec.Description, "description", "", "Description of the file storage share") + shareEditCmd.Flags().IntVar(&cloud.ShareEditSpec.TargetSpec.Size, "size", 0, "New size of the file storage share in GB") + + addParameterFileFlags(shareEditCmd, true, assets.CloudV2OpenapiSchema, "/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}", "put", "", nil) + addInteractiveEditorFlag(shareEditCmd) + markFlagsMutuallyExclusive(shareEditCmd, "from-file", "editor") + + return shareEditCmd +} - // Snapshot subcommands +func initCloudStorageFileSnapshotCommand(storageFileCmd *cobra.Command) { snapshotCmd := &cobra.Command{ Use: "snapshot", - Short: "Manage share snapshots", + Short: "Manage file storage snapshots", } - shareCmd.AddCommand(snapshotCmd) + storageFileCmd.AddCommand(snapshotCmd) snapshotListCmd := &cobra.Command{ - Use: "list ", + Use: "list", Aliases: []string{"ls"}, - Short: "List snapshots for the given share", - Run: cloud.ListShareSnapshots, - Args: cobra.ExactArgs(1), + Short: "List file storage snapshots", + Run: cloud.ListFileStorageSnapshots, } snapshotCmd.AddCommand(withFilterFlag(snapshotListCmd)) snapshotCmd.AddCommand(&cobra.Command{ - Use: "get ", - Short: "Get a specific snapshot for the given share", - Run: cloud.GetShareSnapshot, - Args: cobra.ExactArgs(2), + Use: "get ", + Short: "Get a specific file storage snapshot", + Run: cloud.GetFileStorageSnapshot, + Args: cobra.ExactArgs(1), }) snapshotCreateCmd := &cobra.Command{ - Use: "create ", - Short: "Create a snapshot of the given share", - Run: cloud.CreateShareSnapshot, - Args: cobra.ExactArgs(1), + Use: "create", + Short: "Create a new file storage snapshot", + Run: cloud.CreateFileStorageSnapshot, } - snapshotCreateCmd.Flags().StringVar(&cloud.ShareSnapshotSpec.Description, "description", "", "Snapshot description") - snapshotCreateCmd.Flags().StringVar(&cloud.ShareSnapshotSpec.Name, "name", "", "Snapshot name") + snapshotCreateCmd.Flags().StringVar(&cloud.SnapshotSpec.TargetSpec.Name, "name", "", "Name of the snapshot") + snapshotCreateCmd.Flags().StringVar(&cloud.SnapshotSpec.TargetSpec.Description, "description", "", "Description of the snapshot") + snapshotCreateCmd.Flags().StringVar(&cloud.SnapshotShareID, "share-id", "", "ID of the file storage share to snapshot") + snapshotCreateCmd.Flags().BoolVar(&flags.WaitForTask, "wait", false, "Wait for the snapshot to be ready before exiting") snapshotCmd.AddCommand(snapshotCreateCmd) + snapshotEditCmd := &cobra.Command{ + Use: "edit ", + Short: "Edit the given file storage snapshot", + Run: cloud.EditFileStorageSnapshot, + Args: cobra.ExactArgs(1), + } + snapshotEditCmd.Flags().StringVar(&cloud.SnapshotEditSpec.TargetSpec.Name, "name", "", "Name of the snapshot") + snapshotEditCmd.Flags().StringVar(&cloud.SnapshotEditSpec.TargetSpec.Description, "description", "", "Description of the snapshot") + addInteractiveEditorFlag(snapshotEditCmd) + snapshotCmd.AddCommand(snapshotEditCmd) + snapshotCmd.AddCommand(&cobra.Command{ - Use: "delete ", - Short: "Delete a snapshot from the given share", - Run: cloud.DeleteShareSnapshot, - Args: cobra.ExactArgs(2), + Use: "delete ", + Short: "Delete the given file storage snapshot", + Run: cloud.DeleteFileStorageSnapshot, + Args: cobra.ExactArgs(1), }) - - cloudCmd.AddCommand(storageFileCmd) } -func getShareCreateCmd() *cobra.Command { - shareCreateCmd := &cobra.Command{ - Use: "create ", - Short: "Create a new share", - Run: cloud.CreateShare, - Args: cobra.ExactArgs(1), +func initCloudStorageFileNetworkCommand(storageFileCmd *cobra.Command) { + networkCmd := &cobra.Command{ + Use: "network", + Short: "Manage file storage share networks", } - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.AvailabilityZone, "availability-zone", "", "Availability zone (required in 3AZ regions)") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.Description, "description", "", "Share description") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.Name, "name", "", "Share name") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.NetworkId, "network-id", "", "Network ID") - shareCreateCmd.Flags().IntVar(&cloud.ShareSpec.Size, "size", 0, "Share size in GB") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.SnapshotId, "snapshot-id", "", "Snapshot ID to create the share from") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.SubnetId, "subnet-id", "", "Subnet ID") - shareCreateCmd.Flags().StringVar(&cloud.ShareSpec.Type, "type", "", "Share type") - - addParameterFileFlags(shareCreateCmd, false, assets.CloudOpenapiSchema, "/cloud/project/{serviceName}/region/{regionName}/share", "post", cloud.ShareCreateExample, nil) - addInteractiveEditorFlag(shareCreateCmd) - markFlagsMutuallyExclusive(shareCreateCmd, "from-file", "editor") + storageFileCmd.AddCommand(networkCmd) - return shareCreateCmd + networkListCmd := &cobra.Command{ + Use: "list", + Aliases: []string{"ls"}, + Short: "List file storage share networks", + Run: cloud.ListFileStorageNetworks, + } + networkCmd.AddCommand(withFilterFlag(networkListCmd)) + + networkCmd.AddCommand(&cobra.Command{ + Use: "get ", + Short: "Get a specific file storage share network", + Run: cloud.GetFileStorageNetwork, + Args: cobra.ExactArgs(1), + }) + + networkCmd.AddCommand(getFileStorageNetworkCreateCmd()) + + networkCmd.AddCommand(&cobra.Command{ + Use: "delete ", + Short: "Delete the given file storage share network", + Run: cloud.DeleteFileStorageNetwork, + Args: cobra.ExactArgs(1), + }) +} + +func getFileStorageNetworkCreateCmd() *cobra.Command { + networkCreateCmd := &cobra.Command{ + Use: "create", + Short: "Create a new file storage share network", + Run: cloud.CreateFileStorageNetwork, + } + networkCreateCmd.Flags().StringVar(&cloud.NetworkSpec.TargetSpec.Name, "name", "", "Name of the share network") + networkCreateCmd.Flags().StringVar(&cloud.NetworkSpec.TargetSpec.Description, "description", "", "Description of the share network") + networkCreateCmd.Flags().StringVar(&cloud.NetworkLocationRegion, "region", "", "Region where the share network is created") + networkCreateCmd.Flags().StringVar(&cloud.NetworkLocationAvailabilityZone, "availability-zone", "", "Availability zone within the region") + networkCreateCmd.Flags().StringVar(&cloud.NetworkNetworkID, "network-id", "", "ID of the private network to back the share network") + networkCreateCmd.Flags().StringVar(&cloud.NetworkSubnetID, "subnet-id", "", "ID of the subnet to back the share network") + networkCreateCmd.Flags().BoolVar(&flags.WaitForTask, "wait", false, "Wait for the share network to be ready before exiting") + + addParameterFileFlags(networkCreateCmd, false, assets.CloudV2OpenapiSchema, "/publicCloud/project/{projectId}/storage/file/network", "post", cloud.FileStorageNetworkCreateExample, nil) + addInteractiveEditorFlag(networkCreateCmd) + markFlagsMutuallyExclusive(networkCreateCmd, "from-file", "editor") + + return networkCreateCmd } diff --git a/internal/cmd/cloud_storage_file_test.go b/internal/cmd/cloud_storage_file_test.go new file mode 100644 index 00000000..4f0b82d9 --- /dev/null +++ b/internal/cmd/cloud_storage_file_test.go @@ -0,0 +1,138 @@ +// SPDX-FileCopyrightText: 2025 OVH SAS +// +// SPDX-License-Identifier: Apache-2.0 + +package cmd_test + +import ( + "net/http" + + "github.com/jarcoal/httpmock" + "github.com/maxatome/go-testdeep/td" + "github.com/maxatome/tdhttpmock" + "github.com/ovh/ovhcloud-cli/internal/cmd" +) + +func (ms *MockSuite) TestCloudStorageFileShareListCmd(assert, require *td.T) { + httpmock.RegisterResponder(http.MethodGet, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/share", + httpmock.NewStringResponder(200, `[ + { + "id": "share-1234", + "resourceStatus": "READY", + "currentState": { + "name": "my-share", + "protocol": "NFS", + "size": 100, + "location": {"region": "GRA1"} + } + } + ]`), + ) + + out, err := cmd.Execute("cloud", "storage", "file", "share", "list", "--cloud-project", "fakeProjectID") + require.CmpNoError(err) + assert.Cmp(out, td.Contains("my-share")) + assert.Cmp(out, td.Contains("GRA1")) +} + +func (ms *MockSuite) TestCloudStorageFileShareCreateCmd(assert, require *td.T) { + httpmock.RegisterMatcherResponder(http.MethodPost, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/share", + tdhttpmock.JSONBody(td.JSON(` + { + "targetSpec": { + "name": "my-share", + "protocol": "NFS", + "shareType": "STANDARD_1AZ", + "size": 100, + "location": {"region": "GRA1"} + } + }`), + ), + httpmock.NewStringResponder(200, `{"id": "share-1234"}`), + ) + + out, err := cmd.Execute("cloud", "storage", "file", "share", "create", + "--cloud-project", "fakeProjectID", + "--name", "my-share", + "--protocol", "NFS", + "--share-type", "STANDARD_1AZ", + "--size", "100", + "--region", "GRA1", + ) + require.CmpNoError(err) + assert.Cmp(out, td.Contains("share-1234")) +} + +func (ms *MockSuite) TestCloudStorageFileShareCreateCmdError(assert, require *td.T) { + httpmock.RegisterResponder(http.MethodPost, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/share", + httpmock.NewStringResponder(400, `{"class": "Client::BadRequest::InvalidParameter", "message": "Invalid parameter in the request"}`), + ) + + _, err := cmd.Execute("cloud", "storage", "file", "share", "create", + "--cloud-project", "fakeProjectID", + "--name", "my-share", + "--protocol", "NFS", + "--share-type", "STANDARD_1AZ", + "--size", "100", + "--region", "GRA1", + ) + assert.CmpError(err) + assert.Cmp(err.Error(), td.Contains("failed to create file storage share")) +} + +func (ms *MockSuite) TestCloudStorageFileSnapshotCreateCmd(assert, require *td.T) { + httpmock.RegisterMatcherResponder(http.MethodPost, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/snapshot", + tdhttpmock.JSONBody(td.JSON(` + { + "targetSpec": { + "name": "my-snapshot", + "share": {"id": "share-1234"} + } + }`), + ), + httpmock.NewStringResponder(200, `{"id": "snapshot-5678"}`), + ) + + out, err := cmd.Execute("cloud", "storage", "file", "snapshot", "create", + "--cloud-project", "fakeProjectID", + "--name", "my-snapshot", + "--share-id", "share-1234", + ) + require.CmpNoError(err) + assert.Cmp(out, td.Contains("snapshot-5678")) +} + +func (ms *MockSuite) TestCloudStorageFileNetworkGetCmd(assert, require *td.T) { + httpmock.RegisterResponder(http.MethodGet, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/network/network-9012", + httpmock.NewStringResponder(200, `{ + "id": "network-9012", + "resourceStatus": "READY", + "currentState": { + "name": "my-share-network", + "location": {"region": "GRA1"}, + "network": {"id": "priv-net-1"}, + "subnet": {"id": "subnet-1"} + } + }`), + ) + + out, err := cmd.Execute("cloud", "storage", "file", "network", "get", "network-9012", "--cloud-project", "fakeProjectID") + require.CmpNoError(err) + assert.Cmp(out, td.Contains("my-share-network")) +} + +func (ms *MockSuite) TestCloudStorageFileNetworkDeleteCmd(assert, require *td.T) { + httpmock.RegisterResponder(http.MethodDelete, + "https://eu.api.ovh.com/v2/publicCloud/project/fakeProjectID/storage/file/network/network-9012", + httpmock.NewStringResponder(204, ``), + ) + + out, err := cmd.Execute("cloud", "storage", "file", "network", "delete", "network-9012", "--cloud-project", "fakeProjectID") + require.CmpNoError(err) + assert.Cmp(out, td.Contains("network-9012")) +} diff --git a/internal/services/cloud/cloud_storage_file.go b/internal/services/cloud/cloud_storage_file.go index 49b9938e..606927bb 100644 --- a/internal/services/cloud/cloud_storage_file.go +++ b/internal/services/cloud/cloud_storage_file.go @@ -8,10 +8,10 @@ import ( _ "embed" "fmt" "net/url" + "time" "github.com/ovh/ovhcloud-cli/internal/assets" "github.com/ovh/ovhcloud-cli/internal/display" - filtersLib "github.com/ovh/ovhcloud-cli/internal/filters" "github.com/ovh/ovhcloud-cli/internal/flags" httpLib "github.com/ovh/ovhcloud-cli/internal/http" "github.com/ovh/ovhcloud-cli/internal/services/common" @@ -19,83 +19,123 @@ import ( ) var ( - shareColumnsToDisplay = []string{"id", "name", "region", "protocol", "size", "status"} - shareSnapshotColumnsToDisplay = []string{"id", "name", "shareId", "size", "status"} - shareACLColumnsToDisplay = []string{"id", "accessLevel", "accessTo", "accessType", "status"} + fileStorageShareColumnsToDisplay = []string{ + "id", + "currentState.name name", + "currentState.location.region region", + "currentState.protocol protocol", + "currentState.size size", + "resourceStatus", + } + fileStorageSnapshotColumnsToDisplay = []string{ + "id", + "currentState.name name", + "currentState.share.id shareId", + "currentState.size size", + "resourceStatus", + } + fileStorageNetworkColumnsToDisplay = []string{ + "id", + "currentState.name name", + "currentState.location.region region", + "currentState.network.id networkId", + "resourceStatus", + } //go:embed templates/cloud_storage_file_share.tmpl - shareTemplate string + fileStorageShareTemplate string + + //go:embed templates/cloud_storage_file_snapshot.tmpl + fileStorageSnapshotTemplate string - //go:embed templates/cloud_storage_file_share_snapshot.tmpl - shareSnapshotTemplate string + //go:embed templates/cloud_storage_file_network.tmpl + fileStorageNetworkTemplate string //go:embed parameter-samples/storage-file-share-create.json - ShareCreateExample string + FileStorageShareCreateExample string + + //go:embed parameter-samples/storage-file-snapshot-create.json + FileStorageSnapshotCreateExample string + + //go:embed parameter-samples/storage-file-network-create.json + FileStorageNetworkCreateExample string + + // Nested objects are built from these scalar flags before the request is sent. + ShareLocationRegion string + ShareLocationAvailabilityZone string + ShareNetworkID string + + SnapshotShareID string + + NetworkLocationRegion string + NetworkLocationAvailabilityZone string + NetworkNetworkID string + NetworkSubnetID string ShareSpec struct { - AvailabilityZone string `json:"availabilityZone,omitempty"` - Description string `json:"description,omitempty"` - Name string `json:"name,omitempty"` - NetworkId string `json:"networkId,omitempty"` - Size int `json:"size,omitempty"` - SnapshotId string `json:"snapshotId,omitempty"` - SubnetId string `json:"subnetId,omitempty"` - Type string `json:"type,omitempty"` + TargetSpec struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Protocol string `json:"protocol,omitempty"` + ShareType string `json:"shareType,omitempty"` + Size int `json:"size,omitempty"` + Location *FileStorageLocation `json:"location,omitempty"` + ShareNetwork *FileStorageRef `json:"shareNetwork,omitempty"` + AccessRules []FileStorageAccessRule `json:"accessRules,omitempty"` + } `json:"targetSpec"` } ShareEditSpec struct { - Description string `json:"description,omitempty"` - Name string `json:"name,omitempty"` - NewSize int `json:"newSize,omitempty"` + TargetSpec struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Size int `json:"size,omitempty"` + } `json:"targetSpec"` } - ShareSnapshotSpec struct { - Description string `json:"description,omitempty"` - Name string `json:"name,omitempty"` + SnapshotSpec struct { + TargetSpec struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Share *FileStorageRef `json:"share,omitempty"` + } `json:"targetSpec"` } - ShareACLSpec struct { - AccessLevel string `json:"accessLevel,omitempty"` - AccessTo string `json:"accessTo,omitempty"` + SnapshotEditSpec struct { + TargetSpec struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + } `json:"targetSpec"` } - ShareRegion string -) - -// getShareRegions returns a single-element slice if --region is set, -// otherwise discovers all regions with the share feature available. -func getShareRegions(projectID string) ([]any, error) { - if ShareRegion != "" { - return []any{ShareRegion}, nil + NetworkSpec struct { + TargetSpec struct { + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Location *FileStorageLocation `json:"location,omitempty"` + Network *FileStorageRef `json:"network,omitempty"` + Subnet *FileStorageRef `json:"subnet,omitempty"` + } `json:"targetSpec"` } - return getCloudRegionsWithFeatureAvailable(projectID, "share") -} +) -// findShare searches for a share across all regions and returns its endpoint and data. -func findShare(shareID string) (string, map[string]any, error) { - projectID, err := getConfiguredCloudProject() - if err != nil { - return "", nil, err +type ( + FileStorageLocation struct { + Region string `json:"region,omitempty"` + AvailabilityZone string `json:"availabilityZone,omitempty"` } - regions, err := getShareRegions(projectID) - if err != nil { - return "", nil, fmt.Errorf("failed to fetch regions with share feature available: %w", err) + FileStorageRef struct { + ID string `json:"id,omitempty"` } - for _, region := range regions { - var ( - share map[string]any - endpoint = fmt.Sprintf("/v1/cloud/project/%s/region/%s/share/%s", - projectID, url.PathEscape(region.(string)), url.PathEscape(shareID)) - ) - if err := httpLib.Client.Get(endpoint, &share); err == nil { - return endpoint, share, nil - } + FileStorageAccessRule struct { + AccessLevel string `json:"accessLevel,omitempty"` + AccessTo string `json:"accessTo,omitempty"` } +) - return "", nil, fmt.Errorf("no share found with ID %s", shareID) -} +// File storage shares func ListShares(_ *cobra.Command, _ []string) { projectID, err := getConfiguredCloudProject() @@ -104,70 +144,78 @@ func ListShares(_ *cobra.Command, _ []string) { return } - regions, err := getShareRegions(projectID) - if err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch regions with share feature available: %s", err) - return - } - - endpoint := fmt.Sprintf("/v1/cloud/project/%s/region", projectID) - shares, err := httpLib.FetchObjectsParallel[[]map[string]any](endpoint+"/%s/share", regions, true) - if err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch shares: %s", err) - return - } - - var allShares []map[string]any - for _, regionShares := range shares { - allShares = append(allShares, regionShares...) - } - - allShares, err = filtersLib.FilterLines(allShares, flags.GenericFilters) - if err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to filter results: %s", err) - return - } - - display.RenderTable(allShares, shareColumnsToDisplay, &flags.OutputFormatConfig) + common.ManageListRequestNoExpand( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/share", projectID), + fileStorageShareColumnsToDisplay, + flags.GenericFilters, + ) } func GetShare(_ *cobra.Command, args []string) { - _, share, err := findShare(args[0]) + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - display.OutputObject(share, args[0], shareTemplate, &flags.OutputFormatConfig) + common.ManageObjectRequest( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/share", projectID), + args[0], + fileStorageShareTemplate, + ) } -func CreateShare(cmd *cobra.Command, args []string) { +func CreateShare(cmd *cobra.Command, _ []string) { projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - endpoint := fmt.Sprintf("/v1/cloud/project/%s/region/%s/share", projectID, url.PathEscape(args[0])) - task, err := common.CreateResource( + ShareSpec.TargetSpec.Location = nil + if ShareLocationRegion != "" || ShareLocationAvailabilityZone != "" { + ShareSpec.TargetSpec.Location = &FileStorageLocation{ + Region: ShareLocationRegion, + AvailabilityZone: ShareLocationAvailabilityZone, + } + } + ShareSpec.TargetSpec.ShareNetwork = nil + if ShareNetworkID != "" { + ShareSpec.TargetSpec.ShareNetwork = &FileStorageRef{ID: ShareNetworkID} + } + + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/share", projectID) + share, err := common.CreateResource( cmd, - "/cloud/project/{serviceName}/region/{regionName}/share", + "/publicCloud/project/{projectId}/storage/file/share", endpoint, - ShareCreateExample, + FileStorageShareCreateExample, ShareSpec, - assets.CloudOpenapiSchema, - []string{"type"}, + assets.CloudV2OpenapiSchema, + []string{"targetSpec"}, ) if err != nil { - display.OutputError(&flags.OutputFormatConfig, "%s", err) + display.OutputError(&flags.OutputFormatConfig, "failed to create file storage share: %s", err) return } - display.OutputInfo(&flags.OutputFormatConfig, task, "✅ Share creation started successfully (operation ID: %s)", task["id"]) + shareID, _ := share["id"].(string) + + if !flags.WaitForTask { + display.OutputInfo(&flags.OutputFormatConfig, share, "⚡️ File storage share creation started successfully (id: %s)", shareID) + return + } + + if err := waitForCloudResourceReady(fmt.Sprintf("%s/%s", endpoint, url.PathEscape(shareID)), 30*time.Minute); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to wait for file storage share to be ready: %s", err) + return + } + + display.OutputInfo(&flags.OutputFormatConfig, share, "✅ File storage share %s created successfully", shareID) } func EditShare(cmd *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return @@ -175,10 +223,10 @@ func EditShare(cmd *cobra.Command, args []string) { if err := common.EditResource( cmd, - "/cloud/project/{serviceName}/region/{regionName}/share/{shareId}", - endpoint, + "/publicCloud/project/{projectId}/storage/file/share/{fileStorageId}", + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/share/%s", projectID, url.PathEscape(args[0])), ShareEditSpec, - assets.CloudOpenapiSchema, + assets.CloudV2OpenapiSchema, ); err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return @@ -186,160 +234,223 @@ func EditShare(cmd *cobra.Command, args []string) { } func DeleteShare(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var task map[string]any - if err := httpLib.Client.Delete(endpoint, &task); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to delete share: %s", err) + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/share/%s", projectID, url.PathEscape(args[0])) + if err := httpLib.Client.Delete(endpoint, nil); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to delete file storage share: %s", err) return } - display.OutputInfo(&flags.OutputFormatConfig, task, "✅ Share %s deletion started successfully (operation ID: %s)", args[0], task["id"]) - + display.OutputInfo(&flags.OutputFormatConfig, nil, "✅ File storage share %s is being deleted…", args[0]) } -// ACL commands +// File storage snapshots -func ListShareACLs(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func ListFileStorageSnapshots(_ *cobra.Command, _ []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var acls []map[string]any - if err := httpLib.Client.Get(endpoint+"/acl", &acls); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch share ACLs: %s", err) - return - } + common.ManageListRequestNoExpand( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/snapshot", projectID), + fileStorageSnapshotColumnsToDisplay, + flags.GenericFilters, + ) +} - acls, err = filtersLib.FilterLines(acls, flags.GenericFilters) +func GetFileStorageSnapshot(_ *cobra.Command, args []string) { + projectID, err := getConfiguredCloudProject() if err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to filter results: %s", err) + display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - display.RenderTable(acls, shareACLColumnsToDisplay, &flags.OutputFormatConfig) + common.ManageObjectRequest( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/snapshot", projectID), + args[0], + fileStorageSnapshotTemplate, + ) } -func GetShareACL(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func CreateFileStorageSnapshot(cmd *cobra.Command, _ []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var acl map[string]any - if err := httpLib.Client.Get(fmt.Sprintf("%s/acl/%s", endpoint, url.PathEscape(args[1])), &acl); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch share ACL: %s", err) + SnapshotSpec.TargetSpec.Share = nil + if SnapshotShareID != "" { + SnapshotSpec.TargetSpec.Share = &FileStorageRef{ID: SnapshotShareID} + } + + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/snapshot", projectID) + snapshot, err := common.CreateResource( + cmd, + "/publicCloud/project/{projectId}/storage/file/snapshot", + endpoint, + FileStorageSnapshotCreateExample, + SnapshotSpec, + assets.CloudV2OpenapiSchema, + []string{"targetSpec"}, + ) + if err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to create file storage snapshot: %s", err) + return + } + + snapshotID, _ := snapshot["id"].(string) + + if !flags.WaitForTask { + display.OutputInfo(&flags.OutputFormatConfig, snapshot, "⚡️ File storage snapshot creation started successfully (id: %s)", snapshotID) return } - display.OutputObject(acl, args[1], "", &flags.OutputFormatConfig) + if err := waitForCloudResourceReady(fmt.Sprintf("%s/%s", endpoint, url.PathEscape(snapshotID)), 30*time.Minute); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to wait for file storage snapshot to be ready: %s", err) + return + } + + display.OutputInfo(&flags.OutputFormatConfig, snapshot, "✅ File storage snapshot %s created successfully", snapshotID) } -func CreateShareACL(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func EditFileStorageSnapshot(cmd *cobra.Command, args []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var response map[string]any - if err := httpLib.Client.Post(endpoint+"/acl", ShareACLSpec, &response); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to create share ACL: %s", err) + if err := common.EditResource( + cmd, + "/publicCloud/project/{projectId}/storage/file/snapshot/{snapshotId}", + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/snapshot/%s", projectID, url.PathEscape(args[0])), + SnapshotEditSpec, + assets.CloudV2OpenapiSchema, + ); err != nil { + display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - - display.OutputInfo(&flags.OutputFormatConfig, response, "✅ ACL created successfully for share %s (id: %s)", args[0], response["id"]) } -func DeleteShareACL(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func DeleteFileStorageSnapshot(_ *cobra.Command, args []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - if err := httpLib.Client.Delete(fmt.Sprintf("%s/acl/%s", endpoint, url.PathEscape(args[1])), nil); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to delete share ACL: %s", err) + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/snapshot/%s", projectID, url.PathEscape(args[0])) + if err := httpLib.Client.Delete(endpoint, nil); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to delete file storage snapshot: %s", err) return } - display.OutputInfo(&flags.OutputFormatConfig, nil, "✅ ACL %s deleted successfully from share %s", args[1], args[0]) + display.OutputInfo(&flags.OutputFormatConfig, nil, "✅ File storage snapshot %s is being deleted…", args[0]) } -// Snapshot commands +// File storage share networks -func ListShareSnapshots(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func ListFileStorageNetworks(_ *cobra.Command, _ []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var snapshots []map[string]any - if err := httpLib.Client.Get(endpoint+"/snapshot", &snapshots); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch share snapshots: %s", err) - return - } + common.ManageListRequestNoExpand( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/network", projectID), + fileStorageNetworkColumnsToDisplay, + flags.GenericFilters, + ) +} - snapshots, err = filtersLib.FilterLines(snapshots, flags.GenericFilters) +func GetFileStorageNetwork(_ *cobra.Command, args []string) { + projectID, err := getConfiguredCloudProject() if err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to filter results: %s", err) + display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - display.RenderTable(snapshots, shareSnapshotColumnsToDisplay, &flags.OutputFormatConfig) + common.ManageObjectRequest( + fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/network", projectID), + args[0], + fileStorageNetworkTemplate, + ) } -func GetShareSnapshot(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func CreateFileStorageNetwork(cmd *cobra.Command, _ []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - var snapshot map[string]any - if err := httpLib.Client.Get(fmt.Sprintf("%s/snapshot/%s", endpoint, url.PathEscape(args[1])), &snapshot); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to fetch share snapshot: %s", err) + NetworkSpec.TargetSpec.Location = nil + if NetworkLocationRegion != "" || NetworkLocationAvailabilityZone != "" { + NetworkSpec.TargetSpec.Location = &FileStorageLocation{ + Region: NetworkLocationRegion, + AvailabilityZone: NetworkLocationAvailabilityZone, + } + } + NetworkSpec.TargetSpec.Network = nil + if NetworkNetworkID != "" { + NetworkSpec.TargetSpec.Network = &FileStorageRef{ID: NetworkNetworkID} + } + NetworkSpec.TargetSpec.Subnet = nil + if NetworkSubnetID != "" { + NetworkSpec.TargetSpec.Subnet = &FileStorageRef{ID: NetworkSubnetID} + } + + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/network", projectID) + network, err := common.CreateResource( + cmd, + "/publicCloud/project/{projectId}/storage/file/network", + endpoint, + FileStorageNetworkCreateExample, + NetworkSpec, + assets.CloudV2OpenapiSchema, + []string{"targetSpec"}, + ) + if err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to create file storage share network: %s", err) return } - display.OutputObject(snapshot, args[1], shareSnapshotTemplate, &flags.OutputFormatConfig) -} + networkID, _ := network["id"].(string) -func CreateShareSnapshot(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) - if err != nil { - display.OutputError(&flags.OutputFormatConfig, "%s", err) + if !flags.WaitForTask { + display.OutputInfo(&flags.OutputFormatConfig, network, "⚡️ File storage share network creation started successfully (id: %s)", networkID) return } - var response map[string]any - if err := httpLib.Client.Post(endpoint+"/snapshot", ShareSnapshotSpec, &response); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to create share snapshot: %s", err) + if err := waitForCloudResourceReady(fmt.Sprintf("%s/%s", endpoint, url.PathEscape(networkID)), 30*time.Minute); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to wait for file storage share network to be ready: %s", err) return } - display.OutputInfo(&flags.OutputFormatConfig, response, "✅ Snapshot created successfully for share %s (id: %s)", args[0], response["id"]) + display.OutputInfo(&flags.OutputFormatConfig, network, "✅ File storage share network %s created successfully", networkID) } -func DeleteShareSnapshot(_ *cobra.Command, args []string) { - endpoint, _, err := findShare(args[0]) +func DeleteFileStorageNetwork(_ *cobra.Command, args []string) { + projectID, err := getConfiguredCloudProject() if err != nil { display.OutputError(&flags.OutputFormatConfig, "%s", err) return } - if err := httpLib.Client.Delete(fmt.Sprintf("%s/snapshot/%s", endpoint, url.PathEscape(args[1])), nil); err != nil { - display.OutputError(&flags.OutputFormatConfig, "failed to delete share snapshot: %s", err) + endpoint := fmt.Sprintf("/v2/publicCloud/project/%s/storage/file/network/%s", projectID, url.PathEscape(args[0])) + if err := httpLib.Client.Delete(endpoint, nil); err != nil { + display.OutputError(&flags.OutputFormatConfig, "failed to delete file storage share network: %s", err) return } - display.OutputInfo(&flags.OutputFormatConfig, nil, "✅ Snapshot %s deleted successfully from share %s", args[1], args[0]) + display.OutputInfo(&flags.OutputFormatConfig, nil, "✅ File storage share network %s is being deleted…", args[0]) } diff --git a/internal/services/cloud/parameter-samples/storage-file-network-create.json b/internal/services/cloud/parameter-samples/storage-file-network-create.json new file mode 100644 index 00000000..254bf749 --- /dev/null +++ b/internal/services/cloud/parameter-samples/storage-file-network-create.json @@ -0,0 +1,15 @@ +{ + "targetSpec": { + "name": "my-share-network", + "description": "Share network for production", + "location": { + "region": "GRA1" + }, + "network": { + "id": "00000000-0000-0000-0000-000000000000" + }, + "subnet": { + "id": "00000000-0000-0000-0000-000000000000" + } + } +} diff --git a/internal/services/cloud/parameter-samples/storage-file-share-create.json b/internal/services/cloud/parameter-samples/storage-file-share-create.json index 8f00f996..ef16dee0 100644 --- a/internal/services/cloud/parameter-samples/storage-file-share-create.json +++ b/internal/services/cloud/parameter-samples/storage-file-share-create.json @@ -1,8 +1,21 @@ { - "name": "my-share", - "description": "My file share", - "size": 150, - "type": "standard-1az", - "networkId": "00000000-0000-0000-0000-000000000000", - "subnetId": "00000000-0000-0000-0000-000000000000" -} \ No newline at end of file + "targetSpec": { + "name": "my-share", + "description": "Production data share", + "protocol": "NFS", + "shareType": "STANDARD_1AZ", + "size": 100, + "location": { + "region": "GRA1" + }, + "shareNetwork": { + "id": "00000000-0000-0000-0000-000000000000" + }, + "accessRules": [ + { + "accessLevel": "READ_WRITE", + "accessTo": "10.0.0.42" + } + ] + } +} diff --git a/internal/services/cloud/parameter-samples/storage-file-snapshot-create.json b/internal/services/cloud/parameter-samples/storage-file-snapshot-create.json new file mode 100644 index 00000000..55df18e0 --- /dev/null +++ b/internal/services/cloud/parameter-samples/storage-file-snapshot-create.json @@ -0,0 +1,9 @@ +{ + "targetSpec": { + "name": "my-share-snapshot", + "description": "Daily backup snapshot", + "share": { + "id": "00000000-0000-0000-0000-000000000000" + } + } +} diff --git a/internal/services/cloud/templates/cloud_storage_file_network.tmpl b/internal/services/cloud/templates/cloud_storage_file_network.tmpl new file mode 100644 index 00000000..f7360ffc --- /dev/null +++ b/internal/services/cloud/templates/cloud_storage_file_network.tmpl @@ -0,0 +1,22 @@ +🌐 File Storage Share Network {{.ServiceName}} +======= + +_{{index .Result "currentState" "name"}}_ + +## General information + +**ID**: {{index .Result "id"}} +**Status**: {{index .Result "resourceStatus"}} +**Creation date**: {{index .Result "createdAt"}} +**Update date**: {{index .Result "updatedAt"}} + +## Current state +{{with index .Result "currentState"}} +**Name**: {{index . "name"}} +{{if index . "location"}}**Region**: {{index . "location" "region"}}{{end}} +{{if index . "network"}}**Network ID**: {{index . "network" "id"}}{{end}} +{{if index . "subnet"}}**Subnet ID**: {{index . "subnet" "id"}}{{end}} +{{if index . "description"}}**Description**: {{index . "description"}}{{end}} +{{end}} + +💡 Use option -o json or -o yaml to get the raw output with all information diff --git a/internal/services/cloud/templates/cloud_storage_file_share.tmpl b/internal/services/cloud/templates/cloud_storage_file_share.tmpl index d245032d..2bcca425 100644 --- a/internal/services/cloud/templates/cloud_storage_file_share.tmpl +++ b/internal/services/cloud/templates/cloud_storage_file_share.tmpl @@ -1,20 +1,38 @@ -🚀 Share {{.ServiceName}} +📁 File Storage Share {{.ServiceName}} ======= -_{{index .Result "description"}}_ +_{{index .Result "currentState" "name"}}_ ## General information -**Name**: {{index .Result "name"}} -**Region**: {{index .Result "region"}} -**Availability zone**: {{index .Result "availabilityZone"}} -**Protocol**: {{index .Result "protocol"}} -**Type**: {{index .Result "type"}} -**Status**: {{index .Result "status"}} -**Size**: {{index .Result "size"}}GB -**Public**: {{index .Result "isPublic"}} -**Network ID**: {{index .Result "networkId"}} -**Subnet ID**: {{index .Result "subnetId"}} -**Created at**: {{index .Result "createdAt"}} - -💡 Use option -o json or -o yaml to get the raw output with all information \ No newline at end of file +**ID**: {{index .Result "id"}} +**Status**: {{index .Result "resourceStatus"}} +**Creation date**: {{index .Result "createdAt"}} +**Update date**: {{index .Result "updatedAt"}} + +## Current state +{{with index .Result "currentState"}} +**Name**: {{index . "name"}} +**Protocol**: {{index . "protocol"}} +**Type**: {{index . "shareType"}} +**Size**: {{index . "size"}} GB +{{if index . "location"}}**Region**: {{index . "location" "region"}}{{end}} +{{if index . "description"}}**Description**: {{index . "description"}}{{end}} + +{{if index . "accessRules"}} +### Access rules + +| Access level | Access to | +| --- | --- | +{{range index . "accessRules"}}| {{.accessLevel}} | {{.accessTo}} | +{{end}} +{{end}} +{{if index . "exportLocations"}} +### Export locations + +{{range index . "exportLocations"}}- {{.}} +{{end}} +{{end}} +{{end}} + +💡 Use option -o json or -o yaml to get the raw output with all information diff --git a/internal/services/cloud/templates/cloud_storage_file_share_snapshot.tmpl b/internal/services/cloud/templates/cloud_storage_file_share_snapshot.tmpl deleted file mode 100644 index 4fefa633..00000000 --- a/internal/services/cloud/templates/cloud_storage_file_share_snapshot.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -🚀 Share Snapshot {{.ServiceName}} -======= - -_{{index .Result "description"}}_ - -## General information - -**Name**: {{index .Result "name"}} -**Share ID**: {{index .Result "shareId"}} -**Share protocol**: {{index .Result "shareProtocol"}} -**Share size**: {{index .Result "shareSize"}}GB -**Size**: {{index .Result "size"}}GB -**Status**: {{index .Result "status"}} -**Created at**: {{index .Result "createdAt"}} - -💡 Use option -o json or -o yaml to get the raw output with all information \ No newline at end of file diff --git a/internal/services/cloud/templates/cloud_storage_file_snapshot.tmpl b/internal/services/cloud/templates/cloud_storage_file_snapshot.tmpl new file mode 100644 index 00000000..becca951 --- /dev/null +++ b/internal/services/cloud/templates/cloud_storage_file_snapshot.tmpl @@ -0,0 +1,22 @@ +📸 File Storage Snapshot {{.ServiceName}} +======= + +_{{index .Result "currentState" "name"}}_ + +## General information + +**ID**: {{index .Result "id"}} +**Status**: {{index .Result "resourceStatus"}} +**Creation date**: {{index .Result "createdAt"}} +**Update date**: {{index .Result "updatedAt"}} + +## Current state +{{with index .Result "currentState"}} +**Name**: {{index . "name"}} +**Size**: {{index . "size"}} GB +{{if index . "share"}}**Share ID**: {{index . "share" "id"}}{{end}} +{{if index . "location"}}**Region**: {{index . "location" "region"}}{{end}} +{{if index . "description"}}**Description**: {{index . "description"}}{{end}} +{{end}} + +💡 Use option -o json or -o yaml to get the raw output with all information diff --git a/internal/services/cloud/utils.go b/internal/services/cloud/utils.go index 3e376f63..3cbbe3de 100644 --- a/internal/services/cloud/utils.go +++ b/internal/services/cloud/utils.go @@ -116,6 +116,53 @@ func runFlavorSelector(projectID string, region string) (string, string, error) return selectedFlavor, selectedID, nil } +// waitForCloudResourceReady polls a Cloud API v2 resource endpoint until its +// resourceStatus reaches "READY". Tasks reported in error in currentTasks are +// logged but do not abort the wait: only the resource's own resourceStatus +// becoming "ERROR" is fatal. It gives up after retryDuration. +func waitForCloudResourceReady(endpoint string, retryDuration time.Duration) error { + ctx, cancel := context.WithTimeout(context.Background(), retryDuration) + defer cancel() + + ticker := time.NewTicker(5 * time.Second) + defer ticker.Stop() + + for { + var resource struct { + ResourceStatus string `json:"resourceStatus"` + CurrentTasks []struct { + Id string `json:"id"` + Type string `json:"type"` + Status string `json:"status"` + } `json:"currentTasks"` + } + if err := httpLib.Client.Get(endpoint, &resource); err != nil { + return fmt.Errorf("error fetching resource: %w", err) + } + + switch resource.ResourceStatus { + case "READY": + return nil + case "ERROR": + return errors.New("resource ended in error state") + } + + for _, task := range resource.CurrentTasks { + if task.Status == "ERROR" { + log.Printf("⚠️ Task %s (%s) is in error, still waiting for resource to become ready…", task.Id, task.Type) + } + } + + select { + case <-ctx.Done(): + return errors.New("timeout waiting for resource to be ready") + case <-ticker.C: + log.Printf("Still waiting for resource to be ready (status=%s)…", resource.ResourceStatus) + continue + } + } +} + func waitForCloudOperation(projectID, operationID, action string, retryDuration time.Duration) (string, error) { endpoint := fmt.Sprintf("/v1/cloud/project/%s/operation/%s", url.PathEscape(projectID), url.PathEscape(operationID)) resourceID := ""