response_plans
Creates, updates, deletes or gets a response_plan resource or lists response_plans in a region
Overview
| Name | response_plans |
| Type | Resource |
| Description | Resource type definition for AWS::SSMIncidents::ResponsePlan |
| Id | awscc.ssmincidents.response_plans |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the response plan. |
name | string | The name of the response plan. |
display_name | string | The display name of the response plan. |
chat_channel | object | The chat channel configuration. |
engagements | array | The list of engagements to use. |
actions | array | The list of actions. |
integrations | array | The list of integrations. |
tags | array | The tags to apply to the response plan. |
incident_template | object | The incident template configuration. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the response plan. |
region | string | AWS region. |
For more information, see AWS::SSMIncidents::ResponsePlan.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | response_plans | INSERT | Name, IncidentTemplate, region |
delete_resource | response_plans | DELETE | Identifier, region |
update_resource | response_plans | UPDATE | Identifier, PatchDocument, region |
list_resources | response_plans_list_only | SELECT | region |
get_resource | response_plans | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual response_plan.
SELECT
region,
arn,
name,
display_name,
chat_channel,
engagements,
actions,
integrations,
tags,
incident_template
FROM awscc.ssmincidents.response_plans
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
Lists all response_plans in a region.
SELECT
region,
arn
FROM awscc.ssmincidents.response_plans_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new response_plan resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ssmincidents.response_plans (
Name,
IncidentTemplate,
region
)
SELECT
'{{ name }}',
'{{ incident_template }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.ssmincidents.response_plans (
Name,
DisplayName,
ChatChannel,
Engagements,
Actions,
Integrations,
Tags,
IncidentTemplate,
region
)
SELECT
'{{ name }}',
'{{ display_name }}',
'{{ chat_channel }}',
'{{ engagements }}',
'{{ actions }}',
'{{ integrations }}',
'{{ tags }}',
'{{ incident_template }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: response_plan
props:
- name: name
value: '{{ name }}'
- name: display_name
value: '{{ display_name }}'
- name: chat_channel
value:
chatbot_sns:
- '{{ chatbot_sns[0] }}'
- name: engagements
value:
- '{{ engagements[0] }}'
- name: actions
value:
- ssm_automation:
role_arn: '{{ role_arn }}'
document_name: '{{ document_name }}'
document_version: '{{ document_version }}'
target_account: '{{ target_account }}'
parameters:
- key: '{{ key }}'
values:
- '{{ values[0] }}'
dynamic_parameters:
- key: '{{ key }}'
value:
variable: '{{ variable }}'
- name: integrations
value:
- pager_duty_configuration:
name: '{{ name }}'
secret_id: '{{ secret_id }}'
pager_duty_incident_configuration:
service_id: '{{ service_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: incident_template
value:
dedupe_string: '{{ dedupe_string }}'
impact: '{{ impact }}'
notification_targets:
- sns_topic_arn: null
summary: '{{ summary }}'
title: '{{ title }}'
incident_tags:
- null
UPDATE example
Use the following StackQL query and manifest file to update a response_plan resource, using stack-deploy.
/*+ update */
UPDATE awscc.ssmincidents.response_plans
SET PatchDocument = string('{{ {
"DisplayName": display_name,
"ChatChannel": chat_channel,
"Engagements": engagements,
"Actions": actions,
"Integrations": integrations,
"Tags": tags,
"IncidentTemplate": incident_template
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.ssmincidents.response_plans
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the response_plans resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ssm-incidents:CreateResponsePlan,
ssm-incidents:GetResponsePlan,
ssm-incidents:TagResource,
ssm-incidents:ListTagsForResource,
iam:PassRole,
secretsmanager:GetSecretValue,
kms:Decrypt,
kms:GenerateDataKey,
kms:GenerateDataKeyPair,
kms:GenerateDataKeyPairWithoutPlaintext,
kms:GenerateDataKeyWithoutPlaintext
ssm-incidents:GetResponsePlan,
ssm-incidents:ListTagsForResource
ssm-incidents:UpdateResponsePlan,
ssm-incidents:GetResponsePlan,
ssm-incidents:TagResource,
ssm-incidents:UntagResource,
ssm-incidents:ListTagsForResource,
iam:PassRole,
secretsmanager:GetSecretValue,
kms:Decrypt,
kms:GenerateDataKey,
kms:GenerateDataKeyPair,
kms:GenerateDataKeyPairWithoutPlaintext,
kms:GenerateDataKeyWithoutPlaintext
ssm-incidents:DeleteResponsePlan,
ssm-incidents:GetResponsePlan
ssm-incidents:ListResponsePlans