# Response attributes

Namespace `data`

| Parameter                                 | Type                         | Value                                                                                                                                                                                                     |
|-------------------------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                                      | String                       | The ID of the Amazon SNS integration. String representation of a number.                                                                                                                                  |
| `type`                                    | String                       | `amazon_sns_integration`                                                                                                                                                                                  |
| `attributes`                              | Object                       | Attributes object. Contains all the Amazon SNS integration attributes. See below.                                                                                                                         |
| `attributes.name`                         | String                       | Name of the Amazon SNS integration.                                                                                                                                                                       |
| `attributes.created_at`                   | String (ISO DateTime format) | When was the Amazon SNS integration created.                                                                                                                                                              |
| `attributes.updated_at`                   | String (ISO DateTime format) | When was the Amazon SNS integration last updated.                                                                                                                                                         |
| `attributes.policy_id`                    | String or `null`             | ID of the escalation policy associated with the Amazon SNS integration. String representation of a number, or `null` when no policy is set.                                                               |
| `attributes.team_name`                    | String                       | The team this integration belongs to.                                                                                                                                                                     |
| `attributes.call`                         | Boolean                      | Call the on-call person.                                                                                                                                                                                  |
| `attributes.sms`                          | Boolean                      | Send an SMS to the on-call person.                                                                                                                                                                        |
| `attributes.email`                        | Boolean                      | Send an e-mail to the on-call person.                                                                                                                                                                     |
| `attributes.push`                         | Boolean                      | Send a push notification to the on-call person.                                                                                                                                                           |
| `attributes.critical_alert`               | Boolean                      | Send a critical push notification that ignores the mute switch and Do not Disturb mode.                                                                                                                   |
| `attributes.team_wait`                    | Integer                      | How long we wait before escalating the incident alert to the team. In seconds.                                                                                                                            |
| `attributes.recovery_period`              | Integer                      | How long the alert must be up to automatically mark an incident as resolved. In seconds.                                                                                                                  |
| `attributes.url`                          | String                       | The endpoint URL to subscribe your Amazon SNS topic to. Read-only.                                                                                                                                        |
| `attributes.topic_arn`                    | String or `null`             | The ARN of the subscribed Amazon SNS topic. Written when AWS confirms the subscription, so it is read-only and `null` before then.                                                                         |
| `attributes.subscription_state`           | String                       | Whether AWS has completed the subscription handshake. Either `awaiting` or `active`. Read-only.                                                                                                           |
| `attributes.paused`                       | Boolean                      | Whether the Amazon SNS integration is paused.                                                                                                                                                             |
| `attributes.started_rule_type`            | String                       | Should an incident be started for all notifications, those satisfying all `started_rules`, or those satisfying any of them. Valid values are `unused`, `all`, or `any`.                                    |
| `attributes.acknowledged_rule_type`       | String                       | Should an incident be acknowledged for all notifications, those satisfying all `acknowledged_rules`, or those satisfying any of them. Valid values are `unused`, `all`, or `any`.                          |
| `attributes.resolved_rule_type`           | String                       | Should an incident be resolved for all notifications, those satisfying all `resolved_rules`, or those satisfying any of them. Valid values are `unused`, `all`, or `any`.                                  |
| `attributes.started_rules.[]`             | `Rule`                       | Array of started rules. See [Rule section](#rule) below for attribute details.                                                                                                                            |
| `attributes.acknowledged_rules.[]`        | `Rule`                       | Array of acknowledged rules. See [Rule section](#rule) below for attribute details.                                                                                                                       |
| `attributes.resolved_rules.[]`            | `Rule`                       | Array of resolved rules. See [Rule section](#rule) below for attribute details.                                                                                                                           |
| `attributes.cause_field`                  | `Field`                      | How to extract an incident cause. Defaults to the whole SNS message. See [Field section](#field) below for attribute details.                                                                              |
| `attributes.title_field`                  | `Field` or `null`            | How to extract a customized incident title. Defaults to the notification's `Subject`. Send `null` to remove the field and use default title. See [Field section](#field) below for attribute details.      |
| `attributes.started_alert_id_field`       | `Field`                      | When starting an incident, how to extract an alert id, a unique alert identifier which will be used to acknowledge and resolve incidents. See [Field section](#field) below for attribute details.         |
| `attributes.acknowledged_alert_id_field`  | `Field`                      | When acknowledging an incident, how to extract an alert id, a unique alert identifier which will be used to acknowledge and resolve incidents. See [Field section](#field) below for attribute details.     |
| `attributes.resolved_alert_id_field`      | `Field`                      | When resolving an incident, how to extract an alert id, a unique alert identifier which will be used to acknowledge and resolve incidents. See [Field section](#field) below for attribute details.        |
| `attributes.other_started_fields.[]`      | `Field`                      | Array of additional fields that will be extracted when incident is created. See [Field section](#field) below for attribute details.                                                                       |
| `attributes.other_acknowledged_fields.[]` | `Field`                      | Array of additional fields that will be extracted when incident is acknowledged. See [Field section](#field) below for attribute details.                                                                  |
| `attributes.other_resolved_fields.[]`     | `Field`                      | Array of additional fields that will be extracted when incident is resolved. See [Field section](#field) below for attribute details.                                                                      |

[info]
#### Reading values from the SNS envelope
Set `field_target` or `rule_target` to `sns_envelope` to read the notification's envelope instead of the message your publisher sent. The `target_field` then has to be `TopicArn`, `MessageId`, or `Subject`. `body`, `json`, and `xml` read the published message itself, which is arbitrary per publisher. `query_string` and `header` read AWS's own HTTPS request, so they never see your message.
[/info]

### Rule

| Parameter      | Type                         | Value                                                                                                                                                       |
| -------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `created_at`   | String (ISO DateTime format) | When was the rule created.                                                                                                                                  |
| `updated_at`   | String (ISO DateTime format) | When was the rule last updated.                                                                                                                             |
| `rule_target`  | String                       | The target of the rule. Can be any of the following: `sns_envelope`, `query_string`, `header`, `body`, `json`, or `xml`.                                    |
| `match_type`   | String                       | The type of the rule. Can be any of the following: `contains`, `contains_not`, `matches_regex`, `matches_regex_not`, `equals`, or `equals_not`.             |
| `target_field` | String                       | The target field of the rule. Has to be `TopicArn`, `MessageId`, or `Subject` when `rule_target` is `sns_envelope`.                                         |
| `content`      | String                       | The content we should match to satisfy the rule. Should be a valid Regex when `match_type` is `matches_regex`.                                              |

### Field

| Parameter        | Type   | Value                                                                                                                                                       |
| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`           | String | The name of the field.                                                                                                                                      |
| `special_type`   | String | A special type of the field. Can be `alert_id`, `cause`, or `title`, or otherwise `null` for a custom field. Derived from the attribute you nest the field under, so a value you send is overwritten.|
| `field_target`   | String | The target of the field. Can be any of the following: `sns_envelope`, `query_string`, `header`, `body`, `json`, or `xml`.                                   |
| `match_type`     | String | The match type of the field. Can be any of the following: `match_before`, `match_after`, `match_between`, `match_regex`, or `match_everything`.             |
| `target_field`   | String | The target field of the field. Has to be `TopicArn`, `MessageId`, or `Subject` when `field_target` is `sns_envelope`.                                       |
| `content`        | String | The marker to extract around. Required when `match_type` is `match_before`, `match_after`, or `match_regex`, and a valid Regex for `match_regex`.                  |
| `content_before` | String | Where to start extracting. Required when `match_type` is `match_between`.                                                                                   |
| `content_after`  | String | Where to stop extracting. Required when `match_type` is `match_between`.                                                                                    |
