updateActionConnectorPermissions method
Updates the permissions for an action connector by granting or revoking access for specific users and groups. You can control who can view, use, or manage the action connector.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter actionConnectorId :
The unique identifier of the action connector whose permissions you want
to update.
Parameter awsAccountId :
The Amazon Web Services account ID that contains the action connector.
Parameter grantPermissions :
The permissions to grant to users and groups for this action connector.
Parameter revokePermissions :
The permissions to revoke from users and groups for this action connector.
Implementation
Future<UpdateActionConnectorPermissionsResponse>
updateActionConnectorPermissions({
required String actionConnectorId,
required String awsAccountId,
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: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/action-connectors/${Uri.encodeComponent(actionConnectorId)}/permissions',
exceptionFnMap: _exceptionFns,
);
return UpdateActionConnectorPermissionsResponse.fromJson(response);
}