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
Allow OperatorType to be a list such that one API can map to multiple operations (#166)
Allow OperatorType to be a list such that one API can map to multiple operations.
This is required in certain cases where the same API call maps to both Create and Update operations such as `RegisterScalableTarget` and `PutScalingPolicy`
[Link to ApplicationAutoscaling PR with the related change](aws-controllers-k8s/applicationautoscaling-controller#27)
Note: This change will require all other services to update their generator configs as well.
Issue #, if available:
aws-controllers-k8s/community#867
### Description of changes:
The `getOpTypeAndResourceName` method handles each of the following cases same as before in addition to the new case 5-
1. the cfg itself is nil
2. cfg is not nil but opId is not in the cfg
3. cfg is not nil, the opID is in the cfg but the opType is not specified
```
operations:
DescribeScalableTargets:
primary_identifier_field_name: ResourceID
```
4. One API -> one operations
```
operations:
PutScalingPolicy:
operation_type:
- Create
```
5. One API -> multiple operations
```
operations:
PutScalingPolicy:
operation_type:
- Create
- Update
```
### Testing
- I tested by generating the controller code for both applicationAutoscaling and the SageMaker repos.
- The unit tests pass as is.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
0 commit comments