Create Custom Tag Rule
POST/code/api/v1/tag-rules
Prisma Cloud Application Security supports tagging management for IaC templates, based on the company’s open-source tool Yor (https://yor.io/). With tag rules, you can manage your tagging strategies easily across providers and repositories, even before they go live. Such capability allows users to enable out-of-the-box (OOTB) Prisma Cloud Application Security tag rules, such as the traceability tag (“yor_trace”) used for code-to-cloud resource tracing and drift detection. Furthermore, Prisma Cloud Application Security enables custom tag rule creation and management (edit, clone, enable, disable and delete).
This API is used to save a new custom tag rule definition based on input of:
- Repositories
- Rule definition
- Key name
- Rule status (enabled/disabled)
- Description (a sentence explaining the rule)
The response includes:
- Repositories where the rule is applied
- Rule Definition
- Rule status (enabled/disabled)
- Rule ID
- Rule name
- Description
Request
- application/json
Body
required
- Array [
- Array [
- Array [
- ]
- ]
- ]
ruleDefinition objectrequired
tag_groups object[]required
tags object[]required
value objectrequired
matches object[]
Responses
- 200
- 422
Tag saved
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- Array [
- ]
- ]
- ]
definition objectrequired
tag_groups object[]required
tags object[]required
value objectrequired
matches object[]
{
"canDoActions": true,
"createdBy": "string",
"creationDate": "string",
"definition": {
"tag_groups": [
{
"name": "string",
"tags": [
{
"name": "string",
"value": {
"default": "string",
"matches": [
{}
]
}
}
]
}
]
},
"description": "string",
"id": "string",
"isEnabled": true,
"name": "string",
"repositories": [
"string"
],
"tagRuleOOTBId": "string"
}
Request arguments validation error