def validate_options()

in aws_msk_iam_sasl_signer/cli.py [0:0]


def validate_options(ctx):
    region = ctx.params.get("region")
    aws_profile = ctx.params.get("aws_profile")
    role_arn = ctx.params.get("role_arn")

    if region is None:
        raise click.UsageError("--region must be provided.")

    if aws_profile and role_arn:
        raise click.UsageError(
            "Only one of --aws-profile and --role-arn should be provided."
        )