Omitting a operator in the AdvancedEventSelector.FieldSelector seems to be allowed but API throws a 400 followed by a 500 #4260
Labels
bug
This issue is a bug.
closed-for-staleness
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When trying to create a EventDataStore, I add a AdvancedEventSelector containing a FieldSelector. If I only set the Field and omit one of the operators (equals, starts with, etc) it seems to be accepted by the
func (s *CreateEventDataStoreInput) Validate()
but throws an error implicitly (400) when calling the API.Version of AWS SDK for Go?
v1.42.38
aws.SDKVersion
in your code after importing"github.com/aws/aws-sdk-go/aws"
Version of Go (
go version
)?go version go1.17.6 linux/amd64
To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code or minimal repo)
Try to create a event data store including a AdvancedEventSelector that omits any operator (just set the Field property)
Expected behavior
I would expect to not receive a retryable 400, but either the validation failing or a 400 that isn't being retried.
Additional context
The documentation clearly shows that a field should always be used together with an operator: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#read-write-events-data
Trace from event history:
The text was updated successfully, but these errors were encountered: