Commit dcb9fd6
authored
Adding functionality to assign whole object to a field (#451)
Issue #, if available:
This PR is created to support the code-generation for `FunctionEventInvokeConfig` feature in lambda-controller. [PR#92](aws-controllers-k8s/lambda-controller#92)
Description of changes:
This PR adds functionality to assign whole object to a field, instead of assigning a particular parameter of it. To clarify it further, in the below code, we created a new field `LayerStatuses` which stores the value of `Configuration.Layers` parameter taken from `GetFunction` operation.
```
LayerStatuses:
from:
operation: GetFunction
path: Configuration.Layers
```
In our case we needed to add `FunctionEventInvokeConfig` as an inline property to `Function` resource, for which we needed to assign the whole object returned by `PutFunctionEventInvokeConfig` operation to field `FunctionEventInvokeConfig`. To make this work we added a new condition for it by passing `path` value as `.` , shown below:
```
FunctionEventInvokeConfig:
from:
operation: PutFunctionEventInvokeConfig
path: .
```
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.1 parent 6542e04 commit dcb9fd6
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
0 commit comments