Obtaining the Security Policy List
Function
This API is used to obtain security policy configurations in a project.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/security-policies
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Unique project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
Number of records on each page. |
|
name |
No |
String |
Policy name (for filtering). |
|
offset |
No |
Integer |
Pagination offset. |
|
type |
No |
String |
Policy type, which can be GDE (database encryption), GDE_DECRYPT (database decryption), DOM (database O&M), DBSS (DBSS service), DDM (dynamic database masking), or SDM (static database masking). |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
policy_list |
Array of PolicyResponse objects |
Policy information list. |
|
total |
Long |
Total number of policies. |
|
Parameter |
Type |
Description |
|---|---|---|
|
dbss_policy |
DbssPolicy object |
Database audit policy. |
|
ddm_config |
DdmConfig object |
Dynamic data masking policy. |
|
ddm_policy_list |
Array of DdmPolicy objects |
array |
|
dom_config |
DomConfig object |
Database O&M policy (not supported currently). |
|
dom_policy |
DomPolicy object |
Database O&M policy information. |
|
enabled |
Boolean |
Whether a policy is enabled. |
|
gde_config |
GdeConfig object |
Database encryption policy. |
|
gde_policy |
GdePolicy object |
Encryption policy. |
|
id |
Long |
Policy ID. |
|
name |
String |
Policy name. |
|
related_datasource_id |
String |
ID of the data source associated with the policy. |
|
related_datasource_name |
String |
Name of the data source associated with the policy. |
|
related_datasource_type |
String |
Type of the data source associated with the policy. |
|
related_instance_id |
String |
ID of the instance that executes the policy. |
|
related_instance_name |
String |
Name of the instance that executes the policy. |
|
related_instance_type |
String |
Type of the instance that executes the policy. |
|
resource |
ResourceInfo object |
Data source information. |
|
status |
String |
Policy status. |
|
type |
String |
Policy type. |
|
update_time |
Long |
Policy update time. |
|
Parameter |
Type |
Description |
|---|---|---|
|
data_mask |
Boolean |
Privacy data masking. |
|
show_result |
Boolean |
Whether to display the result set. |
|
Parameter |
Type |
Description |
|---|---|---|
|
proxy_port |
Integer |
Agent port. |
|
zk_election_port |
Integer |
User-defined ZooKeeper election port, which is available only for big data (HBase and Hive). |
|
zk_port |
Integer |
User-defined ZooKeeper port, which is available only for big data (HBase and Hive). |
|
Parameter |
Type |
Description |
|---|---|---|
|
columns |
Array of Column objects |
Columns configured for the policy. |
|
namespace |
String |
Namespace name. |
|
table |
String |
Table name. |
|
Parameter |
Type |
Description |
|---|---|---|
|
custom_policy |
Boolean |
Whether to use a custom policy. |
|
data_audit |
Boolean |
Whether to perform data audit. |
|
default_action |
String |
Default action of a policy, such as pass, block, and audit. |
|
intelligent_protection_baseline |
Boolean |
Whether to enable the intelligent protection baseline. |
|
virtual_patch |
Boolean |
Whether to use virtual patches. |
|
Parameter |
Type |
Description |
|---|---|---|
|
enc_mode |
Integer |
Encryption mode. 1: encryption, 2: decryption. |
|
proxy_port |
Integer |
Agent port. |
|
Parameter |
Type |
Description |
|---|---|---|
|
action |
Integer |
1: encryption, 2: decryption. |
|
alg |
String |
Encryption algorithm, which can be sm4, aes-128, or aes-256. |
|
columns |
Array of Column objects |
Column information to be encrypted. |
|
table |
String |
Table name. |
|
Parameter |
Type |
Description |
|---|---|---|
|
mask |
Integer |
Masking algorithm name or ID. |
|
name |
String |
Column name. |
|
Parameter |
Type |
Description |
|---|---|---|
|
account |
String |
Database username. |
|
address |
String |
Database address. |
|
address_type |
String |
Address type (IPv4 or IPv6). |
|
case_sensitive |
Boolean |
boolean |
|
database_name |
String |
Database name. |
|
extra_params |
String |
Reserved field. |
|
password |
String |
Database password. |
|
port |
Integer |
Database port. |
|
res_id |
String |
Database ID. |
|
res_type |
String |
Database type. |
|
res_version |
String |
Database version. |
Example Requests
None
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Query result. |
|
401 |
Unauthorized. The user is not logged in or the token is invalid. |
|
403 |
Unauthorized to access the resource. |
|
404 |
The specified project does not exist. |
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