@layertwo/cdk-constructs 0.0.11 → 0.0.13
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.
- package/.jsii +246 -33
- package/API.md +611 -0
- package/README.md +30 -9
- package/lib/acm.js +1 -1
- package/lib/dynamodb.js +1 -1
- package/lib/iam.js +1 -1
- package/lib/lambda.d.ts +22 -1
- package/lib/lambda.js +66 -16
- package/lib/s3.js +1 -1
- package/lib/uv-bundling.d.ts +4 -1
- package/lib/uv-bundling.js +37 -13
- package/package.json +1 -1
- package/renovate.json5 +1 -1
package/API.md
CHANGED
|
@@ -4784,6 +4784,433 @@ Uniquely identifies this class.
|
|
|
4784
4784
|
|
|
4785
4785
|
---
|
|
4786
4786
|
|
|
4787
|
+
### UvLayer <a name="UvLayer" id="@layertwo/cdk-constructs.UvLayer"></a>
|
|
4788
|
+
|
|
4789
|
+
A Lambda layer that packages a uv project's dependencies under `/opt/python`.
|
|
4790
|
+
|
|
4791
|
+
#### Initializers <a name="Initializers" id="@layertwo/cdk-constructs.UvLayer.Initializer"></a>
|
|
4792
|
+
|
|
4793
|
+
```typescript
|
|
4794
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
4795
|
+
|
|
4796
|
+
new UvLayer(scope: Construct, id: string, props: UvLayerProps)
|
|
4797
|
+
```
|
|
4798
|
+
|
|
4799
|
+
| **Name** | **Type** | **Description** |
|
|
4800
|
+
| --- | --- | --- |
|
|
4801
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
4802
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
4803
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.Initializer.parameter.props">props</a></code> | <code><a href="#@layertwo/cdk-constructs.UvLayerProps">UvLayerProps</a></code> | *No description.* |
|
|
4804
|
+
|
|
4805
|
+
---
|
|
4806
|
+
|
|
4807
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@layertwo/cdk-constructs.UvLayer.Initializer.parameter.scope"></a>
|
|
4808
|
+
|
|
4809
|
+
- *Type:* constructs.Construct
|
|
4810
|
+
|
|
4811
|
+
---
|
|
4812
|
+
|
|
4813
|
+
##### `id`<sup>Required</sup> <a name="id" id="@layertwo/cdk-constructs.UvLayer.Initializer.parameter.id"></a>
|
|
4814
|
+
|
|
4815
|
+
- *Type:* string
|
|
4816
|
+
|
|
4817
|
+
---
|
|
4818
|
+
|
|
4819
|
+
##### `props`<sup>Required</sup> <a name="props" id="@layertwo/cdk-constructs.UvLayer.Initializer.parameter.props"></a>
|
|
4820
|
+
|
|
4821
|
+
- *Type:* <a href="#@layertwo/cdk-constructs.UvLayerProps">UvLayerProps</a>
|
|
4822
|
+
|
|
4823
|
+
---
|
|
4824
|
+
|
|
4825
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
4826
|
+
|
|
4827
|
+
| **Name** | **Description** |
|
|
4828
|
+
| --- | --- |
|
|
4829
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
4830
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.with">with</a></code> | Applies one or more mixins to this construct. |
|
|
4831
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.applyCrossStackReferenceStrength">applyCrossStackReferenceStrength</a></code> | Override the cross-stack reference strength for this resource. |
|
|
4832
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
|
|
4833
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.addPermission">addPermission</a></code> | Add permission for this layer version to specific entities. |
|
|
4834
|
+
|
|
4835
|
+
---
|
|
4836
|
+
|
|
4837
|
+
##### `toString` <a name="toString" id="@layertwo/cdk-constructs.UvLayer.toString"></a>
|
|
4838
|
+
|
|
4839
|
+
```typescript
|
|
4840
|
+
public toString(): string
|
|
4841
|
+
```
|
|
4842
|
+
|
|
4843
|
+
Returns a string representation of this construct.
|
|
4844
|
+
|
|
4845
|
+
##### `with` <a name="with" id="@layertwo/cdk-constructs.UvLayer.with"></a>
|
|
4846
|
+
|
|
4847
|
+
```typescript
|
|
4848
|
+
public with(mixins: ...IMixin[]): IConstruct
|
|
4849
|
+
```
|
|
4850
|
+
|
|
4851
|
+
Applies one or more mixins to this construct.
|
|
4852
|
+
|
|
4853
|
+
Mixins are applied in order. The list of constructs is captured at the
|
|
4854
|
+
start of the call, so constructs added by a mixin will not be visited.
|
|
4855
|
+
Use multiple `with()` calls if subsequent mixins should apply to added
|
|
4856
|
+
constructs.
|
|
4857
|
+
|
|
4858
|
+
###### `mixins`<sup>Required</sup> <a name="mixins" id="@layertwo/cdk-constructs.UvLayer.with.parameter.mixins"></a>
|
|
4859
|
+
|
|
4860
|
+
- *Type:* ...constructs.IMixin[]
|
|
4861
|
+
|
|
4862
|
+
---
|
|
4863
|
+
|
|
4864
|
+
##### `applyCrossStackReferenceStrength` <a name="applyCrossStackReferenceStrength" id="@layertwo/cdk-constructs.UvLayer.applyCrossStackReferenceStrength"></a>
|
|
4865
|
+
|
|
4866
|
+
```typescript
|
|
4867
|
+
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
|
|
4868
|
+
```
|
|
4869
|
+
|
|
4870
|
+
Override the cross-stack reference strength for this resource.
|
|
4871
|
+
|
|
4872
|
+
When set, any cross-stack reference to this resource will use the specified
|
|
4873
|
+
mechanism instead of the global default determined by the
|
|
4874
|
+
`@aws-cdk/core:defaultCrossStackReferences` context key. This is useful for
|
|
4875
|
+
selectively weakening specific references to avoid the "deadly embrace" problem
|
|
4876
|
+
without changing the app-wide default.
|
|
4877
|
+
|
|
4878
|
+
###### `strength`<sup>Required</sup> <a name="strength" id="@layertwo/cdk-constructs.UvLayer.applyCrossStackReferenceStrength.parameter.strength"></a>
|
|
4879
|
+
|
|
4880
|
+
- *Type:* aws-cdk-lib.ReferenceStrength
|
|
4881
|
+
|
|
4882
|
+
The reference strength to use for this resource.
|
|
4883
|
+
|
|
4884
|
+
---
|
|
4885
|
+
|
|
4886
|
+
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="@layertwo/cdk-constructs.UvLayer.applyRemovalPolicy"></a>
|
|
4887
|
+
|
|
4888
|
+
```typescript
|
|
4889
|
+
public applyRemovalPolicy(policy: RemovalPolicy): void
|
|
4890
|
+
```
|
|
4891
|
+
|
|
4892
|
+
Apply the given removal policy to this resource.
|
|
4893
|
+
|
|
4894
|
+
The Removal Policy controls what happens to this resource when it stops
|
|
4895
|
+
being managed by CloudFormation, either because you've removed it from the
|
|
4896
|
+
CDK application or because you've made a change that requires the resource
|
|
4897
|
+
to be replaced.
|
|
4898
|
+
|
|
4899
|
+
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
|
|
4900
|
+
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
|
|
4901
|
+
|
|
4902
|
+
###### `policy`<sup>Required</sup> <a name="policy" id="@layertwo/cdk-constructs.UvLayer.applyRemovalPolicy.parameter.policy"></a>
|
|
4903
|
+
|
|
4904
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
4905
|
+
|
|
4906
|
+
---
|
|
4907
|
+
|
|
4908
|
+
##### `addPermission` <a name="addPermission" id="@layertwo/cdk-constructs.UvLayer.addPermission"></a>
|
|
4909
|
+
|
|
4910
|
+
```typescript
|
|
4911
|
+
public addPermission(id: string, permission: LayerVersionPermission): void
|
|
4912
|
+
```
|
|
4913
|
+
|
|
4914
|
+
Add permission for this layer version to specific entities.
|
|
4915
|
+
|
|
4916
|
+
Usage within
|
|
4917
|
+
the same account where the layer is defined is always allowed and does not
|
|
4918
|
+
require calling this method. Note that the principal that creates the
|
|
4919
|
+
Lambda function using the layer (for example, a CloudFormation changeset
|
|
4920
|
+
execution role) also needs to have the ``lambda:GetLayerVersion``
|
|
4921
|
+
permission on the layer version.
|
|
4922
|
+
|
|
4923
|
+
###### `id`<sup>Required</sup> <a name="id" id="@layertwo/cdk-constructs.UvLayer.addPermission.parameter.id"></a>
|
|
4924
|
+
|
|
4925
|
+
- *Type:* string
|
|
4926
|
+
|
|
4927
|
+
---
|
|
4928
|
+
|
|
4929
|
+
###### `permission`<sup>Required</sup> <a name="permission" id="@layertwo/cdk-constructs.UvLayer.addPermission.parameter.permission"></a>
|
|
4930
|
+
|
|
4931
|
+
- *Type:* aws-cdk-lib.aws_lambda.LayerVersionPermission
|
|
4932
|
+
|
|
4933
|
+
---
|
|
4934
|
+
|
|
4935
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
4936
|
+
|
|
4937
|
+
| **Name** | **Description** |
|
|
4938
|
+
| --- | --- |
|
|
4939
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
4940
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.isOwnedResource">isOwnedResource</a></code> | Returns true if the construct was created by CDK, and false otherwise. |
|
|
4941
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.isResource">isResource</a></code> | Check whether the given construct is a Resource. |
|
|
4942
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.fromLayerVersionArn">fromLayerVersionArn</a></code> | Imports a layer version by ARN. |
|
|
4943
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.fromLayerVersionAttributes">fromLayerVersionAttributes</a></code> | Imports a Layer that has been defined externally. |
|
|
4944
|
+
|
|
4945
|
+
---
|
|
4946
|
+
|
|
4947
|
+
##### `isConstruct` <a name="isConstruct" id="@layertwo/cdk-constructs.UvLayer.isConstruct"></a>
|
|
4948
|
+
|
|
4949
|
+
```typescript
|
|
4950
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
4951
|
+
|
|
4952
|
+
UvLayer.isConstruct(x: any)
|
|
4953
|
+
```
|
|
4954
|
+
|
|
4955
|
+
Checks if `x` is a construct.
|
|
4956
|
+
|
|
4957
|
+
Use this method instead of `instanceof` to properly detect `Construct`
|
|
4958
|
+
instances, even when the construct library is symlinked.
|
|
4959
|
+
|
|
4960
|
+
Explanation: in JavaScript, multiple copies of the `constructs` library on
|
|
4961
|
+
disk are seen as independent, completely different libraries. As a
|
|
4962
|
+
consequence, the class `Construct` in each copy of the `constructs` library
|
|
4963
|
+
is seen as a different class, and an instance of one class will not test as
|
|
4964
|
+
`instanceof` the other class. `npm install` will not create installations
|
|
4965
|
+
like this, but users may manually symlink construct libraries together or
|
|
4966
|
+
use a monorepo tool: in those cases, multiple copies of the `constructs`
|
|
4967
|
+
library can be accidentally installed, and `instanceof` will behave
|
|
4968
|
+
unpredictably. It is safest to avoid using `instanceof`, and using
|
|
4969
|
+
this type-testing method instead.
|
|
4970
|
+
|
|
4971
|
+
###### `x`<sup>Required</sup> <a name="x" id="@layertwo/cdk-constructs.UvLayer.isConstruct.parameter.x"></a>
|
|
4972
|
+
|
|
4973
|
+
- *Type:* any
|
|
4974
|
+
|
|
4975
|
+
Any object.
|
|
4976
|
+
|
|
4977
|
+
---
|
|
4978
|
+
|
|
4979
|
+
##### `isOwnedResource` <a name="isOwnedResource" id="@layertwo/cdk-constructs.UvLayer.isOwnedResource"></a>
|
|
4980
|
+
|
|
4981
|
+
```typescript
|
|
4982
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
4983
|
+
|
|
4984
|
+
UvLayer.isOwnedResource(construct: IConstruct)
|
|
4985
|
+
```
|
|
4986
|
+
|
|
4987
|
+
Returns true if the construct was created by CDK, and false otherwise.
|
|
4988
|
+
|
|
4989
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@layertwo/cdk-constructs.UvLayer.isOwnedResource.parameter.construct"></a>
|
|
4990
|
+
|
|
4991
|
+
- *Type:* constructs.IConstruct
|
|
4992
|
+
|
|
4993
|
+
---
|
|
4994
|
+
|
|
4995
|
+
##### `isResource` <a name="isResource" id="@layertwo/cdk-constructs.UvLayer.isResource"></a>
|
|
4996
|
+
|
|
4997
|
+
```typescript
|
|
4998
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
4999
|
+
|
|
5000
|
+
UvLayer.isResource(construct: IConstruct)
|
|
5001
|
+
```
|
|
5002
|
+
|
|
5003
|
+
Check whether the given construct is a Resource.
|
|
5004
|
+
|
|
5005
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@layertwo/cdk-constructs.UvLayer.isResource.parameter.construct"></a>
|
|
5006
|
+
|
|
5007
|
+
- *Type:* constructs.IConstruct
|
|
5008
|
+
|
|
5009
|
+
---
|
|
5010
|
+
|
|
5011
|
+
##### `fromLayerVersionArn` <a name="fromLayerVersionArn" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionArn"></a>
|
|
5012
|
+
|
|
5013
|
+
```typescript
|
|
5014
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
5015
|
+
|
|
5016
|
+
UvLayer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string)
|
|
5017
|
+
```
|
|
5018
|
+
|
|
5019
|
+
Imports a layer version by ARN.
|
|
5020
|
+
|
|
5021
|
+
Assumes it is compatible with all Lambda runtimes.
|
|
5022
|
+
|
|
5023
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionArn.parameter.scope"></a>
|
|
5024
|
+
|
|
5025
|
+
- *Type:* constructs.Construct
|
|
5026
|
+
|
|
5027
|
+
---
|
|
5028
|
+
|
|
5029
|
+
###### `id`<sup>Required</sup> <a name="id" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionArn.parameter.id"></a>
|
|
5030
|
+
|
|
5031
|
+
- *Type:* string
|
|
5032
|
+
|
|
5033
|
+
---
|
|
5034
|
+
|
|
5035
|
+
###### `layerVersionArn`<sup>Required</sup> <a name="layerVersionArn" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionArn.parameter.layerVersionArn"></a>
|
|
5036
|
+
|
|
5037
|
+
- *Type:* string
|
|
5038
|
+
|
|
5039
|
+
---
|
|
5040
|
+
|
|
5041
|
+
##### `fromLayerVersionAttributes` <a name="fromLayerVersionAttributes" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionAttributes"></a>
|
|
5042
|
+
|
|
5043
|
+
```typescript
|
|
5044
|
+
import { UvLayer } from '@layertwo/cdk-constructs'
|
|
5045
|
+
|
|
5046
|
+
UvLayer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes)
|
|
5047
|
+
```
|
|
5048
|
+
|
|
5049
|
+
Imports a Layer that has been defined externally.
|
|
5050
|
+
|
|
5051
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionAttributes.parameter.scope"></a>
|
|
5052
|
+
|
|
5053
|
+
- *Type:* constructs.Construct
|
|
5054
|
+
|
|
5055
|
+
the parent Construct that will use the imported layer.
|
|
5056
|
+
|
|
5057
|
+
---
|
|
5058
|
+
|
|
5059
|
+
###### `id`<sup>Required</sup> <a name="id" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionAttributes.parameter.id"></a>
|
|
5060
|
+
|
|
5061
|
+
- *Type:* string
|
|
5062
|
+
|
|
5063
|
+
the id of the imported layer in the construct tree.
|
|
5064
|
+
|
|
5065
|
+
---
|
|
5066
|
+
|
|
5067
|
+
###### `attrs`<sup>Required</sup> <a name="attrs" id="@layertwo/cdk-constructs.UvLayer.fromLayerVersionAttributes.parameter.attrs"></a>
|
|
5068
|
+
|
|
5069
|
+
- *Type:* aws-cdk-lib.aws_lambda.LayerVersionAttributes
|
|
5070
|
+
|
|
5071
|
+
the properties of the imported layer.
|
|
5072
|
+
|
|
5073
|
+
---
|
|
5074
|
+
|
|
5075
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
5076
|
+
|
|
5077
|
+
| **Name** | **Type** | **Description** |
|
|
5078
|
+
| --- | --- | --- |
|
|
5079
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
5080
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
|
|
5081
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
|
|
5082
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.layerVersionArn">layerVersionArn</a></code> | <code>string</code> | The ARN of the Lambda Layer version that this Layer defines. |
|
|
5083
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.layerVersionRef">layerVersionRef</a></code> | <code>aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference</code> | A reference to a LayerVersion resource. |
|
|
5084
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.compatibleRuntimes">compatibleRuntimes</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime[]</code> | The runtimes compatible with this Layer. |
|
|
5085
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.architecture">architecture</a></code> | <code>aws-cdk-lib.aws_lambda.Architecture</code> | Architecture the layer was built for. |
|
|
5086
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.runtime">runtime</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime</code> | Python runtime the layer was built for. |
|
|
5087
|
+
|
|
5088
|
+
---
|
|
5089
|
+
|
|
5090
|
+
##### `node`<sup>Required</sup> <a name="node" id="@layertwo/cdk-constructs.UvLayer.property.node"></a>
|
|
5091
|
+
|
|
5092
|
+
```typescript
|
|
5093
|
+
public readonly node: Node;
|
|
5094
|
+
```
|
|
5095
|
+
|
|
5096
|
+
- *Type:* constructs.Node
|
|
5097
|
+
|
|
5098
|
+
The tree node.
|
|
5099
|
+
|
|
5100
|
+
---
|
|
5101
|
+
|
|
5102
|
+
##### `env`<sup>Required</sup> <a name="env" id="@layertwo/cdk-constructs.UvLayer.property.env"></a>
|
|
5103
|
+
|
|
5104
|
+
```typescript
|
|
5105
|
+
public readonly env: ResourceEnvironment;
|
|
5106
|
+
```
|
|
5107
|
+
|
|
5108
|
+
- *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
|
|
5109
|
+
|
|
5110
|
+
The environment this resource belongs to.
|
|
5111
|
+
|
|
5112
|
+
For resources that are created and managed in a Stack (those created by
|
|
5113
|
+
creating new class instances like `new Role()`, `new Bucket()`, etc.), this
|
|
5114
|
+
is always the same as the environment of the stack they belong to.
|
|
5115
|
+
|
|
5116
|
+
For referenced resources (those obtained from referencing methods like
|
|
5117
|
+
`Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
|
|
5118
|
+
different than the stack they were imported into.
|
|
5119
|
+
|
|
5120
|
+
---
|
|
5121
|
+
|
|
5122
|
+
##### `stack`<sup>Required</sup> <a name="stack" id="@layertwo/cdk-constructs.UvLayer.property.stack"></a>
|
|
5123
|
+
|
|
5124
|
+
```typescript
|
|
5125
|
+
public readonly stack: Stack;
|
|
5126
|
+
```
|
|
5127
|
+
|
|
5128
|
+
- *Type:* aws-cdk-lib.Stack
|
|
5129
|
+
|
|
5130
|
+
The stack in which this resource is defined.
|
|
5131
|
+
|
|
5132
|
+
---
|
|
5133
|
+
|
|
5134
|
+
##### `layerVersionArn`<sup>Required</sup> <a name="layerVersionArn" id="@layertwo/cdk-constructs.UvLayer.property.layerVersionArn"></a>
|
|
5135
|
+
|
|
5136
|
+
```typescript
|
|
5137
|
+
public readonly layerVersionArn: string;
|
|
5138
|
+
```
|
|
5139
|
+
|
|
5140
|
+
- *Type:* string
|
|
5141
|
+
|
|
5142
|
+
The ARN of the Lambda Layer version that this Layer defines.
|
|
5143
|
+
|
|
5144
|
+
---
|
|
5145
|
+
|
|
5146
|
+
##### `layerVersionRef`<sup>Required</sup> <a name="layerVersionRef" id="@layertwo/cdk-constructs.UvLayer.property.layerVersionRef"></a>
|
|
5147
|
+
|
|
5148
|
+
```typescript
|
|
5149
|
+
public readonly layerVersionRef: LayerVersionReference;
|
|
5150
|
+
```
|
|
5151
|
+
|
|
5152
|
+
- *Type:* aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference
|
|
5153
|
+
|
|
5154
|
+
A reference to a LayerVersion resource.
|
|
5155
|
+
|
|
5156
|
+
---
|
|
5157
|
+
|
|
5158
|
+
##### `compatibleRuntimes`<sup>Optional</sup> <a name="compatibleRuntimes" id="@layertwo/cdk-constructs.UvLayer.property.compatibleRuntimes"></a>
|
|
5159
|
+
|
|
5160
|
+
```typescript
|
|
5161
|
+
public readonly compatibleRuntimes: Runtime[];
|
|
5162
|
+
```
|
|
5163
|
+
|
|
5164
|
+
- *Type:* aws-cdk-lib.aws_lambda.Runtime[]
|
|
5165
|
+
|
|
5166
|
+
The runtimes compatible with this Layer.
|
|
5167
|
+
|
|
5168
|
+
---
|
|
5169
|
+
|
|
5170
|
+
##### `architecture`<sup>Required</sup> <a name="architecture" id="@layertwo/cdk-constructs.UvLayer.property.architecture"></a>
|
|
5171
|
+
|
|
5172
|
+
```typescript
|
|
5173
|
+
public readonly architecture: Architecture;
|
|
5174
|
+
```
|
|
5175
|
+
|
|
5176
|
+
- *Type:* aws-cdk-lib.aws_lambda.Architecture
|
|
5177
|
+
|
|
5178
|
+
Architecture the layer was built for.
|
|
5179
|
+
|
|
5180
|
+
---
|
|
5181
|
+
|
|
5182
|
+
##### `runtime`<sup>Required</sup> <a name="runtime" id="@layertwo/cdk-constructs.UvLayer.property.runtime"></a>
|
|
5183
|
+
|
|
5184
|
+
```typescript
|
|
5185
|
+
public readonly runtime: Runtime;
|
|
5186
|
+
```
|
|
5187
|
+
|
|
5188
|
+
- *Type:* aws-cdk-lib.aws_lambda.Runtime
|
|
5189
|
+
|
|
5190
|
+
Python runtime the layer was built for.
|
|
5191
|
+
|
|
5192
|
+
---
|
|
5193
|
+
|
|
5194
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
5195
|
+
|
|
5196
|
+
| **Name** | **Type** | **Description** |
|
|
5197
|
+
| --- | --- | --- |
|
|
5198
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayer.property.PROPERTY_INJECTION_ID">PROPERTY_INJECTION_ID</a></code> | <code>string</code> | Uniquely identifies this class. |
|
|
5199
|
+
|
|
5200
|
+
---
|
|
5201
|
+
|
|
5202
|
+
##### `PROPERTY_INJECTION_ID`<sup>Required</sup> <a name="PROPERTY_INJECTION_ID" id="@layertwo/cdk-constructs.UvLayer.property.PROPERTY_INJECTION_ID"></a>
|
|
5203
|
+
|
|
5204
|
+
```typescript
|
|
5205
|
+
public readonly PROPERTY_INJECTION_ID: string;
|
|
5206
|
+
```
|
|
5207
|
+
|
|
5208
|
+
- *Type:* string
|
|
5209
|
+
|
|
5210
|
+
Uniquely identifies this class.
|
|
5211
|
+
|
|
5212
|
+
---
|
|
5213
|
+
|
|
4787
5214
|
## Structs <a name="Structs" id="Structs"></a>
|
|
4788
5215
|
|
|
4789
5216
|
### DnsValidatedCertificateProps <a name="DnsValidatedCertificateProps" id="@layertwo/cdk-constructs.DnsValidatedCertificateProps"></a>
|
|
@@ -7214,6 +7641,7 @@ const uvBundlingProps: UvBundlingProps = { ... }
|
|
|
7214
7641
|
| <code><a href="#@layertwo/cdk-constructs.UvBundlingProps.property.commandHooks">commandHooks</a></code> | <code><a href="#@layertwo/cdk-constructs.ICommandHooks">ICommandHooks</a></code> | Commands to run around bundling. |
|
|
7215
7642
|
| <code><a href="#@layertwo/cdk-constructs.UvBundlingProps.property.image">image</a></code> | <code>aws-cdk-lib.DockerImage</code> | Use this image instead of the built-in SAM build image. |
|
|
7216
7643
|
| <code><a href="#@layertwo/cdk-constructs.UvBundlingProps.property.runtime">runtime</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime</code> | Python runtime to bundle; |
|
|
7644
|
+
| <code><a href="#@layertwo/cdk-constructs.UvBundlingProps.property.targetDir">targetDir</a></code> | <code>string</code> | Install dependencies into this subdirectory and ship only it; |
|
|
7217
7645
|
|
|
7218
7646
|
---
|
|
7219
7647
|
|
|
@@ -7465,6 +7893,21 @@ must belong to the Python family.
|
|
|
7465
7893
|
|
|
7466
7894
|
---
|
|
7467
7895
|
|
|
7896
|
+
##### `targetDir`<sup>Optional</sup> <a name="targetDir" id="@layertwo/cdk-constructs.UvBundlingProps.property.targetDir"></a>
|
|
7897
|
+
|
|
7898
|
+
```typescript
|
|
7899
|
+
public readonly targetDir: string;
|
|
7900
|
+
```
|
|
7901
|
+
|
|
7902
|
+
- *Type:* string
|
|
7903
|
+
- *Default:* "."
|
|
7904
|
+
|
|
7905
|
+
Install dependencies into this subdirectory and ship only it;
|
|
7906
|
+
|
|
7907
|
+
`python` gives a Lambda layer layout.
|
|
7908
|
+
|
|
7909
|
+
---
|
|
7910
|
+
|
|
7468
7911
|
### UvCodeProps <a name="UvCodeProps" id="@layertwo/cdk-constructs.UvCodeProps"></a>
|
|
7469
7912
|
|
|
7470
7913
|
Options for `uvCode`.
|
|
@@ -7500,6 +7943,7 @@ const uvCodeProps: UvCodeProps = { ... }
|
|
|
7500
7943
|
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.commandHooks">commandHooks</a></code> | <code><a href="#@layertwo/cdk-constructs.ICommandHooks">ICommandHooks</a></code> | Commands to run around bundling. |
|
|
7501
7944
|
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.image">image</a></code> | <code>aws-cdk-lib.DockerImage</code> | Use this image instead of the built-in SAM build image. |
|
|
7502
7945
|
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.runtime">runtime</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime</code> | Python runtime to bundle; |
|
|
7946
|
+
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.targetDir">targetDir</a></code> | <code>string</code> | Install dependencies into this subdirectory and ship only it; |
|
|
7503
7947
|
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.rootDir">rootDir</a></code> | <code>string</code> | Directory containing the uv project. |
|
|
7504
7948
|
| <code><a href="#@layertwo/cdk-constructs.UvCodeProps.property.hashExcludes">hashExcludes</a></code> | <code>string[]</code> | Extra glob patterns to leave out of the asset hash; |
|
|
7505
7949
|
|
|
@@ -7753,6 +8197,21 @@ must belong to the Python family.
|
|
|
7753
8197
|
|
|
7754
8198
|
---
|
|
7755
8199
|
|
|
8200
|
+
##### `targetDir`<sup>Optional</sup> <a name="targetDir" id="@layertwo/cdk-constructs.UvCodeProps.property.targetDir"></a>
|
|
8201
|
+
|
|
8202
|
+
```typescript
|
|
8203
|
+
public readonly targetDir: string;
|
|
8204
|
+
```
|
|
8205
|
+
|
|
8206
|
+
- *Type:* string
|
|
8207
|
+
- *Default:* "."
|
|
8208
|
+
|
|
8209
|
+
Install dependencies into this subdirectory and ship only it;
|
|
8210
|
+
|
|
8211
|
+
`python` gives a Lambda layer layout.
|
|
8212
|
+
|
|
8213
|
+
---
|
|
8214
|
+
|
|
7756
8215
|
##### `rootDir`<sup>Required</sup> <a name="rootDir" id="@layertwo/cdk-constructs.UvCodeProps.property.rootDir"></a>
|
|
7757
8216
|
|
|
7758
8217
|
```typescript
|
|
@@ -7779,6 +8238,156 @@ added to `DEFAULT_HASH_EXCLUDES`.
|
|
|
7779
8238
|
|
|
7780
8239
|
---
|
|
7781
8240
|
|
|
8241
|
+
### UvLayerProps <a name="UvLayerProps" id="@layertwo/cdk-constructs.UvLayerProps"></a>
|
|
8242
|
+
|
|
8243
|
+
Options for `UvLayer`.
|
|
8244
|
+
|
|
8245
|
+
#### Initializer <a name="Initializer" id="@layertwo/cdk-constructs.UvLayerProps.Initializer"></a>
|
|
8246
|
+
|
|
8247
|
+
```typescript
|
|
8248
|
+
import { UvLayerProps } from '@layertwo/cdk-constructs'
|
|
8249
|
+
|
|
8250
|
+
const uvLayerProps: UvLayerProps = { ... }
|
|
8251
|
+
```
|
|
8252
|
+
|
|
8253
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
8254
|
+
|
|
8255
|
+
| **Name** | **Type** | **Description** |
|
|
8256
|
+
| --- | --- | --- |
|
|
8257
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.description">description</a></code> | <code>string</code> | The description the this Lambda Layer. |
|
|
8258
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.layerVersionName">layerVersionName</a></code> | <code>string</code> | The name of the layer. |
|
|
8259
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.license">license</a></code> | <code>string</code> | The SPDX licence identifier or URL to the license file for this layer. |
|
|
8260
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.removalPolicy">removalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Whether to retain this version of the layer when a new version is added or when the stack is deleted. |
|
|
8261
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.rootDir">rootDir</a></code> | <code>string</code> | Directory containing the uv project; |
|
|
8262
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.architecture">architecture</a></code> | <code>aws-cdk-lib.aws_lambda.Architecture</code> | Target architecture. |
|
|
8263
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.bundling">bundling</a></code> | <code><a href="#@layertwo/cdk-constructs.UvBundlingProps">UvBundlingProps</a></code> | Bundling options; |
|
|
8264
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.hashExcludes">hashExcludes</a></code> | <code>string[]</code> | Extra glob patterns to leave out of the asset hash; |
|
|
8265
|
+
| <code><a href="#@layertwo/cdk-constructs.UvLayerProps.property.runtime">runtime</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime</code> | Python runtime; |
|
|
8266
|
+
|
|
8267
|
+
---
|
|
8268
|
+
|
|
8269
|
+
##### `description`<sup>Optional</sup> <a name="description" id="@layertwo/cdk-constructs.UvLayerProps.property.description"></a>
|
|
8270
|
+
|
|
8271
|
+
```typescript
|
|
8272
|
+
public readonly description: string;
|
|
8273
|
+
```
|
|
8274
|
+
|
|
8275
|
+
- *Type:* string
|
|
8276
|
+
- *Default:* No description.
|
|
8277
|
+
|
|
8278
|
+
The description the this Lambda Layer.
|
|
8279
|
+
|
|
8280
|
+
---
|
|
8281
|
+
|
|
8282
|
+
##### `layerVersionName`<sup>Optional</sup> <a name="layerVersionName" id="@layertwo/cdk-constructs.UvLayerProps.property.layerVersionName"></a>
|
|
8283
|
+
|
|
8284
|
+
```typescript
|
|
8285
|
+
public readonly layerVersionName: string;
|
|
8286
|
+
```
|
|
8287
|
+
|
|
8288
|
+
- *Type:* string
|
|
8289
|
+
- *Default:* A name will be generated.
|
|
8290
|
+
|
|
8291
|
+
The name of the layer.
|
|
8292
|
+
|
|
8293
|
+
---
|
|
8294
|
+
|
|
8295
|
+
##### `license`<sup>Optional</sup> <a name="license" id="@layertwo/cdk-constructs.UvLayerProps.property.license"></a>
|
|
8296
|
+
|
|
8297
|
+
```typescript
|
|
8298
|
+
public readonly license: string;
|
|
8299
|
+
```
|
|
8300
|
+
|
|
8301
|
+
- *Type:* string
|
|
8302
|
+
- *Default:* No license information will be recorded.
|
|
8303
|
+
|
|
8304
|
+
The SPDX licence identifier or URL to the license file for this layer.
|
|
8305
|
+
|
|
8306
|
+
---
|
|
8307
|
+
|
|
8308
|
+
##### `removalPolicy`<sup>Optional</sup> <a name="removalPolicy" id="@layertwo/cdk-constructs.UvLayerProps.property.removalPolicy"></a>
|
|
8309
|
+
|
|
8310
|
+
```typescript
|
|
8311
|
+
public readonly removalPolicy: RemovalPolicy;
|
|
8312
|
+
```
|
|
8313
|
+
|
|
8314
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
8315
|
+
- *Default:* RemovalPolicy.DESTROY
|
|
8316
|
+
|
|
8317
|
+
Whether to retain this version of the layer when a new version is added or when the stack is deleted.
|
|
8318
|
+
|
|
8319
|
+
---
|
|
8320
|
+
|
|
8321
|
+
##### `rootDir`<sup>Required</sup> <a name="rootDir" id="@layertwo/cdk-constructs.UvLayerProps.property.rootDir"></a>
|
|
8322
|
+
|
|
8323
|
+
```typescript
|
|
8324
|
+
public readonly rootDir: string;
|
|
8325
|
+
```
|
|
8326
|
+
|
|
8327
|
+
- *Type:* string
|
|
8328
|
+
|
|
8329
|
+
Directory containing the uv project;
|
|
8330
|
+
|
|
8331
|
+
it needs a `uv.lock`.
|
|
8332
|
+
|
|
8333
|
+
---
|
|
8334
|
+
|
|
8335
|
+
##### `architecture`<sup>Optional</sup> <a name="architecture" id="@layertwo/cdk-constructs.UvLayerProps.property.architecture"></a>
|
|
8336
|
+
|
|
8337
|
+
```typescript
|
|
8338
|
+
public readonly architecture: Architecture;
|
|
8339
|
+
```
|
|
8340
|
+
|
|
8341
|
+
- *Type:* aws-cdk-lib.aws_lambda.Architecture
|
|
8342
|
+
- *Default:* Architecture.ARM_64
|
|
8343
|
+
|
|
8344
|
+
Target architecture.
|
|
8345
|
+
|
|
8346
|
+
---
|
|
8347
|
+
|
|
8348
|
+
##### `bundling`<sup>Optional</sup> <a name="bundling" id="@layertwo/cdk-constructs.UvLayerProps.property.bundling"></a>
|
|
8349
|
+
|
|
8350
|
+
```typescript
|
|
8351
|
+
public readonly bundling: UvBundlingProps;
|
|
8352
|
+
```
|
|
8353
|
+
|
|
8354
|
+
- *Type:* <a href="#@layertwo/cdk-constructs.UvBundlingProps">UvBundlingProps</a>
|
|
8355
|
+
|
|
8356
|
+
Bundling options;
|
|
8357
|
+
|
|
8358
|
+
the runtime and architecture come from the layer.
|
|
8359
|
+
|
|
8360
|
+
---
|
|
8361
|
+
|
|
8362
|
+
##### `hashExcludes`<sup>Optional</sup> <a name="hashExcludes" id="@layertwo/cdk-constructs.UvLayerProps.property.hashExcludes"></a>
|
|
8363
|
+
|
|
8364
|
+
```typescript
|
|
8365
|
+
public readonly hashExcludes: string[];
|
|
8366
|
+
```
|
|
8367
|
+
|
|
8368
|
+
- *Type:* string[]
|
|
8369
|
+
|
|
8370
|
+
Extra glob patterns to leave out of the asset hash;
|
|
8371
|
+
|
|
8372
|
+
added to `DEFAULT_HASH_EXCLUDES`.
|
|
8373
|
+
|
|
8374
|
+
---
|
|
8375
|
+
|
|
8376
|
+
##### `runtime`<sup>Optional</sup> <a name="runtime" id="@layertwo/cdk-constructs.UvLayerProps.property.runtime"></a>
|
|
8377
|
+
|
|
8378
|
+
```typescript
|
|
8379
|
+
public readonly runtime: Runtime;
|
|
8380
|
+
```
|
|
8381
|
+
|
|
8382
|
+
- *Type:* aws-cdk-lib.aws_lambda.Runtime
|
|
8383
|
+
- *Default:* Runtime.PYTHON_3_15
|
|
8384
|
+
|
|
8385
|
+
Python runtime;
|
|
8386
|
+
|
|
8387
|
+
must belong to the Python family.
|
|
8388
|
+
|
|
8389
|
+
---
|
|
8390
|
+
|
|
7782
8391
|
## Classes <a name="Classes" id="Classes"></a>
|
|
7783
8392
|
|
|
7784
8393
|
### UvBundling <a name="UvBundling" id="@layertwo/cdk-constructs.UvBundling"></a>
|
|
@@ -8022,6 +8631,8 @@ public afterBundling(inputDir: string, outputDir: string): string[]
|
|
|
8022
8631
|
|
|
8023
8632
|
Runs after dependencies are installed.
|
|
8024
8633
|
|
|
8634
|
+
With a `targetDir` bundle, `outputDir` is that subdirectory.
|
|
8635
|
+
|
|
8025
8636
|
###### `inputDir`<sup>Required</sup> <a name="inputDir" id="@layertwo/cdk-constructs.ICommandHooks.afterBundling.parameter.inputDir"></a>
|
|
8026
8637
|
|
|
8027
8638
|
- *Type:* string
|