Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com> Reviewed-by: Drobnak, David <david.drobnak@t-systems.com> Co-authored-by: Li, Qiao <qiaoli@huawei.com> Co-committed-by: Li, Qiao <qiaoli@huawei.com>
11 KiB
Changing the Protection Status
Function
This API is used to change the protection status.
URI
POST /v5/{project_id}/host-management/protection
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID Minimum: 1 Maximum: 256 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID. The value 0 indicates the default enterprise project. To query all enterprise projects, set this parameter to all_granted_eps. Default: 0 Minimum: 1 Maximum: 256 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Minimum: 1 Maximum: 32768 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
version |
No |
String |
HSS edition. Its value can be:
|
charging_mode |
No |
String |
on_demand: pay-per-use |
resource_id |
No |
String |
Instance ID Minimum: 1 Maximum: 128 |
host_id_list |
No |
Array of strings |
Server list Minimum: 1 Maximum: 128 Array Length: 0 - 2097152 |
tags |
No |
Array of TagInfo objects |
Resource tag Array Length: 0 - 2097152 |
Response Parameters
None
Example Requests
Switch the protection edition of the server whose ID is 71a15ecc-049f-4cca-bd28-5e90aca1817f to the enterprise edition.
{ "version" : "hss.version.enterprise", "charging_mode" : "on_demand", "resource_id" : "af4d08ad-2b60-4916-a5cf-8d6a23956dda", "host_id_list" : [ "71a15ecc-049f-4cca-bd28-5e90aca1817f" ], "tags" : [ { "key" : "Service", "value" : "hss" } ] }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
successful response |
Error Codes
See Error Codes.