@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.740Z") @Stability(value=Stable) public class RepositoryImage extends ContainerImage
For images hosted in Amazon ECR, see EcrImage.
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.services.batch.*;
import software.amazon.awscdk.services.ecs.ContainerImage;
Object jobQueue = JobQueue.Builder.create(this, "MyQueue")
.computeEnvironments(List.of(Map.of(
"computeEnvironment", ComputeEnvironment.Builder.create(this, "ComputeEnvironment")
.managed(false)
.build(),
"order", 1)))
.build();
Object jobDefinition = JobDefinition.Builder.create(this, "MyJob")
.container(Map.of(
"image", ContainerImage.fromRegistry("test-repo")))
.build();
Queue queue = new Queue(this, "Queue");
Rule rule = Rule.Builder.create(this, "Rule")
.schedule(Schedule.rate(Duration.hours(1)))
.build();
rule.addTarget(BatchJob.Builder.create(jobQueue.getJobQueueArn(), jobQueue, jobDefinition.getJobDefinitionArn(), jobDefinition)
.deadLetterQueue(queue)
.event(RuleTargetInput.fromObject(Map.of("SomeParam", "SomeValue")))
.retryAttempts(2)
.maxEventAge(Duration.hours(2))
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
RepositoryImage.Builder
A fluent builder for
RepositoryImage. |
| Modifier | Constructor and Description |
|---|---|
protected |
RepositoryImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
RepositoryImage(software.amazon.jsii.JsiiObjectRef objRef) |
|
RepositoryImage(String imageName)
Constructs a new instance of the RepositoryImage class.
|
|
RepositoryImage(String imageName,
RepositoryImageProps props)
Constructs a new instance of the RepositoryImage 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 RepositoryImage(software.amazon.jsii.JsiiObjectRef objRef)
protected RepositoryImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public RepositoryImage(@NotNull
String imageName,
@Nullable
RepositoryImageProps props)
imageName - This parameter is required.props - @Stability(value=Stable)
public RepositoryImage(@NotNull
String imageName)
imageName - 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.