import * as ecr from 'aws-cdk-lib/aws-ecr'; import * as evt from 'aws-cdk-lib/aws-events'; import * as iam from 'aws-cdk-lib/aws-iam'; import { Construct } from 'constructs'; import { Image } from './image'; /** * Properties for EcrSync */ export interface EcrSyncProps { /** * Images from Docker Hub that should be pulled into ECR. * */ readonly dockerImages: Image[]; /** * An ECR lifecycle rule which is applied to all repositories. * * @default No lifecycle rules. */ readonly lifcecyleRule?: ecr.LifecycleRule; /** * A prefix for all ECR repository names. * * @default Empty. */ readonly repoPrefix?: string; /** * Optional. Schedule when images should be synchronized. * * @default is once a day. */ readonly schedule?: evt.Schedule; /** * Optional. Bash script injection for the docker image processing phase, * in order to log in to Dockerhub or do other initialization. * * @default Empty. */ readonly initScript?: string; } /** * Construct to sync Docker images from DockerHub into ECR Repos. */ export declare class EcrSync extends Construct { private ecrRepos; constructor(scope: Construct, id: string, props: EcrSyncProps); /** * Grant the given identity permissions to use the images in this repository */ grantPull(grantee: iam.IGrantable): void; }