You can use the AWS SDK to retrieve the support plan details from the AWS Support API. Here's an example code snippet in Python using Boto3:
import boto3
# Initialize AWS session
session = boto3.session.Session()
# Get AWS support client
support_client = session.client('support')
# Get the current AWS support plan
response = support_client.describe_cases()
plan_details = response['cases'][0]['serviceCode']
print("Current AWS Support Plan:", plan_details)