Files
floci/compatibility-tests/sdk-test-java/src
Kenshin Okinaka 2c9e0bce7c feat(ses): support V1 ConfigurationSetEventDestination CRUD (#1111)
V2 SES already exposes ConfigurationSet event-destination CRUD via
REST JSON; this PR adds the matching V1 Query actions
(CreateConfigurationSetEventDestination /
UpdateConfigurationSetEventDestination /
DeleteConfigurationSetEventDestination) and extends
DescribeConfigurationSet so V1 callers can round-trip their stored
destinations. The service layer (`SesService.createConfigurationSetEventDestination`
etc.) already had the persistence and validation logic, so most of the
work is wire-format: parse V1 Query parameter shapes, render V1 XML
responses, and route the new action names.

- SesQueryHandler: three new Query actions plus
  `readEventDestination(params, prefix)` and `writeEventDestination`
  helpers. V1 wire field names use uppercase `ARN` / `NS` suffix
  variants (`SNSDestination.TopicARN`,
  `KinesisFirehoseDestination.IAMRoleARN` / `DeliveryStreamARN`,
  `CloudWatchDestination.DimensionConfigurations.member.N`) which are
  mapped onto the existing model classes; the `EventDestination.Enabled`
  default mirrors the V2 primitive-boolean default of `false` when
  omitted.
- V1 event-type wire forms are lowercase camelCase (`send`,
  `complaint`, `renderingFailure`) while floci stores the V2 canonical
  form (SCREAMING_SNAKE). New `V1_EVENT_TYPE_TO_INTERNAL` /
  `INTERNAL_EVENT_TYPE_TO_V1` maps translate in both directions; unknown
  values pass through so the existing validate-against-VALID_EVENT_TYPES
  check still catches typos.
- `handleDescribeConfigurationSet`: when
  `ConfigurationSetAttributeNames.member.N=eventDestinations` is
  requested, render the stored event destinations as a V1 XML block.
  Treat a null `ConfigurationSet.eventDestinations` list as empty when
  rendering, so a corrupted persisted JSON with `"EventDestinations": null`
  still produces an empty `<EventDestinations/>` container rather than
  NPE-ing. Other ConfigurationSet attribute names (trackingOptions,
  deliveryOptions, reputationOptions) remain unsupported and are
  silently ignored — they will land with their respective Put*Options
  PRs. The container is emitted even when the destination list is
  empty so the response depends only on the requested attributes.
- `writeEventDestination`: skip destination blocks when required fields
  are blank (defensive belt-and-suspenders for any legacy state) and
  filter incomplete CloudWatch dimension members so partial members
  don't leak into the XML.
- `SesService.validateEventDestination`: centralize required-field
  validation for SNS / Firehose / CloudWatch dimensions, so both V1
  and V2 reject partial destinations at create/update time. Members
  with missing required fields now fail with a 400
  `InvalidParameterValue` carrying the offending member index.
- `AwsQueryController.SES_ACTIONS`: include the three new actions in
  the action-name → "email" service routing fallback so SigV4 requests
  whose credential scope doesn't pin the service still reach SES.

Tests
- `SesConfigurationSetEventDestinationV1IntegrationTest`: 15 cases
  covering create / describe-with-attribute / describe-without-attribute
  / describe-empty-attribute / duplicate / update / update-unknown /
  delete / delete-unknown / partial Firehose / partial CloudWatch dim
  / blank SNS TopicARN / action-name routing fallback when the
  Authorization header is absent.
- `SesServiceEventDestinationTest`: 8 new unit cases for the
  centralized SNS / Firehose / CloudWatch dim validation, exercising
  validateEventDestination directly.
- `compatibility-tests/sdk-test-java SesConfigurationSetEventDestinationTest`:
  extended to drive both V1 (SesClient) and V2 (SesV2Client) against a
  live Floci. Each protocol gets its own config set; nine new V1 tests
  mirror the V2 lifecycle plus partial-Firehose rejection.
2026-06-02 00:14:53 -05:00
..