Skip to main content

response_plans

Creates, updates, deletes, gets or lists a response_plans resource.

Overview

Nameresponse_plans
TypeResource
Idaws.ssm_incidents.response_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe short format name of the response plan. The name can't contain spaces. (pattern: <code>^[a-zA-Z0-9-_]*$</code>)
actionsarrayThe actions that this response plan takes at the beginning of the incident.
arnstringThe ARN of the response plan. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-z0-9-]:[a-z0-9-]:([0-9]{12})?:.+$</code>)
chat_channelobjectThe Chatbot chat channel used for collaboration during an incident.
display_namestringThe long format name of the response plan. Can contain spaces.
engagementsarrayThe Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.
incident_templateobjectBasic details used in creating a response plan. The response plan is then used to create an incident record.
integrationsarrayInformation about third-party services integrated into the Incident Manager response plan.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_response_planselectarn, regionRetrieves the details of the specified response plan.
list_response_plansselectregionLists all response plans in your account.
create_response_planinsertregion, incidentTemplate, nameCreates 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_planupdateregion, arnUpdates the specified response plan.
delete_response_plandeleteregionDeletes 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_incidentexecregion, responsePlanArnUsed 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.

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the response plan.
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;