updateFolderPermissions method
Updates permissions of a folder.
May throw AccessDeniedException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter awsAccountId :
The ID for the Amazon Web Services account that contains the folder to
update.
Parameter folderId :
The ID of the folder.
Parameter grantPermissions :
The permissions that you want to grant on a resource. Namespace ARNs are
not supported Principal values for folder permissions.
Parameter revokePermissions :
The permissions that you want to revoke from a resource. Namespace ARNs
are not supported Principal values for folder permissions.
Implementation
Future<UpdateFolderPermissionsResponse> updateFolderPermissions({
required String awsAccountId,
required String folderId,
List<ResourcePermission>? grantPermissions,
List<ResourcePermission>? revokePermissions,
}) async {
final $payload = <String, dynamic>{
if (grantPermissions != null) 'GrantPermissions': grantPermissions,
if (revokePermissions != null) 'RevokePermissions': revokePermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/folders/${Uri.encodeComponent(folderId)}/permissions',
exceptionFnMap: _exceptionFns,
);
return UpdateFolderPermissionsResponse.fromJson(response);
}