updateCase method
- required String caseId,
- DateTime? actualIncidentStartDate,
- List<
CaseMetadataEntry> ? caseMetadata, - String? description,
- EngagementType? engagementType,
- List<
String> ? impactedAccountsToAdd, - List<
String> ? impactedAccountsToDelete, - List<
ImpactedAwsRegion> ? impactedAwsRegionsToAdd, - List<
ImpactedAwsRegion> ? impactedAwsRegionsToDelete, - List<
String> ? impactedServicesToAdd, - List<
String> ? impactedServicesToDelete, - DateTime? reportedIncidentStartDate,
- List<
ThreatActorIp> ? threatActorIpAddressesToAdd, - List<
ThreatActorIp> ? threatActorIpAddressesToDelete, - String? title,
- List<
Watcher> ? watchersToAdd, - List<
Watcher> ? watchersToDelete,
Updates an existing case.
Parameter caseId :
Required element for UpdateCase to identify the case ID for updates.
Parameter actualIncidentStartDate :
Optional element for UpdateCase to provide content for the incident start
date field.
Parameter caseMetadata :
Update the case request with case metadata
Parameter description :
Optional element for UpdateCase to provide content for the description
field.
Parameter engagementType :
Optional element for UpdateCase to provide content for the engagement type
field. Available engagement types include Security Incident |
Investigation.
Parameter impactedAccountsToAdd :
Optional element for UpdateCase to provide content to add accounts
impacted.
Parameter impactedAccountsToDelete :
Optional element for UpdateCase to provide content to add accounts
impacted.
Parameter impactedAwsRegionsToAdd :
Optional element for UpdateCase to provide content to add regions
impacted.
Parameter impactedAwsRegionsToDelete :
Optional element for UpdateCase to provide content to remove regions
impacted.
Parameter impactedServicesToAdd :
Optional element for UpdateCase to provide content to add services
impacted.
Parameter impactedServicesToDelete :
Optional element for UpdateCase to provide content to remove services
impacted.
Parameter reportedIncidentStartDate :
Optional element for UpdateCase to provide content for the customer
reported incident start date field.
Parameter threatActorIpAddressesToAdd :
Optional element for UpdateCase to provide content to add additional
suspicious IP addresses related to a case.
Parameter threatActorIpAddressesToDelete :
Optional element for UpdateCase to provide content to remove suspicious IP
addresses from a case.
Parameter title :
Optional element for UpdateCase to provide content for the title field.
Parameter watchersToAdd :
Optional element for UpdateCase to provide content to add additional
watchers to a case.
Parameter watchersToDelete :
Optional element for UpdateCase to provide content to remove existing
watchers from a case.
Implementation
Future<void> updateCase({
required String caseId,
DateTime? actualIncidentStartDate,
List<CaseMetadataEntry>? caseMetadata,
String? description,
EngagementType? engagementType,
List<String>? impactedAccountsToAdd,
List<String>? impactedAccountsToDelete,
List<ImpactedAwsRegion>? impactedAwsRegionsToAdd,
List<ImpactedAwsRegion>? impactedAwsRegionsToDelete,
List<String>? impactedServicesToAdd,
List<String>? impactedServicesToDelete,
DateTime? reportedIncidentStartDate,
List<ThreatActorIp>? threatActorIpAddressesToAdd,
List<ThreatActorIp>? threatActorIpAddressesToDelete,
String? title,
List<Watcher>? watchersToAdd,
List<Watcher>? watchersToDelete,
}) async {
final $payload = <String, dynamic>{
if (actualIncidentStartDate != null)
'actualIncidentStartDate': unixTimestampToJson(actualIncidentStartDate),
if (caseMetadata != null) 'caseMetadata': caseMetadata,
if (description != null) 'description': description,
if (engagementType != null) 'engagementType': engagementType.value,
if (impactedAccountsToAdd != null)
'impactedAccountsToAdd': impactedAccountsToAdd,
if (impactedAccountsToDelete != null)
'impactedAccountsToDelete': impactedAccountsToDelete,
if (impactedAwsRegionsToAdd != null)
'impactedAwsRegionsToAdd': impactedAwsRegionsToAdd,
if (impactedAwsRegionsToDelete != null)
'impactedAwsRegionsToDelete': impactedAwsRegionsToDelete,
if (impactedServicesToAdd != null)
'impactedServicesToAdd': impactedServicesToAdd,
if (impactedServicesToDelete != null)
'impactedServicesToDelete': impactedServicesToDelete,
if (reportedIncidentStartDate != null)
'reportedIncidentStartDate':
unixTimestampToJson(reportedIncidentStartDate),
if (threatActorIpAddressesToAdd != null)
'threatActorIpAddressesToAdd': threatActorIpAddressesToAdd,
if (threatActorIpAddressesToDelete != null)
'threatActorIpAddressesToDelete': threatActorIpAddressesToDelete,
if (title != null) 'title': title,
if (watchersToAdd != null) 'watchersToAdd': watchersToAdd,
if (watchersToDelete != null) 'watchersToDelete': watchersToDelete,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/cases/${Uri.encodeComponent(caseId)}/update-case',
exceptionFnMap: _exceptionFns,
);
}