Enable/Disable application protection and update the protection port.
Function
This API is used to enable or disable application protection, select the protection policy to be enabled, select the server to be protected, and deliver the protection policy. You can enter the port number to update the protection port. If protection is disabled, the policy is cleared.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
PUT /v5/{project_id}/rasp/status
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
host_id_list |
Yes |
Array of strings |
HostId list |
|
app_status |
Yes |
Boolean |
Application protection switch status |
|
app_type |
No |
String |
Application protection type |
|
policy_id |
No |
String |
Policy ID |
|
auto_attach |
No |
Boolean |
Dynamic protection switch status |
|
rasp_port_list |
No |
Array of integers |
RASP port list. The list elements correspond to host_id_list. This parameter takes effect when app_status is set to true. |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Disable application protection.
POST https://{endpoint}/v5/{project_id}/rasp/status
{
"app_status" : false,
"host_id_list" : [ "f8b8c960-0057-4c32-9ece-567a3641ff25" ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot