@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.085Z") @Stability(value=Stable) public class AssetApiDefinition extends ApiDefinition
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.apigateway.*;
import software.amazon.awscdk.services.iam.*;
DockerImage dockerImage;
IGrantable grantable;
ILocalBundling localBundling;
AssetApiDefinition assetApiDefinition = AssetApiDefinition.Builder.create("path")
.assetHash("assetHash")
.assetHashType(AssetHashType.SOURCE)
.bundling(BundlingOptions.builder()
.image(dockerImage)
// the properties below are optional
.command(List.of("command"))
.entrypoint(List.of("entrypoint"))
.environment(Map.of(
"environmentKey", "environment"))
.local(localBundling)
.network("network")
.outputType(BundlingOutput.ARCHIVED)
.securityOpt("securityOpt")
.user("user")
.volumes(List.of(DockerVolume.builder()
.containerPath("containerPath")
.hostPath("hostPath")
// the properties below are optional
.consistency(DockerVolumeConsistency.CONSISTENT)
.build()))
.workingDirectory("workingDirectory")
.build())
.exclude(List.of("exclude"))
.followSymlinks(SymlinkFollowMode.NEVER)
.ignoreMode(IgnoreMode.GLOB)
.readers(List.of(grantable))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
AssetApiDefinition.Builder
A fluent builder for
AssetApiDefinition. |
| Modifier | Constructor and Description |
|---|---|
protected |
AssetApiDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AssetApiDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
|
AssetApiDefinition(String path) |
|
AssetApiDefinition(String path,
AssetOptions options) |
| Modifier and Type | Method and Description |
|---|---|
ApiDefinitionConfig |
bind(software.constructs.Construct scope)
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
|
void |
bindAfterCreate(software.constructs.Construct scope,
IRestApi restApi)
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
|
fromAsset, fromAsset, fromBucket, fromBucket, fromInlinejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected AssetApiDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected AssetApiDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public AssetApiDefinition(@NotNull
String path,
@Nullable
AssetOptions options)
path - This parameter is required.options - @Stability(value=Stable)
public AssetApiDefinition(@NotNull
String path)
path - This parameter is required.@Stability(value=Stable) @NotNull public ApiDefinitionConfig bind(@NotNull software.constructs.Construct scope)
bind in class ApiDefinitionscope - This parameter is required.@Stability(value=Stable)
public void bindAfterCreate(@NotNull
software.constructs.Construct scope,
@NotNull
IRestApi restApi)
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
bindAfterCreate in class ApiDefinitionscope - This parameter is required.restApi - This parameter is required.Copyright © 2022. All rights reserved.