PUThttps://api.spotinst.io/events/notification/accountPolicy?accountId={ACCOUNT_ID}

Update the account notification policy

Parameter Type Description
ACCOUNT_ID * String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
Copied!
Downloaded!
{ 
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "accountPolicy": {
    "emailPolicy": {
      "statements": [
        {
          "category": "Elastigroup Errors",
          "subCategory": "Launch instances failures",
          "isEnabled": true,
          "applyOnFutureResources": false,
          "allowedResources": [
            {
              "id": "sig-1234"
            }
          ],
          "deniedResources": [
            {
              "id": "sig-5678"
            },
            {
              "id": "sig-9999"
            }
          ]
        },
        {
          "category": "Elastigroup Errors",
          "subCategory": "Invalid Target",
          "isEnabled": true,
          "applyOnFutureResources": true,
          "allowedResources": [
            {
              "id": "sig-5678"
            }
          ],
          "deniedResources": [
            {
              "id": "sig-1234"
            },
            {
              "id": "sig-9999"
            }
          ]
        }
      ]
    },
    "slackPolicy": {
      "statements": [
        {
          "category": "Elastigroup Errors",
          "subCategory": "Launch instances failures",
          "isEnabled": false,
          "applyOnFutureResources": false,
          "allowedResources": [],
          "deniedResources": []
        }
      ]
    }
  }
}
Attribute Type Description
accountPolicy Object

Account notifications object

accountPolicy.emailPolicy Object

Email notifications settings

accountPolicy.emailPolicy.statements Array<Object>

List of email notifications statements settings

accountPolicy.emailPolicy.statements.category String

Event notification category

accountPolicy.emailPolicy.statements.subCategory String

Event notification sub category (should match to the event category)

accountPolicy.emailPolicy.statements.isEnabled Boolean

Flag to enable/disable the notification statement

accountPolicy.emailPolicy.statements.applyOnFutureResources Boolean

Flag to set whether to auto apply on newly created resources

accountPolicy.emailPolicy.statements.allowedResources Array<Object>

List of allowed resources for the statement settings

accountPolicy.emailPolicy.statements.allowedResources.id String

Set resource ID

Example: sig-1234rfd
accountPolicy.emailPolicy.statements.deniedResources Array<Object>

List of denied resources for the statement settings

accountPolicy.emailPolicy.statements.deniedResources.id String

Set resource ID

accountPolicy.slackPolicy Object

Slack notifications settings

accountPolicy.slackPolicy.statements Object

List of slack notifications statements settings

accountPolicy.slackPolicy.statements.category String

Event notification category

accountPolicy.slackPolicy.statements.subCategory String

Event notification sub category (should match to the event category)

accountPolicy.slackPolicy.statements.isEnabled Boolean

Flag to enable/disable the notification statement

accountPolicy.slackPolicy.statements.applyOnFutureResources Boolean

Flag to set whether to auto apply on newly created resources

accountPolicy.slackPolicy.statements.allowedResources Array<Object>

List of allowed resources for the statement settings

accountPolicy.slackPolicy.statements.allowedResources.id String

Set resource ID

Example: sig-1234rdf
accountPolicy.slackPolicy.statements.deniedResources Array<Object>

List of denied resources for the statement settings

accountPolicy.slackPolicy.statements.deniedResources.id String

Set resource ID

Example: sig-1234rdf
Response - 200

Headers
Copied!
Downloaded!
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  }
}