updateApprovalTeam method
Updates an approval team. You can request to update the team description, approval threshold, and approvers in the team.
Updates to an active team must be approved by the team.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
Amazon Resource Name (ARN) for the team.
Parameter approvalStrategy :
An ApprovalStrategy object. Contains details for how the team
grants approval.
Parameter approvers :
An array of ApprovalTeamRequestApprover objects. Contains
details for the approvers in the team.
Parameter description :
Description for the team.
Parameter updateActions :
A list of UpdateAction to perform when updating the team.
Implementation
Future<UpdateApprovalTeamResponse> updateApprovalTeam({
required String arn,
ApprovalStrategy? approvalStrategy,
List<ApprovalTeamRequestApprover>? approvers,
String? description,
List<UpdateAction>? updateActions,
}) async {
final $payload = <String, dynamic>{
if (approvalStrategy != null) 'ApprovalStrategy': approvalStrategy,
if (approvers != null) 'Approvers': approvers,
if (description != null) 'Description': description,
if (updateActions != null)
'UpdateActions': updateActions.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/approval-teams/${Uri.encodeComponent(arn)}',
exceptionFnMap: _exceptionFns,
);
return UpdateApprovalTeamResponse.fromJson(response);
}