- Newest
- Most votes
- Most comments
It seems you're encountering issues with the AWS Braket .NET SDK, particularly with search requests for devices, jobs, and quantum tasks. Let's address these issues one by one:
For getting a list of Braket devices: The search endpoint for devices does indeed require a request model with filters, but you're correct that the filters list can be empty. If you're still getting an invalid request body error with an empty filter list, there might be an issue with how you're constructing the request. Make sure you're creating a valid SearchDevicesRequest object, even if it has an empty filters list.
For getting a list of Braket jobs and quantum tasks: The errors you're seeing suggest that the filter construction is incorrect. Here are some tips to resolve these:
-
For the jobArn filter: The 'CONTAINS' operator might not be appropriate for ARNs. Try using 'EQUAL' instead, or if you want to match partial ARNs, ensure the value is a valid partial ARN string.
-
For the createdAt filter: The date format you're using might not be what the API expects. AWS typically uses ISO 8601 format for dates. Try formatting your date as "2025-02-04T21:56:36Z" instead.
To get a list of resources without specific filters:
- For devices: Try creating a SearchDevicesRequest with an empty filters list.
- For jobs and tasks: If possible, try creating SearchJobsRequest and SearchQuantumTasksRequest objects without any filters, or with very broad filters (like a date range that covers all possible creation dates).
If you continue to face issues, double-check the SDK documentation for the exact format of the request objects and filters. Also, ensure you're using the latest version of the AWS Braket .NET SDK, as older versions might have bugs that have been fixed in newer releases.
If problems persist, you might want to try using the AWS CLI or AWS SDK for another language (like Python) to see if you can successfully make these requests. This can help determine if the issue is specific to the .NET SDK or if it's a more general problem with your AWS account or permissions.
Sources
How to set request body with AWS CRT HTTP Client? | AWS re:Post
Get request body from custom lambda authorizer | AWS re:Post
JSON Array in RequestBody not supported? | AWS re:Post
Relevant content
- asked 5 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago