@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.572Z") @Stability(value=Stable) public class AssetImage extends ContainerImage
Example:
import software.amazon.awscdk.App;
import software.amazon.awscdk.Stack;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.ecs.patterns.*;
import software.amazon.awscdk.cxapi.*;
import path.*;
App app = new App();
Stack stack = new Stack(app, "aws-ecs-patterns-queue");
stack.node.setContext(ECS_REMOVE_DEFAULT_DESIRED_COUNT, true);
Vpc vpc = Vpc.Builder.create(stack, "VPC")
.maxAzs(2)
.build();
QueueProcessingFargateService.Builder.create(stack, "QueueProcessingService")
.vpc(vpc)
.memoryLimitMiB(512)
.image(new AssetImage(join(__dirname, "..", "sqs-reader")))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
AssetImage.Builder
A fluent builder for
AssetImage. |
| Modifier | Constructor and Description |
|---|---|
protected |
AssetImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AssetImage(software.amazon.jsii.JsiiObjectRef objRef) |
|
AssetImage(String directory)
Constructs a new instance of the AssetImage class.
|
|
AssetImage(String directory,
AssetImageProps props)
Constructs a new instance of the AssetImage class.
|
| Modifier and Type | Method and Description |
|---|---|
ContainerImageConfig |
bind(software.constructs.Construct scope,
ContainerDefinition containerDefinition)
Called when the image is used by a ContainerDefinition.
|
fromAsset, fromAsset, fromDockerImageAsset, fromEcrRepository, fromEcrRepository, fromRegistry, fromRegistry, fromTarballjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected AssetImage(software.amazon.jsii.JsiiObjectRef objRef)
protected AssetImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public AssetImage(@NotNull
String directory,
@Nullable
AssetImageProps props)
directory - The directory containing the Dockerfile. This parameter is required.props - @Stability(value=Stable)
public AssetImage(@NotNull
String directory)
directory - The directory containing the Dockerfile. This parameter is required.@Stability(value=Stable) @NotNull public ContainerImageConfig bind(@NotNull software.constructs.Construct scope, @NotNull ContainerDefinition containerDefinition)
bind in class ContainerImagescope - This parameter is required.containerDefinition - This parameter is required.Copyright © 2022. All rights reserved.