Skip to content

update_timeline_event

update_timeline_event(
    incident_record_arn: Arn,
    event_id: UUID,
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    event_time: Optional[datetime] = None,
    event_type: Optional[TimelineEventType] = None,
    event_data: Optional[EventData] = None,
    event_references: Optional[EventReferenceList] = None,
) -> UpdateTimelineEventOutput

Updates a timeline event. You can update events of type Custom Event.

Parameters:

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

    A token that ensures that a client calls the operation only once with the specified details.

  • incident_record_arn (Arn) –

    The Amazon Resource Name (ARN) of the incident that includes the timeline event.

  • event_id (UUID) –

    The ID of the event to update. You can use ListTimelineEvents to find an event's ID.

  • event_time (Optional[datetime], default: None ) –

    The timestamp for when the event occurred.

  • event_type (Optional[TimelineEventType], default: None ) –

    The type of event. You can update events of type Custom Event and Note.

  • event_data (Optional[EventData], default: None ) –

    A short description of the event.

  • event_references (Optional[EventReferenceList], default: None ) –

    Updates all existing references in a TimelineEvent. A reference is an Amazon Web Services resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB table as a related item.

    This update action overrides all existing references. If you want to keep existing references, you must specify them in the call. If you don't, this action removes any existing references and enters only new references.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/ssm_incidents.py
def update_timeline_event(
    self,
    incident_record_arn: "capo_ssm_incidents.types.arn.Arn",
    event_id: "capo_ssm_incidents.types.uuid.UUID",
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
    client_token: Optional[
        "capo_ssm_incidents.types.client_token.ClientToken"
    ] = None,
    event_time: Optional[datetime.datetime] = None,
    event_type: Optional[
        "capo_ssm_incidents.types.timeline_event_type.TimelineEventType"
    ] = None,
    event_data: Optional["capo_ssm_incidents.types.event_data.EventData"] = None,
    event_references: Optional[
        "capo_ssm_incidents.types.event_reference_list.EventReferenceList"
    ] = None,
) -> "capo_ssm_incidents.types.update_timeline_event_output.UpdateTimelineEventOutput":
    """<p>Updates a timeline event. You can update events of type <code>Custom Event</code>.</p>

    Args:
        client_token: <p>A token that ensures that a client calls the operation only once with the specified details.</p>
        incident_record_arn: <p>The Amazon Resource Name (ARN) of the incident that includes the timeline event.</p>
        event_id: <p>The ID of the event to update. You can use <code>ListTimelineEvents</code> to find an event's ID.</p>
        event_time: <p>The timestamp for when the event occurred.</p>
        event_type: <p>The type of event. You can update events of type <code>Custom Event</code> and <code>Note</code>.</p>
        event_data: <p>A short description of the event.</p>
        event_references: <p>Updates all existing references in a <code>TimelineEvent</code>. A reference is an Amazon Web Services resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB table as a related item.</p> <important> <p>This update action overrides all existing references. If you want to keep existing references, you must specify them in the call. If you don't, this action removes any existing references and enters only new references.</p> </important>

    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.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_incidents.types.update_timeline_event_input.UpdateTimelineEventInput]",
    ) -> OperationResponse[
        "capo_ssm_incidents.types.update_timeline_event_output.UpdateTimelineEventOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.update_timeline_event

        output, http_response = (
            capo_ssm_incidents._operations.ssm_incidents.update_timeline_event.update_timeline_event(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTimelineEvent")
    )
    input_: capo_ssm_incidents.types.update_timeline_event_input.UpdateTimelineEventInput = {
        "incident_record_arn": incident_record_arn,
        "event_id": event_id,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if event_time is not None:
        input_["event_time"] = event_time
    if event_type is not None:
        input_["event_type"] = event_type
    if event_data is not None:
        input_["event_data"] = event_data
    if event_references is not None:
        input_["event_references"] = event_references

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output