aws-solutions-constructs.aws-lambda-translate 2.96.0__py3-none-any.whl

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.
@@ -0,0 +1,709 @@
1
+ r'''
2
+ # aws-lambda-translate module
3
+
4
+ <!--BEGIN STABILITY BANNER-->---
5
+
6
+
7
+ ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
8
+
9
+ ---
10
+ <!--END STABILITY BANNER-->
11
+
12
+ | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
13
+ |:-------------|:-------------|
14
+
15
+ <div style="height:8px"></div>
16
+
17
+ | Language | Package |
18
+ |:---------|---------|
19
+ |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_translate`|
20
+ |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-translate`|
21
+ |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdatranslate`|
22
+
23
+ ## Overview
24
+
25
+ This AWS Solutions Construct implements an AWS Lambda function connected to Amazon Translate service. For asynchronous translation jobs, the construct can optionally create source and destination S3 buckets with appropriate IAM permissions for the Lambda function to interact with both buckets and Amazon Translate service.
26
+
27
+ For full documentation, see the [README.adoc](README.adoc) file.
28
+
29
+ ---
30
+
31
+
32
+ © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
+ '''
34
+ from pkgutil import extend_path
35
+ __path__ = extend_path(__path__, __name__)
36
+
37
+ import abc
38
+ import builtins
39
+ import datetime
40
+ import enum
41
+ import typing
42
+
43
+ import jsii
44
+ import publication
45
+ import typing_extensions
46
+
47
+ import typeguard
48
+ from importlib.metadata import version as _metadata_package_version
49
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
50
+
51
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
52
+ if TYPEGUARD_MAJOR_VERSION <= 2:
53
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
54
+ else:
55
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
56
+ pass
57
+ else:
58
+ if TYPEGUARD_MAJOR_VERSION == 3:
59
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
60
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
61
+ else:
62
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
63
+
64
+ from ._jsii import *
65
+
66
+ import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
67
+ import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
68
+ import aws_cdk.aws_s3 as _aws_cdk_aws_s3_ceddda9d
69
+ import constructs as _constructs_77d1e7e8
70
+
71
+
72
+ @jsii.data_type(
73
+ jsii_type="@aws-solutions-constructs/aws-lambda-translate.EnvironmentVariableDefinition",
74
+ jsii_struct_bases=[],
75
+ name_mapping={
76
+ "default_name": "defaultName",
77
+ "value": "value",
78
+ "client_name_override": "clientNameOverride",
79
+ },
80
+ )
81
+ class EnvironmentVariableDefinition:
82
+ def __init__(
83
+ self,
84
+ *,
85
+ default_name: builtins.str,
86
+ value: builtins.str,
87
+ client_name_override: typing.Optional[builtins.str] = None,
88
+ ) -> None:
89
+ '''
90
+ :param default_name: -
91
+ :param value: -
92
+ :param client_name_override: -
93
+ '''
94
+ if __debug__:
95
+ type_hints = typing.get_type_hints(_typecheckingstub__dc5a40d076159233aade7b920615f7e0bce19512833c729b9fc0c54d3cbd0f53)
96
+ check_type(argname="argument default_name", value=default_name, expected_type=type_hints["default_name"])
97
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
98
+ check_type(argname="argument client_name_override", value=client_name_override, expected_type=type_hints["client_name_override"])
99
+ self._values: typing.Dict[builtins.str, typing.Any] = {
100
+ "default_name": default_name,
101
+ "value": value,
102
+ }
103
+ if client_name_override is not None:
104
+ self._values["client_name_override"] = client_name_override
105
+
106
+ @builtins.property
107
+ def default_name(self) -> builtins.str:
108
+ result = self._values.get("default_name")
109
+ assert result is not None, "Required property 'default_name' is missing"
110
+ return typing.cast(builtins.str, result)
111
+
112
+ @builtins.property
113
+ def value(self) -> builtins.str:
114
+ result = self._values.get("value")
115
+ assert result is not None, "Required property 'value' is missing"
116
+ return typing.cast(builtins.str, result)
117
+
118
+ @builtins.property
119
+ def client_name_override(self) -> typing.Optional[builtins.str]:
120
+ result = self._values.get("client_name_override")
121
+ return typing.cast(typing.Optional[builtins.str], result)
122
+
123
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
124
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
125
+
126
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
127
+ return not (rhs == self)
128
+
129
+ def __repr__(self) -> str:
130
+ return "EnvironmentVariableDefinition(%s)" % ", ".join(
131
+ k + "=" + repr(v) for k, v in self._values.items()
132
+ )
133
+
134
+
135
+ class LambdaToTranslate(
136
+ _constructs_77d1e7e8.Construct,
137
+ metaclass=jsii.JSIIMeta,
138
+ jsii_type="@aws-solutions-constructs/aws-lambda-translate.LambdaToTranslate",
139
+ ):
140
+ '''
141
+ :summary: The LambdaToTranslate class.
142
+ '''
143
+
144
+ def __init__(
145
+ self,
146
+ scope: _constructs_77d1e7e8.Construct,
147
+ id: builtins.str,
148
+ *,
149
+ additional_permissions: typing.Optional[typing.Sequence[builtins.str]] = None,
150
+ async_jobs: typing.Optional[builtins.bool] = None,
151
+ data_access_role_arn_environment_variable_name: typing.Optional[builtins.str] = None,
152
+ deploy_vpc: typing.Optional[builtins.bool] = None,
153
+ destination_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
154
+ destination_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
155
+ destination_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
156
+ existing_destination_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
157
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
158
+ existing_source_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
159
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
160
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
161
+ log_destination_s3_access_logs: typing.Optional[builtins.bool] = None,
162
+ log_source_s3_access_logs: typing.Optional[builtins.bool] = None,
163
+ source_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
164
+ source_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
165
+ source_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
166
+ use_same_bucket: typing.Optional[builtins.bool] = None,
167
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
168
+ ) -> None:
169
+ '''
170
+ :param scope: - represents the scope for all the resources.
171
+ :param id: - this is a a scope-unique id.
172
+ :param additional_permissions: Optional array of additional IAM permissions to grant to the Lambda function for Amazon Translate. Default: - ['translate:TranslateText', 'translate:TranslateDocument']
173
+ :param async_jobs: Whether to enable asynchronous translation jobs. When true, source and destination S3 buckets will be created and the Lambda function will be granted permissions to start and stop translation jobs. Default: - false
174
+ :param data_access_role_arn_environment_variable_name: Optional Name for the role to pass to Batch translate jobs. Only set if asyncJobs is true Default: - DATA_ACCESS_ROLE_ARN
175
+ :param deploy_vpc: Whether to deploy a new VPC. Default: - false
176
+ :param destination_bucket_environment_variable_name: Optional Name for the Lambda function environment variable set to the name of the destination bucket. Only valid when asyncJobs is true. Default: - DESTINATION_BUCKET_NAME
177
+ :param destination_bucket_props: Optional user provided props to override the default props for the destination S3 Bucket. Only valid when asyncJobs is true. Default: - Default props are used
178
+ :param destination_logging_bucket_props: Optional user provided props to override the default props for the destination S3 Logging Bucket. Only valid when asyncJobs is true. Default: - Default props are used
179
+ :param existing_destination_bucket_obj: Existing instance of S3 Bucket object for translation results, providing both this and ``destinationBucketProps`` will cause an error. Only valid when asyncJobs is true. Default: - None
180
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
181
+ :param existing_source_bucket_obj: Existing instance of S3 Bucket object for source files, providing both this and ``sourceBucketProps`` will cause an error. Only valid when asyncJobs is true. Default: - None
182
+ :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case).
183
+ :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default properties are used.
184
+ :param log_destination_s3_access_logs: Whether to turn on Access Logs for the destination S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Only valid when asyncJobs is true. Default: - true
185
+ :param log_source_s3_access_logs: Whether to turn on Access Logs for the source S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Only valid when asyncJobs is true. Default: - true
186
+ :param source_bucket_environment_variable_name: Optional Name for the Lambda function environment variable set to the name of the source bucket. Only valid when asyncJobs is true. Default: - SOURCE_BUCKET_NAME
187
+ :param source_bucket_props: Optional user provided props to override the default props for the source S3 Bucket. Only valid when asyncJobs is true. Default: - Default props are used
188
+ :param source_logging_bucket_props: Optional user provided props to override the default props for the source S3 Logging Bucket. Only valid when asyncJobs is true. Default: - Default props are used
189
+ :param use_same_bucket: Whether to use the same S3 bucket for both source and destination files. When true, only the source bucket will be created and used for both purposes. Only valid when asyncJobs is true. Default: - false
190
+ :param vpc_props: Properties to override default properties if deployVpc is true.
191
+
192
+ :access: public
193
+ :summary: Constructs a new instance of the LambdaToTranslate class.
194
+ '''
195
+ if __debug__:
196
+ type_hints = typing.get_type_hints(_typecheckingstub__ff2b7e413dbe2f595e0e589c92c275ff183790ccc23a5dd58d64b056e50a8304)
197
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
198
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
199
+ props = LambdaToTranslateProps(
200
+ additional_permissions=additional_permissions,
201
+ async_jobs=async_jobs,
202
+ data_access_role_arn_environment_variable_name=data_access_role_arn_environment_variable_name,
203
+ deploy_vpc=deploy_vpc,
204
+ destination_bucket_environment_variable_name=destination_bucket_environment_variable_name,
205
+ destination_bucket_props=destination_bucket_props,
206
+ destination_logging_bucket_props=destination_logging_bucket_props,
207
+ existing_destination_bucket_obj=existing_destination_bucket_obj,
208
+ existing_lambda_obj=existing_lambda_obj,
209
+ existing_source_bucket_obj=existing_source_bucket_obj,
210
+ existing_vpc=existing_vpc,
211
+ lambda_function_props=lambda_function_props,
212
+ log_destination_s3_access_logs=log_destination_s3_access_logs,
213
+ log_source_s3_access_logs=log_source_s3_access_logs,
214
+ source_bucket_environment_variable_name=source_bucket_environment_variable_name,
215
+ source_bucket_props=source_bucket_props,
216
+ source_logging_bucket_props=source_logging_bucket_props,
217
+ use_same_bucket=use_same_bucket,
218
+ vpc_props=vpc_props,
219
+ )
220
+
221
+ jsii.create(self.__class__, self, [scope, id, props])
222
+
223
+ @builtins.property
224
+ @jsii.member(jsii_name="lambdaFunction")
225
+ def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
226
+ return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
227
+
228
+ @builtins.property
229
+ @jsii.member(jsii_name="destinationBucket")
230
+ def destination_bucket(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
231
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "destinationBucket"))
232
+
233
+ @builtins.property
234
+ @jsii.member(jsii_name="destinationBucketInterface")
235
+ def destination_bucket_interface(
236
+ self,
237
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket]:
238
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket], jsii.get(self, "destinationBucketInterface"))
239
+
240
+ @builtins.property
241
+ @jsii.member(jsii_name="destinationLoggingBucket")
242
+ def destination_logging_bucket(
243
+ self,
244
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
245
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "destinationLoggingBucket"))
246
+
247
+ @builtins.property
248
+ @jsii.member(jsii_name="sourceBucket")
249
+ def source_bucket(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
250
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "sourceBucket"))
251
+
252
+ @builtins.property
253
+ @jsii.member(jsii_name="sourceBucketInterface")
254
+ def source_bucket_interface(
255
+ self,
256
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket]:
257
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket], jsii.get(self, "sourceBucketInterface"))
258
+
259
+ @builtins.property
260
+ @jsii.member(jsii_name="sourceLoggingBucket")
261
+ def source_logging_bucket(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
262
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "sourceLoggingBucket"))
263
+
264
+ @builtins.property
265
+ @jsii.member(jsii_name="vpc")
266
+ def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
267
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], jsii.get(self, "vpc"))
268
+
269
+
270
+ @jsii.data_type(
271
+ jsii_type="@aws-solutions-constructs/aws-lambda-translate.LambdaToTranslateProps",
272
+ jsii_struct_bases=[],
273
+ name_mapping={
274
+ "additional_permissions": "additionalPermissions",
275
+ "async_jobs": "asyncJobs",
276
+ "data_access_role_arn_environment_variable_name": "dataAccessRoleArnEnvironmentVariableName",
277
+ "deploy_vpc": "deployVpc",
278
+ "destination_bucket_environment_variable_name": "destinationBucketEnvironmentVariableName",
279
+ "destination_bucket_props": "destinationBucketProps",
280
+ "destination_logging_bucket_props": "destinationLoggingBucketProps",
281
+ "existing_destination_bucket_obj": "existingDestinationBucketObj",
282
+ "existing_lambda_obj": "existingLambdaObj",
283
+ "existing_source_bucket_obj": "existingSourceBucketObj",
284
+ "existing_vpc": "existingVpc",
285
+ "lambda_function_props": "lambdaFunctionProps",
286
+ "log_destination_s3_access_logs": "logDestinationS3AccessLogs",
287
+ "log_source_s3_access_logs": "logSourceS3AccessLogs",
288
+ "source_bucket_environment_variable_name": "sourceBucketEnvironmentVariableName",
289
+ "source_bucket_props": "sourceBucketProps",
290
+ "source_logging_bucket_props": "sourceLoggingBucketProps",
291
+ "use_same_bucket": "useSameBucket",
292
+ "vpc_props": "vpcProps",
293
+ },
294
+ )
295
+ class LambdaToTranslateProps:
296
+ def __init__(
297
+ self,
298
+ *,
299
+ additional_permissions: typing.Optional[typing.Sequence[builtins.str]] = None,
300
+ async_jobs: typing.Optional[builtins.bool] = None,
301
+ data_access_role_arn_environment_variable_name: typing.Optional[builtins.str] = None,
302
+ deploy_vpc: typing.Optional[builtins.bool] = None,
303
+ destination_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
304
+ destination_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
305
+ destination_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
306
+ existing_destination_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
307
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
308
+ existing_source_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
309
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
310
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
311
+ log_destination_s3_access_logs: typing.Optional[builtins.bool] = None,
312
+ log_source_s3_access_logs: typing.Optional[builtins.bool] = None,
313
+ source_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
314
+ source_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
315
+ source_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
316
+ use_same_bucket: typing.Optional[builtins.bool] = None,
317
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
318
+ ) -> None:
319
+ '''
320
+ :param additional_permissions: Optional array of additional IAM permissions to grant to the Lambda function for Amazon Translate. Default: - ['translate:TranslateText', 'translate:TranslateDocument']
321
+ :param async_jobs: Whether to enable asynchronous translation jobs. When true, source and destination S3 buckets will be created and the Lambda function will be granted permissions to start and stop translation jobs. Default: - false
322
+ :param data_access_role_arn_environment_variable_name: Optional Name for the role to pass to Batch translate jobs. Only set if asyncJobs is true Default: - DATA_ACCESS_ROLE_ARN
323
+ :param deploy_vpc: Whether to deploy a new VPC. Default: - false
324
+ :param destination_bucket_environment_variable_name: Optional Name for the Lambda function environment variable set to the name of the destination bucket. Only valid when asyncJobs is true. Default: - DESTINATION_BUCKET_NAME
325
+ :param destination_bucket_props: Optional user provided props to override the default props for the destination S3 Bucket. Only valid when asyncJobs is true. Default: - Default props are used
326
+ :param destination_logging_bucket_props: Optional user provided props to override the default props for the destination S3 Logging Bucket. Only valid when asyncJobs is true. Default: - Default props are used
327
+ :param existing_destination_bucket_obj: Existing instance of S3 Bucket object for translation results, providing both this and ``destinationBucketProps`` will cause an error. Only valid when asyncJobs is true. Default: - None
328
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
329
+ :param existing_source_bucket_obj: Existing instance of S3 Bucket object for source files, providing both this and ``sourceBucketProps`` will cause an error. Only valid when asyncJobs is true. Default: - None
330
+ :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case).
331
+ :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default properties are used.
332
+ :param log_destination_s3_access_logs: Whether to turn on Access Logs for the destination S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Only valid when asyncJobs is true. Default: - true
333
+ :param log_source_s3_access_logs: Whether to turn on Access Logs for the source S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Only valid when asyncJobs is true. Default: - true
334
+ :param source_bucket_environment_variable_name: Optional Name for the Lambda function environment variable set to the name of the source bucket. Only valid when asyncJobs is true. Default: - SOURCE_BUCKET_NAME
335
+ :param source_bucket_props: Optional user provided props to override the default props for the source S3 Bucket. Only valid when asyncJobs is true. Default: - Default props are used
336
+ :param source_logging_bucket_props: Optional user provided props to override the default props for the source S3 Logging Bucket. Only valid when asyncJobs is true. Default: - Default props are used
337
+ :param use_same_bucket: Whether to use the same S3 bucket for both source and destination files. When true, only the source bucket will be created and used for both purposes. Only valid when asyncJobs is true. Default: - false
338
+ :param vpc_props: Properties to override default properties if deployVpc is true.
339
+
340
+ :summary: The properties for the LambdaToTranslate class.
341
+ '''
342
+ if isinstance(destination_bucket_props, dict):
343
+ destination_bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**destination_bucket_props)
344
+ if isinstance(destination_logging_bucket_props, dict):
345
+ destination_logging_bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**destination_logging_bucket_props)
346
+ if isinstance(lambda_function_props, dict):
347
+ lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
348
+ if isinstance(source_bucket_props, dict):
349
+ source_bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**source_bucket_props)
350
+ if isinstance(source_logging_bucket_props, dict):
351
+ source_logging_bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**source_logging_bucket_props)
352
+ if isinstance(vpc_props, dict):
353
+ vpc_props = _aws_cdk_aws_ec2_ceddda9d.VpcProps(**vpc_props)
354
+ if __debug__:
355
+ type_hints = typing.get_type_hints(_typecheckingstub__d794e98bbaa9ed3fefea9ba9e3b6b743e2531613a7d37bca86f4df7e9b6111c6)
356
+ check_type(argname="argument additional_permissions", value=additional_permissions, expected_type=type_hints["additional_permissions"])
357
+ check_type(argname="argument async_jobs", value=async_jobs, expected_type=type_hints["async_jobs"])
358
+ check_type(argname="argument data_access_role_arn_environment_variable_name", value=data_access_role_arn_environment_variable_name, expected_type=type_hints["data_access_role_arn_environment_variable_name"])
359
+ check_type(argname="argument deploy_vpc", value=deploy_vpc, expected_type=type_hints["deploy_vpc"])
360
+ check_type(argname="argument destination_bucket_environment_variable_name", value=destination_bucket_environment_variable_name, expected_type=type_hints["destination_bucket_environment_variable_name"])
361
+ check_type(argname="argument destination_bucket_props", value=destination_bucket_props, expected_type=type_hints["destination_bucket_props"])
362
+ check_type(argname="argument destination_logging_bucket_props", value=destination_logging_bucket_props, expected_type=type_hints["destination_logging_bucket_props"])
363
+ check_type(argname="argument existing_destination_bucket_obj", value=existing_destination_bucket_obj, expected_type=type_hints["existing_destination_bucket_obj"])
364
+ check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
365
+ check_type(argname="argument existing_source_bucket_obj", value=existing_source_bucket_obj, expected_type=type_hints["existing_source_bucket_obj"])
366
+ check_type(argname="argument existing_vpc", value=existing_vpc, expected_type=type_hints["existing_vpc"])
367
+ check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
368
+ check_type(argname="argument log_destination_s3_access_logs", value=log_destination_s3_access_logs, expected_type=type_hints["log_destination_s3_access_logs"])
369
+ check_type(argname="argument log_source_s3_access_logs", value=log_source_s3_access_logs, expected_type=type_hints["log_source_s3_access_logs"])
370
+ check_type(argname="argument source_bucket_environment_variable_name", value=source_bucket_environment_variable_name, expected_type=type_hints["source_bucket_environment_variable_name"])
371
+ check_type(argname="argument source_bucket_props", value=source_bucket_props, expected_type=type_hints["source_bucket_props"])
372
+ check_type(argname="argument source_logging_bucket_props", value=source_logging_bucket_props, expected_type=type_hints["source_logging_bucket_props"])
373
+ check_type(argname="argument use_same_bucket", value=use_same_bucket, expected_type=type_hints["use_same_bucket"])
374
+ check_type(argname="argument vpc_props", value=vpc_props, expected_type=type_hints["vpc_props"])
375
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
376
+ if additional_permissions is not None:
377
+ self._values["additional_permissions"] = additional_permissions
378
+ if async_jobs is not None:
379
+ self._values["async_jobs"] = async_jobs
380
+ if data_access_role_arn_environment_variable_name is not None:
381
+ self._values["data_access_role_arn_environment_variable_name"] = data_access_role_arn_environment_variable_name
382
+ if deploy_vpc is not None:
383
+ self._values["deploy_vpc"] = deploy_vpc
384
+ if destination_bucket_environment_variable_name is not None:
385
+ self._values["destination_bucket_environment_variable_name"] = destination_bucket_environment_variable_name
386
+ if destination_bucket_props is not None:
387
+ self._values["destination_bucket_props"] = destination_bucket_props
388
+ if destination_logging_bucket_props is not None:
389
+ self._values["destination_logging_bucket_props"] = destination_logging_bucket_props
390
+ if existing_destination_bucket_obj is not None:
391
+ self._values["existing_destination_bucket_obj"] = existing_destination_bucket_obj
392
+ if existing_lambda_obj is not None:
393
+ self._values["existing_lambda_obj"] = existing_lambda_obj
394
+ if existing_source_bucket_obj is not None:
395
+ self._values["existing_source_bucket_obj"] = existing_source_bucket_obj
396
+ if existing_vpc is not None:
397
+ self._values["existing_vpc"] = existing_vpc
398
+ if lambda_function_props is not None:
399
+ self._values["lambda_function_props"] = lambda_function_props
400
+ if log_destination_s3_access_logs is not None:
401
+ self._values["log_destination_s3_access_logs"] = log_destination_s3_access_logs
402
+ if log_source_s3_access_logs is not None:
403
+ self._values["log_source_s3_access_logs"] = log_source_s3_access_logs
404
+ if source_bucket_environment_variable_name is not None:
405
+ self._values["source_bucket_environment_variable_name"] = source_bucket_environment_variable_name
406
+ if source_bucket_props is not None:
407
+ self._values["source_bucket_props"] = source_bucket_props
408
+ if source_logging_bucket_props is not None:
409
+ self._values["source_logging_bucket_props"] = source_logging_bucket_props
410
+ if use_same_bucket is not None:
411
+ self._values["use_same_bucket"] = use_same_bucket
412
+ if vpc_props is not None:
413
+ self._values["vpc_props"] = vpc_props
414
+
415
+ @builtins.property
416
+ def additional_permissions(self) -> typing.Optional[typing.List[builtins.str]]:
417
+ '''Optional array of additional IAM permissions to grant to the Lambda function for Amazon Translate.
418
+
419
+ :default: - ['translate:TranslateText', 'translate:TranslateDocument']
420
+ '''
421
+ result = self._values.get("additional_permissions")
422
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
423
+
424
+ @builtins.property
425
+ def async_jobs(self) -> typing.Optional[builtins.bool]:
426
+ '''Whether to enable asynchronous translation jobs.
427
+
428
+ When true, source and destination S3 buckets will be created and the Lambda function
429
+ will be granted permissions to start and stop translation jobs.
430
+
431
+ :default: - false
432
+ '''
433
+ result = self._values.get("async_jobs")
434
+ return typing.cast(typing.Optional[builtins.bool], result)
435
+
436
+ @builtins.property
437
+ def data_access_role_arn_environment_variable_name(
438
+ self,
439
+ ) -> typing.Optional[builtins.str]:
440
+ '''Optional Name for the role to pass to Batch translate jobs.
441
+
442
+ Only set if asyncJobs is true
443
+
444
+ :default: - DATA_ACCESS_ROLE_ARN
445
+ '''
446
+ result = self._values.get("data_access_role_arn_environment_variable_name")
447
+ return typing.cast(typing.Optional[builtins.str], result)
448
+
449
+ @builtins.property
450
+ def deploy_vpc(self) -> typing.Optional[builtins.bool]:
451
+ '''Whether to deploy a new VPC.
452
+
453
+ :default: - false
454
+ '''
455
+ result = self._values.get("deploy_vpc")
456
+ return typing.cast(typing.Optional[builtins.bool], result)
457
+
458
+ @builtins.property
459
+ def destination_bucket_environment_variable_name(
460
+ self,
461
+ ) -> typing.Optional[builtins.str]:
462
+ '''Optional Name for the Lambda function environment variable set to the name of the destination bucket.
463
+
464
+ Only valid when asyncJobs is true.
465
+
466
+ :default: - DESTINATION_BUCKET_NAME
467
+ '''
468
+ result = self._values.get("destination_bucket_environment_variable_name")
469
+ return typing.cast(typing.Optional[builtins.str], result)
470
+
471
+ @builtins.property
472
+ def destination_bucket_props(
473
+ self,
474
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
475
+ '''Optional user provided props to override the default props for the destination S3 Bucket.
476
+
477
+ Only valid when asyncJobs is true.
478
+
479
+ :default: - Default props are used
480
+ '''
481
+ result = self._values.get("destination_bucket_props")
482
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
483
+
484
+ @builtins.property
485
+ def destination_logging_bucket_props(
486
+ self,
487
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
488
+ '''Optional user provided props to override the default props for the destination S3 Logging Bucket.
489
+
490
+ Only valid when asyncJobs is true.
491
+
492
+ :default: - Default props are used
493
+ '''
494
+ result = self._values.get("destination_logging_bucket_props")
495
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
496
+
497
+ @builtins.property
498
+ def existing_destination_bucket_obj(
499
+ self,
500
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket]:
501
+ '''Existing instance of S3 Bucket object for translation results, providing both this and ``destinationBucketProps`` will cause an error.
502
+
503
+ Only valid when asyncJobs is true.
504
+
505
+ :default: - None
506
+ '''
507
+ result = self._values.get("existing_destination_bucket_obj")
508
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket], result)
509
+
510
+ @builtins.property
511
+ def existing_lambda_obj(
512
+ self,
513
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
514
+ '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
515
+
516
+ :default: - None
517
+ '''
518
+ result = self._values.get("existing_lambda_obj")
519
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
520
+
521
+ @builtins.property
522
+ def existing_source_bucket_obj(
523
+ self,
524
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket]:
525
+ '''Existing instance of S3 Bucket object for source files, providing both this and ``sourceBucketProps`` will cause an error.
526
+
527
+ Only valid when asyncJobs is true.
528
+
529
+ :default: - None
530
+ '''
531
+ result = self._values.get("existing_source_bucket_obj")
532
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket], result)
533
+
534
+ @builtins.property
535
+ def existing_vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
536
+ '''An existing VPC for the construct to use (construct will NOT create a new VPC in this case).'''
537
+ result = self._values.get("existing_vpc")
538
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
539
+
540
+ @builtins.property
541
+ def lambda_function_props(
542
+ self,
543
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
544
+ '''Optional user provided props to override the default props for the Lambda function.
545
+
546
+ :default: - Default properties are used.
547
+ '''
548
+ result = self._values.get("lambda_function_props")
549
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
550
+
551
+ @builtins.property
552
+ def log_destination_s3_access_logs(self) -> typing.Optional[builtins.bool]:
553
+ '''Whether to turn on Access Logs for the destination S3 bucket with the associated storage costs.
554
+
555
+ Enabling Access Logging is a best practice.
556
+ Only valid when asyncJobs is true.
557
+
558
+ :default: - true
559
+ '''
560
+ result = self._values.get("log_destination_s3_access_logs")
561
+ return typing.cast(typing.Optional[builtins.bool], result)
562
+
563
+ @builtins.property
564
+ def log_source_s3_access_logs(self) -> typing.Optional[builtins.bool]:
565
+ '''Whether to turn on Access Logs for the source S3 bucket with the associated storage costs.
566
+
567
+ Enabling Access Logging is a best practice.
568
+ Only valid when asyncJobs is true.
569
+
570
+ :default: - true
571
+ '''
572
+ result = self._values.get("log_source_s3_access_logs")
573
+ return typing.cast(typing.Optional[builtins.bool], result)
574
+
575
+ @builtins.property
576
+ def source_bucket_environment_variable_name(self) -> typing.Optional[builtins.str]:
577
+ '''Optional Name for the Lambda function environment variable set to the name of the source bucket.
578
+
579
+ Only valid when asyncJobs is true.
580
+
581
+ :default: - SOURCE_BUCKET_NAME
582
+ '''
583
+ result = self._values.get("source_bucket_environment_variable_name")
584
+ return typing.cast(typing.Optional[builtins.str], result)
585
+
586
+ @builtins.property
587
+ def source_bucket_props(
588
+ self,
589
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
590
+ '''Optional user provided props to override the default props for the source S3 Bucket.
591
+
592
+ Only valid when asyncJobs is true.
593
+
594
+ :default: - Default props are used
595
+ '''
596
+ result = self._values.get("source_bucket_props")
597
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
598
+
599
+ @builtins.property
600
+ def source_logging_bucket_props(
601
+ self,
602
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
603
+ '''Optional user provided props to override the default props for the source S3 Logging Bucket.
604
+
605
+ Only valid when asyncJobs is true.
606
+
607
+ :default: - Default props are used
608
+ '''
609
+ result = self._values.get("source_logging_bucket_props")
610
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
611
+
612
+ @builtins.property
613
+ def use_same_bucket(self) -> typing.Optional[builtins.bool]:
614
+ '''Whether to use the same S3 bucket for both source and destination files.
615
+
616
+ When true, only the source bucket will be created and used
617
+ for both purposes. Only valid when asyncJobs is true.
618
+
619
+ :default: - false
620
+ '''
621
+ result = self._values.get("use_same_bucket")
622
+ return typing.cast(typing.Optional[builtins.bool], result)
623
+
624
+ @builtins.property
625
+ def vpc_props(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.VpcProps]:
626
+ '''Properties to override default properties if deployVpc is true.'''
627
+ result = self._values.get("vpc_props")
628
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.VpcProps], result)
629
+
630
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
631
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
632
+
633
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
634
+ return not (rhs == self)
635
+
636
+ def __repr__(self) -> str:
637
+ return "LambdaToTranslateProps(%s)" % ", ".join(
638
+ k + "=" + repr(v) for k, v in self._values.items()
639
+ )
640
+
641
+
642
+ __all__ = [
643
+ "EnvironmentVariableDefinition",
644
+ "LambdaToTranslate",
645
+ "LambdaToTranslateProps",
646
+ ]
647
+
648
+ publication.publish()
649
+
650
+ def _typecheckingstub__dc5a40d076159233aade7b920615f7e0bce19512833c729b9fc0c54d3cbd0f53(
651
+ *,
652
+ default_name: builtins.str,
653
+ value: builtins.str,
654
+ client_name_override: typing.Optional[builtins.str] = None,
655
+ ) -> None:
656
+ """Type checking stubs"""
657
+ pass
658
+
659
+ def _typecheckingstub__ff2b7e413dbe2f595e0e589c92c275ff183790ccc23a5dd58d64b056e50a8304(
660
+ scope: _constructs_77d1e7e8.Construct,
661
+ id: builtins.str,
662
+ *,
663
+ additional_permissions: typing.Optional[typing.Sequence[builtins.str]] = None,
664
+ async_jobs: typing.Optional[builtins.bool] = None,
665
+ data_access_role_arn_environment_variable_name: typing.Optional[builtins.str] = None,
666
+ deploy_vpc: typing.Optional[builtins.bool] = None,
667
+ destination_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
668
+ destination_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
669
+ destination_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
670
+ existing_destination_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
671
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
672
+ existing_source_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
673
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
674
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
675
+ log_destination_s3_access_logs: typing.Optional[builtins.bool] = None,
676
+ log_source_s3_access_logs: typing.Optional[builtins.bool] = None,
677
+ source_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
678
+ source_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
679
+ source_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
680
+ use_same_bucket: typing.Optional[builtins.bool] = None,
681
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
682
+ ) -> None:
683
+ """Type checking stubs"""
684
+ pass
685
+
686
+ def _typecheckingstub__d794e98bbaa9ed3fefea9ba9e3b6b743e2531613a7d37bca86f4df7e9b6111c6(
687
+ *,
688
+ additional_permissions: typing.Optional[typing.Sequence[builtins.str]] = None,
689
+ async_jobs: typing.Optional[builtins.bool] = None,
690
+ data_access_role_arn_environment_variable_name: typing.Optional[builtins.str] = None,
691
+ deploy_vpc: typing.Optional[builtins.bool] = None,
692
+ destination_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
693
+ destination_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
694
+ destination_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
695
+ existing_destination_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
696
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
697
+ existing_source_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.IBucket] = None,
698
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
699
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
700
+ log_destination_s3_access_logs: typing.Optional[builtins.bool] = None,
701
+ log_source_s3_access_logs: typing.Optional[builtins.bool] = None,
702
+ source_bucket_environment_variable_name: typing.Optional[builtins.str] = None,
703
+ source_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
704
+ source_logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
705
+ use_same_bucket: typing.Optional[builtins.bool] = None,
706
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
707
+ ) -> None:
708
+ """Type checking stubs"""
709
+ pass
@@ -0,0 +1,46 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
4
+ import abc
5
+ import builtins
6
+ import datetime
7
+ import enum
8
+ import typing
9
+
10
+ import jsii
11
+ import publication
12
+ import typing_extensions
13
+
14
+ import typeguard
15
+ from importlib.metadata import version as _metadata_package_version
16
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
17
+
18
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
19
+ if TYPEGUARD_MAJOR_VERSION <= 2:
20
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
21
+ else:
22
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
23
+ pass
24
+ else:
25
+ if TYPEGUARD_MAJOR_VERSION == 3:
26
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
27
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
28
+ else:
29
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
30
+
31
+ import aws_cdk._jsii
32
+ import aws_solutions_constructs.core._jsii
33
+ import constructs._jsii
34
+
35
+ __jsii_assembly__ = jsii.JSIIAssembly.load(
36
+ "@aws-solutions-constructs/aws-lambda-translate",
37
+ "2.96.0",
38
+ __name__[0:-6],
39
+ "aws-lambda-translate@2.96.0.jsii.tgz",
40
+ )
41
+
42
+ __all__ = [
43
+ "__jsii_assembly__",
44
+ ]
45
+
46
+ publication.publish()
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-translate
3
+ Version: 2.96.0
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and Amazon Translate with optional S3 buckets.
5
+ Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
+ Author: Amazon Web Services
7
+ License: Apache-2.0
8
+ Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Typing :: Typed
17
+ Classifier: License :: OSI Approved
18
+ Requires-Python: ~=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: aws-cdk-lib <3.0.0,>=2.223.0
22
+ Requires-Dist: aws-solutions-constructs.core ==2.96.0
23
+ Requires-Dist: constructs <11.0.0,>=10.0.0
24
+ Requires-Dist: jsii <2.0.0,>=1.119.0
25
+ Requires-Dist: publication >=0.0.3
26
+ Requires-Dist: typeguard <4.3.0,>=2.13.3
27
+
28
+ # aws-lambda-translate module
29
+
30
+ <!--BEGIN STABILITY BANNER-->---
31
+
32
+
33
+ ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
34
+
35
+ ---
36
+ <!--END STABILITY BANNER-->
37
+
38
+ | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
39
+ |:-------------|:-------------|
40
+
41
+ <div style="height:8px"></div>
42
+
43
+ | Language | Package |
44
+ |:---------|---------|
45
+ |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_translate`|
46
+ |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-translate`|
47
+ |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdatranslate`|
48
+
49
+ ## Overview
50
+
51
+ This AWS Solutions Construct implements an AWS Lambda function connected to Amazon Translate service. For asynchronous translation jobs, the construct can optionally create source and destination S3 buckets with appropriate IAM permissions for the Lambda function to interact with both buckets and Amazon Translate service.
52
+
53
+ For full documentation, see the [README.adoc](README.adoc) file.
54
+
55
+ ---
56
+
57
+
58
+ © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -0,0 +1,9 @@
1
+ aws_solutions_constructs/aws_lambda_translate/__init__.py,sha256=oNNuP1nC9EbzJeyF20CpvdtAn3Zj0LQ9A337kv0hpmc,42465
2
+ aws_solutions_constructs/aws_lambda_translate/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ aws_solutions_constructs/aws_lambda_translate/_jsii/__init__.py,sha256=yLi02aHZQNLSKeUwiXi1lg4tSORHw6zPEvTcJb9viYA,1535
4
+ aws_solutions_constructs/aws_lambda_translate/_jsii/aws-lambda-translate@2.96.0.jsii.tgz,sha256=Lx49oFUOpXW3K1aXRmTSEa-qgu_Xfdbvb5iEniPshUU,101208
5
+ aws_solutions_constructs_aws_lambda_translate-2.96.0.dist-info/LICENSE,sha256=wnT4A3LZDAEpNzcPDh8VCH0i4wjvmLJ86l3A0tCINmw,10279
6
+ aws_solutions_constructs_aws_lambda_translate-2.96.0.dist-info/METADATA,sha256=oqcZChTciWD9BDguW7ewdWEdt9N8nkfi5aE7LJwzEFI,2514
7
+ aws_solutions_constructs_aws_lambda_translate-2.96.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
+ aws_solutions_constructs_aws_lambda_translate-2.96.0.dist-info/top_level.txt,sha256=hi3us_KW7V1ocfOqVsNq1o3w552jCEgu_KsCckqYWsg,25
9
+ aws_solutions_constructs_aws_lambda_translate-2.96.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.3.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ aws_solutions_constructs