Creating a Retry Emergency Policy
Function
This API is used to create a retry emergency policy.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/workspaces/{workspace_id}/soc/policys
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID Constraints N/A Range N/A Default Value N/A |
|
workspace_id |
Yes |
String |
Definition Workspace ID. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action_type |
Yes |
String |
Operation type. The value can be create or retry. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token Constraints N/A Range N/A Default Value N/A |
|
content-type |
Yes |
String |
Definition Content type.
Constraints N/A Range
Default Value N/A |
|
x-secmaster-version |
Yes |
String |
Service version, for example, 25.5.0. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
data_object |
No |
data_object object |
Policy entity information. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
retry_list |
No |
Array of strings |
Retry policy ID. |
|
block_age |
Yes |
block_age object |
Block aging. |
|
block_target |
Yes |
String |
Policy object. |
|
defense_policy_list |
Yes |
Array of defense_policy_list objects |
List of policies corresponding to the operation connection. |
|
description |
No |
String |
Description. |
|
labels |
No |
String |
Tag. |
|
policy_category |
Yes |
String |
Type. The value can be WHITE or BLOCK. WHITE: Objects such as IP addresses will be added to the whitelist. BLOCK: The objects such as IP addresses will be added to the blacklist. |
|
policy_type |
Yes |
policy_type object |
Block type. |
|
region_id |
Yes |
String |
Region ID. |
|
policy_direction |
No |
String |
Inbound or outbound. |
|
account_scope |
No |
String |
Account scope. |
|
eps_scope |
No |
String |
Enterprise project scope. |
|
region_scope |
No |
String |
Region range. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
is_block_ageing |
Yes |
Boolean |
Whether to block aging. |
|
block_ageing |
No |
String |
Aging time. The value is a timestamp, in ms. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
defense_connection_id |
Yes |
String |
Operation connection ID. |
|
defense_connection_name |
Yes |
String |
Operation connection name. |
|
defense_connection_region_id |
Yes |
String |
Region ID for the defense layer policy. |
|
defense_connection_region_name |
Yes |
String |
Region for the defense layer policy. |
|
defense_type |
Yes |
String |
Defense layer service. |
|
target_enterprise_id |
Yes |
String |
Enterprise project ID. |
|
target_enterprise_name |
Yes |
String |
Enterprise project name. |
|
target_project_id |
Yes |
String |
Project ID for the defense layer policy. |
|
target_project_name |
Yes |
String |
Project ID for the defense layer policy. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Status code. |
|
data |
String |
Delivered task ID. |
|
message |
String |
Status Information. |
|
request_id |
String |
Request ID. |
|
success |
Boolean |
Request status. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code. Range N/A |
|
message |
String |
Definition Error description. Range N/A |
Example Requests
https://secmaster-qa.cn-north-7.myhuaweicloud.com/v1/{project_id}/workspaces/{workspace_id}/soc/policys?action_type=create
{
"data_object" : {
"region_id" : "cn-north-7",
"block_target" : "1.2.3.4",
"policy_category" : "BLOCK",
"description" : "",
"labels" : "",
"block_age" : {
"is_block_ageing" : false,
"block_ageing" : null
},
"policy_type" : {
"policy_type" : "Source Ip"
},
"defense_policy_list" : [ {
"defense_connection_id" : "84b273d3-47a8-3aba-bd00-7bdd1431d635",
"defense_connection_name" : "CFW authentication token.",
"defense_type" : "CFW",
"target_enterprise_id" : "0",
"target_enterprise_name" : "default",
"target_project_id" : "3bb27e024693436da46b5f5aaf499060",
"target_project_name" : "cn-north-7",
"defense_connection_region_id" : "cn-north-7",
"defense_connection_region_name" : "XXX"
} ]
}
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response body for creating an emergency policy. |
|
400 |
Response body for an emergency policy creation error. |
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