-
Notifications
You must be signed in to change notification settings - Fork 267
Support type 'list' for output_wrapper_field_path
#1285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@brycahta for the List operation, we have a I think your proposal here is a good one. |
Basically, we want to make this piece of code configurable... |
Issue #, if available: aws-controllers-k8s/community#1285 Description of changes: * adds support for list types to `output_wrapper_field_path` * cleans up logic in `setResourceReadMany` * updates EC2 unit tests in model and code packages By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issues go stale after 90d of inactivity. |
/lifecycle frozen |
Is your feature request related to a problem?
I am unable to generate Instance CRD for ec2-controller because code-generator cannot unwrap the list responses from
RunInstances
andDescribeInstances
, the Create and List operations, respectively.RunInstances is a "create many" call in that a single request can create multiple instances. As a result, the output shape returns a list of Instances (within a Reservation struct). Similarly, DescribeInstances returns a list of Reservations each containing a list of Instances.
The Instance CRD implementation will only allow requesting/creating a single instance at a time; therefore, we only want the first instance in the
RunInstances
output shape,Reservation.Instances[0]
, and the first instance of the first reservation in theDescribeInstances
output shape,Reservations[0].Instances[0]
.Describe the solution you'd like
Extend the functionality of
output_wrapper_field_path
config to support type "list" (only supports struct today). Unwrapping a list element will always take the first element.Desired generator.yaml for
Instance
:setResourceReadMany
tosetListResource
(or something similar) and use this function forReadMany
and unwrapping list elements.Describe alternatives you've considered
RunInstances
toCreateBatch
operation and create asetResourceCreateMany()
The text was updated successfully, but these errors were encountered: