aws-solutions-constructs.aws-openapigateway-lambda 2.77.0__tar.gz → 2.78.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/PKG-INFO +13 -10
  2. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/README.md +8 -4
  3. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/pyproject.toml +1 -1
  4. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/setup.py +6 -7
  5. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs/aws_openapigateway_lambda/__init__.py +36 -17
  6. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/__init__.py +2 -2
  7. aws_solutions_constructs_aws_openapigateway_lambda-2.78.1/src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/aws-openapigateway-lambda@2.78.1.jsii.tgz +0 -0
  8. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info}/PKG-INFO +13 -10
  9. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/SOURCES.txt +1 -1
  10. aws_solutions_constructs_aws_openapigateway_lambda-2.78.1/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/requires.txt +7 -0
  11. aws_solutions_constructs_aws_openapigateway_lambda-2.77.0/src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/aws-openapigateway-lambda@2.77.0.jsii.tgz +0 -0
  12. aws_solutions_constructs_aws_openapigateway_lambda-2.77.0/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/requires.txt +0 -7
  13. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/LICENSE +0 -0
  14. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/MANIFEST.in +0 -0
  15. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/setup.cfg +0 -0
  16. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs/aws_openapigateway_lambda/py.typed +0 -0
  17. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/dependency_links.txt +0 -0
  18. {aws_solutions_constructs_aws_openapigateway_lambda-2.77.0 → aws_solutions_constructs_aws_openapigateway_lambda-2.78.1}/src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-solutions-constructs.aws-openapigateway-lambda
3
- Version: 2.77.0
3
+ Version: 2.78.1
4
4
  Summary: CDK constructs for defining an interaction between an OpenAPI-defined API Gateway and one or more Lambda functions.
5
5
  Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
6
  Author: Amazon Web Services
@@ -10,20 +10,19 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: JavaScript
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.8
14
13
  Classifier: Programming Language :: Python :: 3.9
15
14
  Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
17
16
  Classifier: Typing :: Typed
18
17
  Classifier: License :: OSI Approved
19
- Requires-Python: ~=3.8
18
+ Requires-Python: ~=3.9
20
19
  Description-Content-Type: text/markdown
21
20
  License-File: LICENSE
22
21
  Requires-Dist: aws-cdk-lib<3.0.0,>=2.177.0
23
- Requires-Dist: aws-solutions-constructs.core==2.77.0
24
- Requires-Dist: aws-solutions-constructs.resources==2.77.0
22
+ Requires-Dist: aws-solutions-constructs.core==2.78.1
23
+ Requires-Dist: aws-solutions-constructs.resources==2.78.1
25
24
  Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.106.0
25
+ Requires-Dist: jsii<2.0.0,>=1.109.0
27
26
  Requires-Dist: publication>=0.0.3
28
27
  Requires-Dist: typeguard<4.3.0,>=2.13.3
29
28
 
@@ -172,6 +171,14 @@ new OpenApiGatewayToLambda(this, "OpenApiGatewayToLambda", OpenApiGatewayToLambd
172
171
  |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
173
172
  |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
174
173
 
174
+ ## Interfaces defined by this construct
175
+
176
+ `ApiIntegration`
177
+ Maps a Lambda function to the id string used as a placeholder in the OpenAPI spec. The type has a required property, `id`, and two optional properties `existingLambdaObj`, and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error. The `existingLambaObj` property will accept a lambda.Function object OR a lambda.Alias object. The property `ApiIntegrations` is an array of this interface and is a required property when launching this construct.
178
+
179
+ `ApiLambdaFunction`
180
+ This interface returns the Lambda objects used when launching the construct. The `id` property will always be set, if an existing function was provided in the props or this construct created a new Lambda function, then that function will be in the `lambdaFunction` property. If a Lambda Alias was provided in the props, then that value will be specified in the `functionAlias` property. At no time will `lambdaFunction` and `functionAlias` be set on the same ApiLambdaFunction object. The construct exposes an array of these objects as a property.
181
+
175
182
  ## Overview of how the OpenAPI file transformation works
176
183
 
177
184
  This construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.
@@ -233,10 +240,6 @@ When the construct is created or updated, it will overwrite the `MessagesHandler
233
240
 
234
241
  For more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
235
242
 
236
- ## ApiIntegration Details
237
-
238
- This construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.
239
-
240
243
  ## Default settings
241
244
 
242
245
  Out of the box implementation of the Construct without any override will set the following defaults:
@@ -143,6 +143,14 @@ new OpenApiGatewayToLambda(this, "OpenApiGatewayToLambda", OpenApiGatewayToLambd
143
143
  |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
144
144
  |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
145
145
 
146
+ ## Interfaces defined by this construct
147
+
148
+ `ApiIntegration`
149
+ Maps a Lambda function to the id string used as a placeholder in the OpenAPI spec. The type has a required property, `id`, and two optional properties `existingLambdaObj`, and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error. The `existingLambaObj` property will accept a lambda.Function object OR a lambda.Alias object. The property `ApiIntegrations` is an array of this interface and is a required property when launching this construct.
150
+
151
+ `ApiLambdaFunction`
152
+ This interface returns the Lambda objects used when launching the construct. The `id` property will always be set, if an existing function was provided in the props or this construct created a new Lambda function, then that function will be in the `lambdaFunction` property. If a Lambda Alias was provided in the props, then that value will be specified in the `functionAlias` property. At no time will `lambdaFunction` and `functionAlias` be set on the same ApiLambdaFunction object. The construct exposes an array of these objects as a property.
153
+
146
154
  ## Overview of how the OpenAPI file transformation works
147
155
 
148
156
  This construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.
@@ -204,10 +212,6 @@ When the construct is created or updated, it will overwrite the `MessagesHandler
204
212
 
205
213
  For more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
206
214
 
207
- ## ApiIntegration Details
208
-
209
- This construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.
210
-
211
215
  ## Default settings
212
216
 
213
217
  Out of the box implementation of the Construct without any override will set the following defaults:
@@ -4,6 +4,6 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.pyright]
6
6
  defineConstant = { DEBUG = true }
7
- pythonVersion = "3.8"
7
+ pythonVersion = "3.9"
8
8
  pythonPlatform = "All"
9
9
  reportSelfClsParameterName = false
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-solutions-constructs.aws-openapigateway-lambda",
8
- "version": "2.77.0",
8
+ "version": "2.78.1",
9
9
  "description": "CDK constructs for defining an interaction between an OpenAPI-defined API Gateway and one or more Lambda functions.",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/awslabs/aws-solutions-constructs.git",
@@ -26,19 +26,19 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_solutions_constructs.aws_openapigateway_lambda._jsii": [
29
- "aws-openapigateway-lambda@2.77.0.jsii.tgz"
29
+ "aws-openapigateway-lambda@2.78.1.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_openapigateway_lambda": [
32
32
  "py.typed"
33
33
  ]
34
34
  },
35
- "python_requires": "~=3.8",
35
+ "python_requires": "~=3.9",
36
36
  "install_requires": [
37
37
  "aws-cdk-lib>=2.177.0, <3.0.0",
38
- "aws-solutions-constructs.core==2.77.0",
39
- "aws-solutions-constructs.resources==2.77.0",
38
+ "aws-solutions-constructs.core==2.78.1",
39
+ "aws-solutions-constructs.resources==2.78.1",
40
40
  "constructs>=10.0.0, <11.0.0",
41
- "jsii>=1.106.0, <2.0.0",
41
+ "jsii>=1.109.0, <2.0.0",
42
42
  "publication>=0.0.3",
43
43
  "typeguard>=2.13.3,<4.3.0"
44
44
  ],
@@ -47,7 +47,6 @@ kwargs = json.loads(
47
47
  "Operating System :: OS Independent",
48
48
  "Programming Language :: JavaScript",
49
49
  "Programming Language :: Python :: 3 :: Only",
50
- "Programming Language :: Python :: 3.8",
51
50
  "Programming Language :: Python :: 3.9",
52
51
  "Programming Language :: Python :: 3.10",
53
52
  "Programming Language :: Python :: 3.11",
@@ -144,6 +144,14 @@ new OpenApiGatewayToLambda(this, "OpenApiGatewayToLambda", OpenApiGatewayToLambd
144
144
  |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
145
145
  |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
146
146
 
147
+ ## Interfaces defined by this construct
148
+
149
+ `ApiIntegration`
150
+ Maps a Lambda function to the id string used as a placeholder in the OpenAPI spec. The type has a required property, `id`, and two optional properties `existingLambdaObj`, and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error. The `existingLambaObj` property will accept a lambda.Function object OR a lambda.Alias object. The property `ApiIntegrations` is an array of this interface and is a required property when launching this construct.
151
+
152
+ `ApiLambdaFunction`
153
+ This interface returns the Lambda objects used when launching the construct. The `id` property will always be set, if an existing function was provided in the props or this construct created a new Lambda function, then that function will be in the `lambdaFunction` property. If a Lambda Alias was provided in the props, then that value will be specified in the `functionAlias` property. At no time will `lambdaFunction` and `functionAlias` be set on the same ApiLambdaFunction object. The construct exposes an array of these objects as a property.
154
+
147
155
  ## Overview of how the OpenAPI file transformation works
148
156
 
149
157
  This construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.
@@ -205,10 +213,6 @@ When the construct is created or updated, it will overwrite the `MessagesHandler
205
213
 
206
214
  For more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
207
215
 
208
- ## ApiIntegration Details
209
-
210
- This construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.
211
-
212
216
  ## Default settings
213
217
 
214
218
  Out of the box implementation of the Construct without any override will set the following defaults:
@@ -294,7 +298,7 @@ class ApiIntegration:
294
298
  self,
295
299
  *,
296
300
  id: builtins.str,
297
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
301
+ existing_lambda_obj: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.Function, _aws_cdk_aws_lambda_ceddda9d.Alias]] = None,
298
302
  lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
299
303
  ) -> None:
300
304
  '''The ApiIntegration interface is used to correlate a user-specified id with either a existing lambda function or set of lambda props.
@@ -333,13 +337,13 @@ class ApiIntegration:
333
337
  @builtins.property
334
338
  def existing_lambda_obj(
335
339
  self,
336
- ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
340
+ ) -> typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.Function, _aws_cdk_aws_lambda_ceddda9d.Alias]]:
337
341
  '''The Lambda function to associate with the API method in the OpenAPI file matched by id.
338
342
 
339
343
  One and only one of existingLambdaObj or lambdaFunctionProps must be specified, any other combination will cause an error.
340
344
  '''
341
345
  result = self._values.get("existing_lambda_obj")
342
- return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
346
+ return typing.cast(typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.Function, _aws_cdk_aws_lambda_ceddda9d.Alias]], result)
343
347
 
344
348
  @builtins.property
345
349
  def lambda_function_props(
@@ -367,28 +371,38 @@ class ApiIntegration:
367
371
  @jsii.data_type(
368
372
  jsii_type="@aws-solutions-constructs/aws-openapigateway-lambda.ApiLambdaFunction",
369
373
  jsii_struct_bases=[],
370
- name_mapping={"id": "id", "lambda_function": "lambdaFunction"},
374
+ name_mapping={
375
+ "id": "id",
376
+ "function_alias": "functionAlias",
377
+ "lambda_function": "lambdaFunction",
378
+ },
371
379
  )
372
380
  class ApiLambdaFunction:
373
381
  def __init__(
374
382
  self,
375
383
  *,
376
384
  id: builtins.str,
377
- lambda_function: _aws_cdk_aws_lambda_ceddda9d.Function,
385
+ function_alias: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Alias] = None,
386
+ lambda_function: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
378
387
  ) -> None:
379
388
  '''Helper object to map an ApiIntegration id to its resolved lambda.Function. This type is exposed as a property on the instantiated construct.
380
389
 
381
390
  :param id: Id of the ApiIntegration, used to correlate this lambda function to the api integration in the open api definition.
382
- :param lambda_function: The instantiated lambda.Function.
391
+ :param function_alias: -
392
+ :param lambda_function: The function the API method will integrate with - Must be defined in lambdaFunction or functionAlias (but not both).
383
393
  '''
384
394
  if __debug__:
385
395
  type_hints = typing.get_type_hints(_typecheckingstub__7b34df00db45a414bf2a2dd0aa85c226040b27bc33e6b02e652a7c94c036c86c)
386
396
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
397
+ check_type(argname="argument function_alias", value=function_alias, expected_type=type_hints["function_alias"])
387
398
  check_type(argname="argument lambda_function", value=lambda_function, expected_type=type_hints["lambda_function"])
388
399
  self._values: typing.Dict[builtins.str, typing.Any] = {
389
400
  "id": id,
390
- "lambda_function": lambda_function,
391
401
  }
402
+ if function_alias is not None:
403
+ self._values["function_alias"] = function_alias
404
+ if lambda_function is not None:
405
+ self._values["lambda_function"] = lambda_function
392
406
 
393
407
  @builtins.property
394
408
  def id(self) -> builtins.str:
@@ -398,11 +412,15 @@ class ApiLambdaFunction:
398
412
  return typing.cast(builtins.str, result)
399
413
 
400
414
  @builtins.property
401
- def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
402
- '''The instantiated lambda.Function.'''
415
+ def function_alias(self) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Alias]:
416
+ result = self._values.get("function_alias")
417
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Alias], result)
418
+
419
+ @builtins.property
420
+ def lambda_function(self) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
421
+ '''The function the API method will integrate with - Must be defined in lambdaFunction or functionAlias (but not both).'''
403
422
  result = self._values.get("lambda_function")
404
- assert result is not None, "Required property 'lambda_function' is missing"
405
- return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, result)
423
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
406
424
 
407
425
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
408
426
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -704,7 +722,7 @@ publication.publish()
704
722
  def _typecheckingstub__9b1a09e9bbf57f6b9c31a7e98f3c22bf1f14ee32a481f88b7c6a5dae44c51063(
705
723
  *,
706
724
  id: builtins.str,
707
- existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
725
+ existing_lambda_obj: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.Function, _aws_cdk_aws_lambda_ceddda9d.Alias]] = None,
708
726
  lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
709
727
  ) -> None:
710
728
  """Type checking stubs"""
@@ -713,7 +731,8 @@ def _typecheckingstub__9b1a09e9bbf57f6b9c31a7e98f3c22bf1f14ee32a481f88b7c6a5dae4
713
731
  def _typecheckingstub__7b34df00db45a414bf2a2dd0aa85c226040b27bc33e6b02e652a7c94c036c86c(
714
732
  *,
715
733
  id: builtins.str,
716
- lambda_function: _aws_cdk_aws_lambda_ceddda9d.Function,
734
+ function_alias: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Alias] = None,
735
+ lambda_function: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
717
736
  ) -> None:
718
737
  """Type checking stubs"""
719
738
  pass
@@ -35,9 +35,9 @@ import constructs._jsii
35
35
 
36
36
  __jsii_assembly__ = jsii.JSIIAssembly.load(
37
37
  "@aws-solutions-constructs/aws-openapigateway-lambda",
38
- "2.77.0",
38
+ "2.78.1",
39
39
  __name__[0:-6],
40
- "aws-openapigateway-lambda@2.77.0.jsii.tgz",
40
+ "aws-openapigateway-lambda@2.78.1.jsii.tgz",
41
41
  )
42
42
 
43
43
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-solutions-constructs.aws-openapigateway-lambda
3
- Version: 2.77.0
3
+ Version: 2.78.1
4
4
  Summary: CDK constructs for defining an interaction between an OpenAPI-defined API Gateway and one or more Lambda functions.
5
5
  Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
6
  Author: Amazon Web Services
@@ -10,20 +10,19 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: JavaScript
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.8
14
13
  Classifier: Programming Language :: Python :: 3.9
15
14
  Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
17
16
  Classifier: Typing :: Typed
18
17
  Classifier: License :: OSI Approved
19
- Requires-Python: ~=3.8
18
+ Requires-Python: ~=3.9
20
19
  Description-Content-Type: text/markdown
21
20
  License-File: LICENSE
22
21
  Requires-Dist: aws-cdk-lib<3.0.0,>=2.177.0
23
- Requires-Dist: aws-solutions-constructs.core==2.77.0
24
- Requires-Dist: aws-solutions-constructs.resources==2.77.0
22
+ Requires-Dist: aws-solutions-constructs.core==2.78.1
23
+ Requires-Dist: aws-solutions-constructs.resources==2.78.1
25
24
  Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.106.0
25
+ Requires-Dist: jsii<2.0.0,>=1.109.0
27
26
  Requires-Dist: publication>=0.0.3
28
27
  Requires-Dist: typeguard<4.3.0,>=2.13.3
29
28
 
@@ -172,6 +171,14 @@ new OpenApiGatewayToLambda(this, "OpenApiGatewayToLambda", OpenApiGatewayToLambd
172
171
  |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
173
172
  |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
174
173
 
174
+ ## Interfaces defined by this construct
175
+
176
+ `ApiIntegration`
177
+ Maps a Lambda function to the id string used as a placeholder in the OpenAPI spec. The type has a required property, `id`, and two optional properties `existingLambdaObj`, and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error. The `existingLambaObj` property will accept a lambda.Function object OR a lambda.Alias object. The property `ApiIntegrations` is an array of this interface and is a required property when launching this construct.
178
+
179
+ `ApiLambdaFunction`
180
+ This interface returns the Lambda objects used when launching the construct. The `id` property will always be set, if an existing function was provided in the props or this construct created a new Lambda function, then that function will be in the `lambdaFunction` property. If a Lambda Alias was provided in the props, then that value will be specified in the `functionAlias` property. At no time will `lambdaFunction` and `functionAlias` be set on the same ApiLambdaFunction object. The construct exposes an array of these objects as a property.
181
+
175
182
  ## Overview of how the OpenAPI file transformation works
176
183
 
177
184
  This construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.
@@ -233,10 +240,6 @@ When the construct is created or updated, it will overwrite the `MessagesHandler
233
240
 
234
241
  For more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)
235
242
 
236
- ## ApiIntegration Details
237
-
238
- This construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.
239
-
240
243
  ## Default settings
241
244
 
242
245
  Out of the box implementation of the Construct without any override will set the following defaults:
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_openapigateway_lambda.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_openapigateway_lambda/__init__.py
12
12
  src/aws_solutions_constructs/aws_openapigateway_lambda/py.typed
13
13
  src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/aws-openapigateway-lambda@2.77.0.jsii.tgz
14
+ src/aws_solutions_constructs/aws_openapigateway_lambda/_jsii/aws-openapigateway-lambda@2.78.1.jsii.tgz
@@ -0,0 +1,7 @@
1
+ aws-cdk-lib<3.0.0,>=2.177.0
2
+ aws-solutions-constructs.core==2.78.1
3
+ aws-solutions-constructs.resources==2.78.1
4
+ constructs<11.0.0,>=10.0.0
5
+ jsii<2.0.0,>=1.109.0
6
+ publication>=0.0.3
7
+ typeguard<4.3.0,>=2.13.3
@@ -1,7 +0,0 @@
1
- aws-cdk-lib<3.0.0,>=2.177.0
2
- aws-solutions-constructs.core==2.77.0
3
- aws-solutions-constructs.resources==2.77.0
4
- constructs<11.0.0,>=10.0.0
5
- jsii<2.0.0,>=1.106.0
6
- publication>=0.0.3
7
- typeguard<4.3.0,>=2.13.3