Skip to content

start_incident async

start_incident(
    response_plan_arn: Arn,
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    title: Optional[IncidentTitle] = None,
    impact: Optional[Impact] = None,
    trigger_details: Optional[TriggerDetails] = None,
    related_items: Optional[RelatedItemList] = None,
) -> StartIncidentOutput

Used to start an incident from CloudWatch alarms, EventBridge events, or manually.

Parameters:

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

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

  • response_plan_arn (Arn) –

    The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics, runbooks, title, and impact of the incident.

  • title (Optional[IncidentTitle], default: None ) –

    Provide a title for the incident. Providing a title overwrites the title provided by the response plan.

  • impact (Optional[Impact], default: None ) –

    Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.

    Supported impact codes

    • 1 - Critical

    • 2 - High

    • 3 - Medium

    • 4 - Low

    • 5 - No Impact

  • trigger_details (Optional[TriggerDetails], default: None ) –

    Details of what created the incident record in Incident Manager.

  • related_items (Optional[RelatedItemList], default: None ) –

    Add related items to the incident for other responders to use. Related items are Amazon Web Services resources, external links, or files uploaded to an Amazon S3 bucket.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/async_ssm_incidents.py
async def start_incident(
    self,
    response_plan_arn: "capo_ssm_incidents.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[
        "capo_ssm_incidents.types.client_token.ClientToken"
    ] = None,
    title: Optional["capo_ssm_incidents.types.incident_title.IncidentTitle"] = None,
    impact: Optional["capo_ssm_incidents.types.impact.Impact"] = None,
    trigger_details: Optional[
        "capo_ssm_incidents.types.trigger_details.TriggerDetails"
    ] = None,
    related_items: Optional[
        "capo_ssm_incidents.types.related_item_list.RelatedItemList"
    ] = None,
) -> "capo_ssm_incidents.types.start_incident_output.StartIncidentOutput":
    """<p>Used to start an incident from CloudWatch alarms, EventBridge events, or manually. </p>

    Args:
        client_token: <p>A token ensuring that the operation is called only once with the specified details.</p>
        response_plan_arn: <p>The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics, runbooks, title, and impact of the incident. </p>
        title: <p>Provide a title for the incident. Providing a title overwrites the title provided by the response plan. </p>
        impact: <p>Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.</p> <p class="title"> <b>Supported impact codes</b> </p> <ul> <li> <p> <code>1</code> - Critical</p> </li> <li> <p> <code>2</code> - High</p> </li> <li> <p> <code>3</code> - Medium</p> </li> <li> <p> <code>4</code> - Low</p> </li> <li> <p> <code>5</code> - No Impact</p> </li> </ul>
        trigger_details: <p>Details of what created the incident record in Incident Manager.</p>
        related_items: <p>Add related items to the incident for other responders to use. Related items are Amazon Web Services resources, external links, or files uploaded to an Amazon S3 bucket. </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.start_incident_input.StartIncidentInput]",
    ) -> AsyncOperationResponse[
        "capo_ssm_incidents.types.start_incident_output.StartIncidentOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.start_incident

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartIncident")
    )
    input_: capo_ssm_incidents.types.start_incident_input.StartIncidentInput = {
        "response_plan_arn": response_plan_arn
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if title is not None:
        input_["title"] = title
    if impact is not None:
        input_["impact"] = impact
    if trigger_details is not None:
        input_["trigger_details"] = trigger_details
    if related_items is not None:
        input_["related_items"] = related_items

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