updateCaseStatus method

Future<UpdateCaseStatusResponse> updateCaseStatus({
  1. required String caseId,
  2. required SelfManagedCaseStatus caseStatus,
})

Updates the state transitions for a designated cases.

Self-managed: the following states are available for self-managed cases.

  • Submitted → Detection and Analysis
  • Detection and Analysis → Containment, Eradication, and Recovery
  • Detection and Analysis → Post-incident Activities
  • Containment, Eradication, and Recovery → Detection and Analysis
  • Containment, Eradication, and Recovery → Post-incident Activities
  • Post-incident Activities → Containment, Eradication, and Recovery
  • Post-incident Activities → Detection and Analysis
  • Any → Closed
AWS supported: You must use the CloseCase API to close.

Parameter caseId : Required element for UpdateCaseStatus to identify the case to update.

Parameter caseStatus : Required element for UpdateCaseStatus to identify the status for a case. Options include Submitted | Detection and Analysis | Containment, Eradication and Recovery | Post-incident Activities.

Implementation

Future<UpdateCaseStatusResponse> updateCaseStatus({
  required String caseId,
  required SelfManagedCaseStatus caseStatus,
}) async {
  final $payload = <String, dynamic>{
    'caseStatus': caseStatus.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/cases/${Uri.encodeComponent(caseId)}/update-case-status',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateCaseStatusResponse.fromJson(response);
}