class RepositoryImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.RepositoryImage |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#RepositoryImage |
Java | software.amazon.awscdk.services.ecs.RepositoryImage |
Python | aws_cdk.aws_ecs.RepositoryImage |
TypeScript (source) | aws-cdk-lib » aws_ecs » RepositoryImage |
Extends
Container
An image hosted in a public or private repository.
For images hosted in Amazon ECR, see EcrImage.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr_assets as ecr_assets } from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
declare const dockerImageAsset: ecr_assets.DockerImageAsset;
const repositoryImage = ecs.RepositoryImage.fromDockerImageAsset(dockerImageAsset);
Initializer
new RepositoryImage(imageName: string, props?: RepositoryImageProps)
Parameters
- imageName
string
- props
Repository
Image Props
Constructs a new instance of the RepositoryImage class.
Methods
Name | Description |
---|---|
bind(scope, containerDefinition) | Called when the image is used by a ContainerDefinition. |
bind(scope, containerDefinition)
public bind(scope: Construct, containerDefinition: ContainerDefinition): ContainerImageConfig
Parameters
- scope
Construct
- containerDefinition
Container
Definition
Returns
Called when the image is used by a ContainerDefinition.