updatePentest method
- required String agentSpaceId,
- required String pentestId,
- Assets? assets,
- CodeRemediationStrategy? codeRemediationStrategy,
- List<
SkillType> ? disableManagedSkills, - List<
RiskType> ? excludeRiskTypes, - CloudWatchLog? logConfig,
- NetworkTrafficConfig? networkTrafficConfig,
- String? serviceRole,
- String? title,
- VpcConfig? vpcConfig,
Updates an existing pentest configuration.
Parameter agentSpaceId :
The unique identifier of the agent space that contains the pentest.
Parameter pentestId :
The unique identifier of the pentest to update.
Parameter assets :
The updated assets for the pentest.
Parameter codeRemediationStrategy :
The updated code remediation strategy for the pentest.
Parameter disableManagedSkills :
The updated list of managed skills to disable for this pentest. Valid
values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.
Parameter excludeRiskTypes :
The updated list of risk types to exclude from the pentest.
Parameter logConfig :
The updated CloudWatch Logs configuration for the pentest.
Parameter networkTrafficConfig :
The updated network traffic configuration for the pentest.
Parameter serviceRole :
The updated IAM service role for the pentest.
Parameter title :
The updated title of the pentest.
Parameter vpcConfig :
The updated VPC configuration for the pentest.
Implementation
Future<UpdatePentestOutput> updatePentest({
required String agentSpaceId,
required String pentestId,
Assets? assets,
CodeRemediationStrategy? codeRemediationStrategy,
List<SkillType>? disableManagedSkills,
List<RiskType>? excludeRiskTypes,
CloudWatchLog? logConfig,
NetworkTrafficConfig? networkTrafficConfig,
String? serviceRole,
String? title,
VpcConfig? vpcConfig,
}) async {
final $payload = <String, dynamic>{
'agentSpaceId': agentSpaceId,
'pentestId': pentestId,
if (assets != null) 'assets': assets,
if (codeRemediationStrategy != null)
'codeRemediationStrategy': codeRemediationStrategy.value,
if (disableManagedSkills != null)
'disableManagedSkills':
disableManagedSkills.map((e) => e.value).toList(),
if (excludeRiskTypes != null)
'excludeRiskTypes': excludeRiskTypes.map((e) => e.value).toList(),
if (logConfig != null) 'logConfig': logConfig,
if (networkTrafficConfig != null)
'networkTrafficConfig': networkTrafficConfig,
if (serviceRole != null) 'serviceRole': serviceRole,
if (title != null) 'title': title,
if (vpcConfig != null) 'vpcConfig': vpcConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/UpdatePentest',
exceptionFnMap: _exceptionFns,
);
return UpdatePentestOutput.fromJson(response);
}