latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

Guardrails

Create a new Guardrail Rule

Creates a new guardrail rule with optional notification setup

post/guardrails

Request body

idstring

Unique identifier of the guardrail rule

accountIdstring

Unique identifier of the associated account

createdBystring required

Name of the user who created the rule

namestring required

Name of the guardrail rule

type'policy' | 'cost' | 'resource' | 'tag' required

Type of the guardrail rule

isEnabledboolean required

Whether the rule is enabled

createdAtstring date-time

Timestamp when the rule was created

updatedAtstring date-time

Timestamp when the rule was last updated

notificationIdstring

Unique identifier of the associated notification configuration

severity0 | 1 | 2 | 3 | 4 required

Severity level of the guardrail rule

enforceOnNoOpboolean

Whether to enforce the rule on no-op assets

Example request

{
  "id": "507f1f77bcf86cd799439012",
  "accountId": "507f1f77bcf86cd799439012",
  "createdBy": "John Doe",
  "criteria": {
    "resource": {
      "actions": [
        "create"
      ]
    }
  },
  "notificationId": "507f1f77bcf86cd799439012"
}

Response

Guardrail Rule Created Successfully

ruleIdstring required

Unique identifier of the created rule

notificationIdstring required

Unique identifier of the created notification

Example response

{
  "ruleId": "507f1f77bcf86cd799439011",
  "notificationId": "507f1f77bcf86cd799439012"
}