Action

Create an approval action

Creates a new approval action.

post/approval/action

Request body

nrnstring required

A resource identifier (NRN) specifying where this action applies.

entity'deployment' | 'scope' | 'service:action' | 'parameter' | 'action_item' required

The entity that requires approval.

action'deployment:create' | 'scope:create' | 'scope:recreate' | 'scope:write' | 'scope:delete' | 'scope:stop' | 'service:action:create' | 'parameter:read-secrets' | 'action_item:resolve' | 'action_item:defer' | 'action_item:reject' required

The action that requires approval.

dimensionsobject

Key-value pairs defining the scope of the action.

on_policy_success'approve' | 'manual'

The action to be taken when the policy check is successful.

Note: If omitted, this value defaults to manual.

on_policy_fail'manual' | 'deny'

The action to be taken when the policy check fails.

Note: If omitted, this value defaults to manual.

time_to_replyinteger

How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to expired.

allowed_time_to_executeinteger

How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the execution_status moves to expired.

Example request

{
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "entity": "deployment",
  "action": "deployment:create",
  "dimensions": {
    "environment": "production",
    "country": "us"
  },
  "on_policy_success": "approve",
  "on_policy_fail": "deny",
  "time_to_reply": 259200000,
  "allowed_time_to_execute": 86400000
}

Response

The operation was successful.

idinteger required

A unique identifier for the approval action.

nrnstring required

A resource identifier (NRN) specifying where this action applies.

entity'deployment' | 'scope' | 'service:action' | 'parameter' | 'action_item' required

The entity that requires approval.

action'deployment:create' | 'scope:create' | 'scope:recreate' | 'scope:write' | 'scope:delete' | 'scope:stop' | 'service:action:create' | 'parameter:read-secrets' | 'action_item:resolve' | 'action_item:defer' | 'action_item:reject' required

The action that requires approval.

dimensionsobject

Key-value pairs defining the scope of the action.

on_policy_success'approve' | 'manual'

The action to be taken when the policy check is successful.

Note: If omitted, this value defaults to manual.

on_policy_fail'manual' | 'deny'

The action to be taken when the policy check fails.

Note: If omitted, this value defaults to manual.

time_to_replyinteger

How long (in milliseconds) approvers have to respond before the request expires. If the window closes without a decision, the request status moves to expired.

allowed_time_to_executeinteger

How long (in milliseconds) after approval the action can be executed. If execution doesn't happen within this window, the execution_status moves to expired.

Example response

{
  "id": 1234,
  "nrn": "organization=1:account=2:namespace=3:application=4",
  "entity": "deployment",
  "action": "deployment:create",
  "dimensions": {
    "environment": "production",
    "country": "us"
  },
  "on_policy_success": "approve",
  "on_policy_fail": "deny",
  "time_to_reply": 259200000,
  "allowed_time_to_execute": 86400000
}

Changes