From 949a6b2b9af0f0dcd3f29e65ca94e54f9f6b51c2 Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 26 Mar 2021 14:08:28 -0400 Subject: [PATCH] take param to get details --- ses-domain/bin/move-to-production.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ses-domain/bin/move-to-production.sh b/ses-domain/bin/move-to-production.sh index 6ee3bcb..2bc2168 100755 --- a/ses-domain/bin/move-to-production.sh +++ b/ses-domain/bin/move-to-production.sh @@ -42,14 +42,19 @@ then SES_DEBUG="true" fi -$SES_DEBUG $AWS sesv2 put-account-details \ - --production-access-enabled \ - --mail-type TRANSACTIONAL \ - --website-url "$SES_WEBSITE_URL" \ - --use-case-description "$SES_USE_CASE_DESCRIPTION" \ - --additional-contact-email-addresses $SES_ADDITIONAL_CONTACT_EMAIL \ - --contact-language EN -status=$? +if [ -z "$1" ] +then + $SES_DEBUG $AWS sesv2 put-account-details \ + --production-access-enabled \ + --mail-type TRANSACTIONAL \ + --website-url "$SES_WEBSITE_URL" \ + --use-case-description "$SES_USE_CASE_DESCRIPTION" \ + --additional-contact-email-addresses $SES_ADDITIONAL_CONTACT_EMAIL \ + --contact-language EN + status=$? +else + status=0 +fi if [ $status != 0 ] then @@ -58,7 +63,10 @@ then fi # now, get the details -$SES_DEBUG $AWS sesv2 get-account +if [[ -z "$1" ]] || [[ "$1" == "get" ]] +then + $SES_DEBUG $AWS sesv2 get-account +fi exit $status