From 58d665ff3c54f5420b0e934ab3560ca955ce6f3a Mon Sep 17 00:00:00 2001 From: Guillaume Charest <1690085+gcharest@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:49:06 +0000 Subject: [PATCH] feat: update help text to match new commands available --- app/modules/aws/aws.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/modules/aws/aws.py b/app/modules/aws/aws.py index 4c4288fa..07a2d58d 100644 --- a/app/modules/aws/aws.py +++ b/app/modules/aws/aws.py @@ -9,7 +9,9 @@ """ import os -from slack_bolt import App +from slack_bolt import App, Ack, Respond +from slack_sdk.web import WebClient +from logging import Logger from integrations.aws.organizations import get_account_id_by_name from integrations.aws import identity_store @@ -20,20 +22,25 @@ AWS_ADMIN_GROUPS = os.environ.get("AWS_ADMIN_GROUPS", "sre-ifs@cds-snc.ca").split(",") help_text = """ -\n `/aws user ...` +\n `/aws users ...` \n - Provision or deprovision AWS users | Provisionner ou déprovisionner des utilisateurs AWS \n Supports multiple users for a single operation | Supporte plusieurs utilisateurs pour l'opération \n ``: `create` or/ou `delete` \n ``: email address or Slack username of the user | adresse courriel ou identifiant Slack de l'utilisateur \n Usage: `/aws user create @username user.name@email.com` +\n `/aws groups ...` +\n - Manage AWS groups | Gérer les groupes AWS +\n ``: `sync`, `list` +\n ``: name of the group | nom du groupe (sync only) +\n Usage: `/aws groups sync`, `/aws groups sync group-name` or/ou `/aws groups list` \n `/aws help | aide` \n - Show this help text | montre le dialogue d'aide \n \n (currently disabled) -\n `/aws access` -\n - starts the process to access an AWS account | débute le processus pour accéder à un compte AWS \n `/aws health` \n - Query the health of an AWS account | Demander l'état de santé d'un compte AWS +\n `/aws access` +\n - starts the process to access an AWS account | débute le processus pour accéder à un compte AWS """ @@ -48,7 +55,9 @@ def register(bot: App) -> None: bot.view("aws_health_view")(aws_account_health.health_view_handler) -def aws_command(ack, command, logger, respond, client, body) -> None: +def aws_command( + ack: Ack, command, logger: Logger, respond: Respond, client: WebClient, body +) -> None: """AWS command handler. This function handles the `/aws` command by parsing the command text and executing the appropriate action.