@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:37.145Z") @Stability(value=Experimental) public interface AssetOptions extends software.amazon.jsii.JsiiSerializable, CopyOptions, FileCopyOptions, AssetOptions
Function.Builder.create(this, "Function")
.code(Code.fromAsset(join(__dirname, "my-python-handler"), AssetOptions.builder()
.bundling(BundlingOptions.builder()
.image(Runtime.PYTHON_3_9.getBundlingImage())
.command(List.of("bash", "-c", "pip install -r requirements.txt -t /asset-output && cp -au . /asset-output"))
.build())
.build()))
.runtime(Runtime.PYTHON_3_9)
.handler("index.handler")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AssetOptions.Builder
A builder for
AssetOptions |
static class |
AssetOptions.Jsii$Proxy
An implementation for
AssetOptions |
| Modifier and Type | Method and Description |
|---|---|
static AssetOptions.Builder |
builder() |
default List<String> |
getExclude()
Deprecated.
|
default IgnoreMode |
getIgnoreMode()
Deprecated.
|
default List<IGrantable> |
getReaders()
(experimental) A list of principals that should be able to read this asset from S3.
|
default String |
getSourceHash()
Deprecated.
see `assetHash` and `assetHashType`
|
getFollowgetFollowSymlinksgetAssetHash, getAssetHashType, getBundling@Stability(value=Experimental) @Nullable default List<IGrantable> getReaders()
You can use asset.grantRead(principal) to grant read permissions later.
Default: - No principals that can read file asset.
@Stability(value=Deprecated) @Deprecated @Nullable default String getSourceHash()
For consistency, this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be the asset hash.
NOTE: the source hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to Amazon S3, etc. If you chose to customize the source hash, you will need to make sure it is updated every time the source changes, or otherwise it is possible that some deployments will not be invalidated.
Default: - automatically calculate source hash based on the contents of the source file or directory.
@Stability(value=Deprecated) @Deprecated @Nullable default List<String> getExclude()
Default: nothing is excluded
getExclude in interface CopyOptionsgetExclude in interface FileCopyOptions@Stability(value=Deprecated) @Deprecated @Nullable default IgnoreMode getIgnoreMode()
Default: - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the '
getIgnoreMode in interface CopyOptionsgetIgnoreMode in interface FileCopyOptions@Stability(value=Experimental) static AssetOptions.Builder builder()
builder in interface AssetOptionsbuilder in interface CopyOptionsbuilder in interface FileCopyOptionsAssetOptions.Builder of AssetOptionsCopyright © 2022. All rights reserved.