Class EcrImage

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.ContainerImage
software.amazon.awscdk.services.ecs.EcrImage
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:01.334Z") @Stability(Stable) public class EcrImage extends ContainerImage
An image from an Amazon ECR repository.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecr.assets.*;
 import software.amazon.awscdk.services.ecs.*;
 DockerImageAsset dockerImageAsset;
 ContainerImage ecrImage = EcrImage.fromDockerImageAsset(dockerImageAsset);
 
  • Constructor Details

    • EcrImage

      protected EcrImage(software.amazon.jsii.JsiiObjectRef objRef)
    • EcrImage

      protected EcrImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EcrImage

      @Stability(Stable) public EcrImage(@NotNull IRepository repository, @NotNull String tagOrDigest)
      Constructs a new instance of the EcrImage class.

      Parameters:
      repository - This parameter is required.
      tagOrDigest - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public ContainerImageConfig bind(@NotNull software.constructs.Construct _scope, @NotNull ContainerDefinition containerDefinition)
      Called when the image is used by a ContainerDefinition.

      Specified by:
      bind in class ContainerImage
      Parameters:
      _scope - This parameter is required.
      containerDefinition - This parameter is required.
    • getImageName

      @Stability(Stable) @NotNull public String getImageName()
      The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest.

      For example, 012345678910.dkr.ecr.invalid input: '<'region-name>.amazonaws.com/invalid input: '<'repository-name>:latest or 012345678910.dkr.ecr.invalid input: '<'region-name>.amazonaws.com/invalid input: '<'repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE.