updateThreatModel method
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);
}