updateTimelineEvent method

Future<void> updateTimelineEvent({
  1. required String eventId,
  2. required String incidentRecordArn,
  3. String? clientToken,
  4. String? eventData,
  5. List<EventReference>? eventReferences,
  6. DateTime? eventTime,
  7. String? eventType,
})

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

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

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

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

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

Parameter eventData : A short description of the event.

Parameter eventReferences : 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.

Parameter eventTime : The timestamp for when the event occurred.

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

Implementation

Future<void> updateTimelineEvent({
  required String eventId,
  required String incidentRecordArn,
  String? clientToken,
  String? eventData,
  List<EventReference>? eventReferences,
  DateTime? eventTime,
  String? eventType,
}) async {
  final $payload = <String, dynamic>{
    'eventId': eventId,
    'incidentRecordArn': incidentRecordArn,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (eventData != null) 'eventData': eventData,
    if (eventReferences != null) 'eventReferences': eventReferences,
    if (eventTime != null) 'eventTime': unixTimestampToJson(eventTime),
    if (eventType != null) 'eventType': eventType,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/updateTimelineEvent',
    exceptionFnMap: _exceptionFns,
  );
}