updateMalwareProtectionPlan method
Updates an existing Malware Protection plan resource.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
Parameter malwareProtectionPlanId :
A unique identifier associated with the Malware Protection plan.
Parameter actions :
Information about whether the tags will be added to the S3 object after
scanning.
Parameter protectedResource :
Information about the protected resource that is associated with the
created Malware Protection plan. Presently, S3Bucket is the
only supported protected resource.
Parameter role :
Amazon Resource Name (ARN) of the IAM role with permissions to scan and
add tags to the associated protected resource.
Implementation
Future<void> updateMalwareProtectionPlan({
required String malwareProtectionPlanId,
MalwareProtectionPlanActions? actions,
UpdateProtectedResource? protectedResource,
String? role,
}) async {
final $payload = <String, dynamic>{
if (actions != null) 'actions': actions,
if (protectedResource != null) 'protectedResource': protectedResource,
if (role != null) 'role': role,
};
await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/malware-protection-plan/${Uri.encodeComponent(malwareProtectionPlanId)}',
exceptionFnMap: _exceptionFns,
);
}