runWithOutput method

  1. @override
Future<void> runWithOutput(
  1. Configuration<ProjectUserRevokeOption> commandConfig,
  2. CommandOutput output
)
override

Runs this command with prepared configuration and output.

Subclasses should override this method.

Implementation

@override
Future<void> runWithOutput(
  final Configuration<ProjectUserRevokeOption> commandConfig,
  final CommandOutput output,
) async {
  final projectId = commandConfig.value(ProjectUserRevokeOption.projectId);
  final userEmail = commandConfig.value(ProjectUserRevokeOption.user);

  await renderCommand(
    output,
    operation: () => UserCommands.revokeUser(
      runner.serviceProvider.cloudApiClient,
      projectId: projectId,
      email: userEmail,
      unassignRoleNames: const [],
      unassignAllRoles: true,
    ),
    textOutputUi: const ProjectUserRevokeTextUi(),
  );
}