@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:57.959Z") 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.assets.*; import software.amazon.awscdk.services.apigateway.*; import software.amazon.awscdk.services.iam.*; import software.amazon.awscdk.core.*; 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) .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")) .follow(FollowMode.NEVER) .followSymlinks(SymlinkFollowMode.NEVER) .ignoreMode(IgnoreMode.GLOB) .readers(List.of(grantable)) .sourceHash("sourceHash") .build();
Modifier | Constructor and Description |
---|---|
protected |
AssetApiDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AssetApiDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
|
AssetApiDefinition(java.lang.String path,
AssetOptions options) |
Modifier and Type | Method and Description |
---|---|
ApiDefinitionConfig |
bind(Construct scope)
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
|
void |
bindAfterCreate(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, fromInline
protected AssetApiDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected AssetApiDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public AssetApiDefinition(java.lang.String path, AssetOptions options)
path
- This parameter is required.options
- public ApiDefinitionConfig bind(Construct scope)
bind
in class ApiDefinition
scope
- This parameter is required.public void bindAfterCreate(Construct scope, 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 ApiDefinition
scope
- This parameter is required.restApi
- This parameter is required.