response_plans
Creates, updates, deletes, gets or lists a response_plans resource.
Overview
| Name | response_plans |
| Type | Resource |
| Id | aws.ssm_incidents.response_plans |
Fields
The following fields are returned by SELECT queries:
- get_response_plan
- list_response_plans
| Name | Datatype | Description |
|---|---|---|
name | string | The short format name of the response plan. The name can't contain spaces. (pattern: <code>^[a-zA-Z0-9-_]*$</code>) |
actions | array | The actions that this response plan takes at the beginning of the incident. |
arn | string | The ARN of the response plan. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-z0-9-]:[a-z0-9-]:([0-9]{12})?:.+$</code>) |
chat_channel | object | The Chatbot chat channel used for collaboration during an incident. |
display_name | string | The long format name of the response plan. Can contain spaces. |
engagements | array | The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident. |
incident_template | object | Basic details used in creating a response plan. The response plan is then used to create an incident record. |
integrations | array | Information about third-party services integrated into the Incident Manager response plan. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the response plan. This can't include spaces. (pattern: <code>^[a-zA-Z0-9-_]*$</code>) |
arn | string | The Amazon Resource Name (ARN) of the response plan. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-z0-9-]:[a-z0-9-]:([0-9]{12})?:.+$</code>) |
display_name | string | The human readable name of the response plan. This can include spaces. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_response_plan | select | arn, region | Retrieves the details of the specified response plan. | |
list_response_plans | select | region | Lists all response plans in your account. | |
create_response_plan | insert | region, incidentTemplate, name | Creates a response plan that automates the initial response to incidents. A response plan engages contacts, starts chat channel collaboration, and initiates runbooks at the beginning of an incident. | |
update_response_plan | update | region, arn | Updates the specified response plan. | |
delete_response_plan | delete | region | Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge events from creating an incident with this response plan. | |
start_incident | exec | region, responsePlanArn | Used to start an incident from CloudWatch alarms, EventBridge events, or manually. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the response plan. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_response_plan
- list_response_plans
Retrieves the details of the specified response plan.
SELECT
name,
actions,
arn,
chat_channel,
display_name,
engagements,
incident_template,
integrations
FROM aws.ssm_incidents.response_plans
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;
Lists all response plans in your account.
SELECT
name,
arn,
display_name
FROM aws.ssm_incidents.response_plans
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_response_plan
- Manifest
Creates a response plan that automates the initial response to incidents. A response plan engages contacts, starts chat channel collaboration, and initiates runbooks at the beginning of an incident.
INSERT INTO aws.ssm_incidents.response_plans (
actions,
chatChannel,
clientToken,
displayName,
engagements,
incidentTemplate,
integrations,
name,
tags,
region
)
SELECT
'{{ actions }}',
'{{ chatChannel }}',
'{{ clientToken }}',
'{{ displayName }}',
'{{ engagements }}',
'{{ incidentTemplate }}' /* required */,
'{{ integrations }}',
'{{ name }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
arn
;
# Description fields are for documentation purposes
- name: response_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the response_plans resource.
- name: actions
value:
- ssmAutomation:
documentName: "{{ documentName }}"
documentVersion: "{{ documentVersion }}"
dynamicParameters: "{{ dynamicParameters }}"
parameters: "{{ parameters }}"
roleArn: "{{ roleArn }}"
targetAccount: "{{ targetAccount }}"
- name: chatChannel
description: |
The Chatbot chat channel used for collaboration during an incident.
value:
chatbotSns:
- "{{ chatbotSns }}"
empty: "{{ empty }}"
- name: clientToken
value: "{{ clientToken }}"
- name: displayName
value: "{{ displayName }}"
- name: engagements
value:
- "{{ engagements }}"
- name: incidentTemplate
description: |
Basic details used in creating a response plan. The response plan is then used to create an incident record.
value:
dedupeString: "{{ dedupeString }}"
impact: {{ impact }}
incidentTags: "{{ incidentTags }}"
notificationTargets:
- snsTopicArn: "{{ snsTopicArn }}"
summary: "{{ summary }}"
title_: "{{ title_ }}"
- name: integrations
value:
- pagerDutyConfiguration:
name: "{{ name }}"
pagerDutyIncidentConfiguration:
serviceId: "{{ serviceId }}"
secretId: "{{ secretId }}"
- name: name
value: "{{ name }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_response_plan
Updates the specified response plan.
UPDATE aws.ssm_incidents.response_plans
SET
actions = '{{ actions }}',
arn = '{{ arn }}',
chatChannel = '{{ chatChannel }}',
clientToken = '{{ clientToken }}',
displayName = '{{ displayName }}',
engagements = '{{ engagements }}',
incidentTemplateDedupeString = '{{ incidentTemplateDedupeString }}',
incidentTemplateImpact = {{ incidentTemplateImpact }},
incidentTemplateNotificationTargets = '{{ incidentTemplateNotificationTargets }}',
incidentTemplateSummary = '{{ incidentTemplateSummary }}',
incidentTemplateTags = '{{ incidentTemplateTags }}',
incidentTemplateTitle = '{{ incidentTemplateTitle }}',
integrations = '{{ integrations }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required;
DELETE examples
- delete_response_plan
Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge events from creating an incident with this response plan.
DELETE FROM aws.ssm_incidents.response_plans
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_incident
Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
EXEC aws.ssm_incidents.response_plans.start_incident
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}",
"impact": {{ impact }},
"relatedItems": "{{ relatedItems }}",
"responsePlanArn": "{{ responsePlanArn }}",
"title": "{{ title }}",
"triggerDetails": "{{ triggerDetails }}"
}'
;