updateThreatModel method

Future<UpdateThreatModelOutput> updateThreatModel({
  1. required String agentSpaceId,
  2. required String threatModelId,
  3. Assets? assets,
  4. String? description,
  5. CloudWatchLog? logConfig,
  6. List<DocumentInfo>? scopeDocs,
  7. String? serviceRole,
  8. String? title,
})

Updates an existing threat model configuration.

Parameter agentSpaceId : The unique identifier of the agent space that contains the threat model.

Parameter threatModelId : The unique identifier of the threat model to update.

Parameter assets : The updated assets for the threat model.

Parameter description : The updated description of the application or system being threat modeled.

Parameter logConfig : The updated CloudWatch Logs configuration for the threat model.

Parameter scopeDocs : The updated scoped documents for the agent to focus on during threat modeling.

Parameter serviceRole : The updated IAM service role for the threat model.

Parameter title : The updated title of the threat model.

Implementation

Future<UpdateThreatModelOutput> updateThreatModel({
  required String agentSpaceId,
  required String threatModelId,
  Assets? assets,
  String? description,
  CloudWatchLog? logConfig,
  List<DocumentInfo>? scopeDocs,
  String? serviceRole,
  String? title,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    'threatModelId': threatModelId,
    if (assets != null) 'assets': assets,
    if (description != null) 'description': description,
    if (logConfig != null) 'logConfig': logConfig,
    if (scopeDocs != null) 'scopeDocs': scopeDocs,
    if (serviceRole != null) 'serviceRole': serviceRole,
    if (title != null) 'title': title,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/UpdateThreatModel',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateThreatModelOutput.fromJson(response);
}