You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to see the list of AWS support cases created using the boto3 function describe_cases(). I am actually looking for the particular caseId from the list of support cases.
support_client = member_session.client('support')
output_file = "support_case_found_details.txt"
with open(output_file, 'a') as file:
next_token=None
while True:
if next_token:
response = support_client.describe_cases(NextToken=next_token)
else:
response = support_client.describe_cases()
print(f"Cases: {response}\n")
try:
for case in response['cases']:
if case['caseId'] == parsed_args.supportcase_id:
file.write(f"Support Case ID: {case['caseId']} found in Account ID: {account_id}\n")
return # Exit early if the case is found in any account
except Exception as e:
print(f"An error occurred: {e}")
# Check if there are more pages
next_token = response.get('nextToken')
if not next_token:
break
Possible Solution
Should be able to return the list of support cases.
Additional Information/Context
N/A
SDK version used
1.28.84
Environment details (OS name and version, etc.)
MacBook Pro Ventura 13.5.2
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
I am unable to see the list of AWS support cases created using the boto3 function describe_cases(). I am actually looking for the particular caseId from the list of support cases.
Expected Behavior
Current Behavior
{'cases': [], 'ResponseMetadata': {'RequestId': 'XXXXXX-XXX-XXX-XXX-XXX', 'HTTPStatusCode': 200, 'HTTPHeaders': {'date': 'Thu, 07 Dec 2023 19:48:32 GMT', 'content-type': 'application/x-amz-json-1.1', 'content-length': '12', 'connection': 'keep-alive', 'x-amzn-requestid': 'XXXXXX-XXX-XXX-XX-XXX'}, 'RetryAttempts': 0}}
Reproduction Steps
Possible Solution
Should be able to return the list of support cases.
Additional Information/Context
N/A
SDK version used
1.28.84
Environment details (OS name and version, etc.)
MacBook Pro Ventura 13.5.2
The text was updated successfully, but these errors were encountered: