Modifying a Tenant-Level Open-Source Governance Policy
Function
This API is used to modify a tenant-level open source governance policy.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{domain_id}/tenant/open-source/rule-sets/{rule_set_id}/update
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
rule_set_id |
Yes |
String |
Definition: Policy ID, which is the unique identifier of a policy. Obtain the policy ID by calling the API for querying policies. data.id indicates the policy ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
domain_id |
Yes |
String |
Definition: Tenant ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API forobtaining a user token. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Definition: Policy name. Constraints: The policy name can contain only letters, digits, hyphens (-), and underscores (_). Value range: Enter a maximum of 128 characters. Default value: N/A |
content |
No |
OpenSourceRuleContent object |
Definition: Details about an open-source governance policy rule. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
version_set |
No |
VersionSetProperty object |
Definition: Open-source dependency. Constraints: N/A Value range: N/A Default value: N/A |
security |
No |
SecurityProperty object |
Definition: Vulnerability. Constraints: N/A Value range: N/A Default value: N/A |
license |
No |
LicenseProperty object |
Definition: License. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable the rule. Constraints: N/A Value range:
Default value: N/A |
rules |
No |
Array of VersionSetRule objects |
Definition: Rule list. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable. Constraints: N/A Value range:
Default value: N/A |
ecosystem |
No |
String |
Definition: Dependency type. Constraints: N/A Value range: N/A Default value: N/A |
package_name |
No |
String |
Definition: Package name. Constraints: N/A Value range: N/A Default value: N/A |
package_version |
No |
String |
Definition: Package version. Constraints: N/A Value range: N/A Default value: N/A |
description |
No |
String |
Definition: Rule description. Constraints: N/A Value range: N/A Default value: N/A |
predicate |
No |
String |
Definition: Comparison rule. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable the rule. Constraints: N/A Value range:
Default value: N/A |
rules |
No |
SecurityRule object |
Definition: Rule details. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
severity |
No |
severity object |
Definition: Vulnerability severity. Constraints: N/A Value range: N/A Default value: N/A |
cve |
No |
cve object |
Definition: Vulnerability ID. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable the rule. Constraints: N/A Value range:
Default value: N/A |
values |
No |
Array of strings |
Definition: Vulnerability severity. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable the rule. Constraints: N/A Value range:
Default value: N/A |
values |
No |
Array of strings |
Definition: Vulnerability ID. Constraints: N/A Value range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enable |
No |
Boolean |
Definition: Whether to enable. Constraints: N/A Value range:
Default value: N/A |
rules |
No |
Array of rules objects |
Definition: Rule list. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
Boolean |
Definition: Whether the calling is successful. Value range:
|
rule_set_id |
String |
Definition: Policy ID, which is the unique identifier of a policy. Obtain the policy ID by calling the API for querying policies. data.id indicates the policy ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Parameter description: Error message. Value range: N/A |
error_code |
String |
Parameter description: Error code. Value range: N/A |
Example Requests
None
Example Responses
Status code: 200
OK
{ "status" : true, "rule_set_id" : "6cb18ee5ca1c48caa335706e0e5ee288" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
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