createResponsePlan method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter incidentTemplate :
Details used to create an incident when using this response plan.
Parameter name :
The short format name of the response plan. Can't include spaces.
Parameter actions :
The actions that the response plan starts at the beginning of an incident.
Parameter chatChannel :
The Chatbot chat channel used for collaboration during an incident.
Parameter clientToken :
A token ensuring that the operation is called only once with the specified
details.
Parameter displayName :
The long format of the response plan name. This field can contain spaces.
Parameter engagements :
The Amazon Resource Name (ARN) for the contacts and escalation plans that
the response plan engages during an incident.
Parameter integrations :
Information about third-party services integrated into the response plan.
Parameter tags :
A list of tags that you are adding to the response plan.
Implementation
Future<CreateResponsePlanOutput> createResponsePlan({
required IncidentTemplate incidentTemplate,
required String name,
List<Action>? actions,
ChatChannel? chatChannel,
String? clientToken,
String? displayName,
List<String>? engagements,
List<Integration>? integrations,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'incidentTemplate': incidentTemplate,
'name': name,
if (actions != null) 'actions': actions,
if (chatChannel != null) 'chatChannel': chatChannel,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (displayName != null) 'displayName': displayName,
if (engagements != null) 'engagements': engagements,
if (integrations != null) 'integrations': integrations,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/createResponsePlan',
exceptionFnMap: _exceptionFns,
);
return CreateResponsePlanOutput.fromJson(response);
}