updateFlowPermissions method

Future<UpdateFlowPermissionsOutput> updateFlowPermissions({
  1. required String awsAccountId,
  2. required String flowId,
  3. List<Permission>? grantPermissions,
  4. List<Permission>? revokePermissions,
})

Updates permissions against principals on a flow.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the flow you are updating permissions against.

Parameter flowId : The unique identifier of the flow to update permissions for.

Parameter grantPermissions : The permissions that you want to grant on this flow.

Parameter revokePermissions : The permissions that you want to revoke from this flow.

Implementation

Future<UpdateFlowPermissionsOutput> updateFlowPermissions({
  required String awsAccountId,
  required String flowId,
  List<Permission>? grantPermissions,
  List<Permission>? 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)}/flows/${Uri.encodeComponent(flowId)}/permissions',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFlowPermissionsOutput.fromJson(response);
}