I am looking to programmatically List my Current Support Plan that is active in AWS (Basic, Business, Enterprise On-Ramp, Enterprise). I cannot find this anywhere in AWS's AWSPowerShell Help or AWS CLI Help.
Is this possible to find this value programmatically using AWS CLI or AWSPowerShell? Requested call and output would be similar to:
C:\> Get-CurrentPremiumSupportPlan
Output:
"Business"
Reference:
From this post: https://aws.amazon.com/blogs/mt/aws-partners-determine-aws-support-plans-in-organization/
Seems that it can not be done directly (does not exist some API Call to get the Support plan) but you can use the describe-severity-levels API and based on the response determine which Support plan you have.
Like the accepted answer, similar to the following is what I've used:
SUPPORT_STATUS=$(eval aws support describe-severity-levels --region us-east-1 2>&1)
if [[ "$SUPPORT_STATUS" == *"SubscriptionRequiredException"* ]]; then
echo "No Support Enabled for account"
elif [[ "$SUPPORT_STATUS" == *"AccessDeniedException"* ]]; then
echo "Access denied or roles not properly setup"
elif [[ "$SUPPORT_STATUS" == *"critical"* ]]; then
echo "Enterprise Support already enabled for account..."
elif [[ "$SUPPORT_STATUS" == *"urgent"* ]]; then
echo "Only Business Level Support enabled for account..."
elif [[ "$SUPPORT_STATUS" == *"high"* ]]; then
echo "Only Developer Level Support enabled for account..."
fi
...also, I believe they are about to release the ability to manage support plans via API natively as https://docs.aws.amazon.com/awssupport/latest/user/security-support-plans.html added only a few days ago with the following actions:
supportplans:GetSupportPlan
supportplans:GetSupportPlanUpdateStatus
supportplans:StartSupportPlanUpdate
It still hasn't hit AWS CLI and Boto though...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With