latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

Guardrails

Update a Guardrail Rule

Updates an existing Guardrail Rule and its Notifications

patch/guardrails/{ruleId}

Request body

idstring

Unique identifier of the guardrail rule

accountIdstring

Unique identifier of the associated account

createdBystring

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

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 Updated Successfully

idstring required

Unique identifier of the updated rule

namestring required

Name of the Guardrail Rule

enabledboolean required

Whether the Rule is Active

updatedAtstring date-time required

Timestamp of the Last Update

Example response

{
  "id": "507f1f77bcf86cd799439011",
  "name": "Enforce S3 Encryption",
  "enabled": true,
  "updatedAt": "2024-11-11T10:00:00Z"
}