Skip to content

create_response_plan async

create_response_plan(
    name: ResponsePlanName,
    incident_template: IncidentTemplate,
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    display_name: Optional[ResponsePlanDisplayName] = None,
    chat_channel: Optional[ChatChannel] = None,
    engagements: Optional[EngagementSet] = None,
    actions: Optional[ActionsList] = None,
    tags: Optional[TagMap] = None,
    integrations: Optional[Integrations] = None,
) -> CreateResponsePlanOutput

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.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

    A token ensuring that the operation is called only once with the specified details.

  • name (ResponsePlanName) –

    The short format name of the response plan. Can't include spaces.

  • display_name (Optional[ResponsePlanDisplayName], default: None ) –

    The long format of the response plan name. This field can contain spaces.

  • incident_template (IncidentTemplate) –

    Details used to create an incident when using this response plan.

  • chat_channel (Optional[ChatChannel], default: None ) –

    The Chatbot chat channel used for collaboration during an incident.

  • engagements (Optional[EngagementSet], default: None ) –

    The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.

  • actions (Optional[ActionsList], default: None ) –

    The actions that the response plan starts at the beginning of an incident.

  • tags (Optional[TagMap], default: None ) –

    A list of tags that you are adding to the response plan.

  • integrations (Optional[Integrations], default: None ) –

    Information about third-party services integrated into the response plan.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/async_ssm_incidents.py
async def create_response_plan(
    self,
    name: "capo_ssm_incidents.types.response_plan_name.ResponsePlanName",
    incident_template: "capo_ssm_incidents.types.incident_template.IncidentTemplate",
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[
        "capo_ssm_incidents.types.client_token.ClientToken"
    ] = None,
    display_name: Optional[
        "capo_ssm_incidents.types.response_plan_display_name.ResponsePlanDisplayName"
    ] = None,
    chat_channel: Optional[
        "capo_ssm_incidents.types.chat_channel.ChatChannel"
    ] = None,
    engagements: Optional[
        "capo_ssm_incidents.types.engagement_set.EngagementSet"
    ] = None,
    actions: Optional["capo_ssm_incidents.types.actions_list.ActionsList"] = None,
    tags: Optional["capo_ssm_incidents.types.tag_map.TagMap"] = None,
    integrations: Optional[
        "capo_ssm_incidents.types.integrations.Integrations"
    ] = None,
) -> (
    "capo_ssm_incidents.types.create_response_plan_output.CreateResponsePlanOutput"
):
    """<p>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.</p>

    Args:
        client_token: <p>A token ensuring that the operation is called only once with the specified details.</p>
        name: <p>The short format name of the response plan. Can't include spaces.</p>
        display_name: <p>The long format of the response plan name. This field can contain spaces.</p>
        incident_template: <p>Details used to create an incident when using this response plan.</p>
        chat_channel: <p>The Chatbot chat channel used for collaboration during an incident.</p>
        engagements: <p>The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.</p>
        actions: <p>The actions that the response plan starts at the beginning of an incident.</p>
        tags: <p>A list of tags that you are adding to the response plan.</p>
        integrations: <p>Information about third-party services integrated into the response plan.</p>

    Raises:
        capo_ssm_incidents.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_incidents.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource causes an inconsistent state.</p>
        capo_ssm_incidents.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_ssm_incidents.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which doesn't exist. </p>
        capo_ssm_incidents.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_incidents.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_incidents.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm_incidents.types.create_response_plan_input.CreateResponsePlanInput]",
    ) -> AsyncOperationResponse[
        "capo_ssm_incidents.types.create_response_plan_output.CreateResponsePlanOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.create_response_plan

        (
            output,
            http_response,
        ) = await capo_ssm_incidents._operations.ssm_incidents.create_response_plan.async_create_response_plan(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateResponsePlan")
    )
    input_: capo_ssm_incidents.types.create_response_plan_input.CreateResponsePlanInput = {
        "name": name,
        "incident_template": incident_template,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if display_name is not None:
        input_["display_name"] = display_name
    if chat_channel is not None:
        input_["chat_channel"] = chat_channel
    if engagements is not None:
        input_["engagements"] = engagements
    if actions is not None:
        input_["actions"] = actions
    if tags is not None:
        input_["tags"] = tags
    if integrations is not None:
        input_["integrations"] = integrations

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output