ECR class

Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Customers can use the familiar Docker CLI, or their preferred client, to push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable registry for your Docker or Open Container Initiative (OCI) images. Amazon ECR supports private repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can access repositories and images.

Constructors

ECR({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchCheckLayerAvailability({required List<String> layerDigests, required String repositoryName, String? registryId}) Future<BatchCheckLayerAvailabilityResponse>
Checks the availability of one or more image layers in a repository.
batchDeleteImage({required List<ImageIdentifier> imageIds, required String repositoryName, String? registryId}) Future<BatchDeleteImageResponse>
Deletes a list of specified images within a repository. Images are specified with either an imageTag or imageDigest.
batchGetImage({required List<ImageIdentifier> imageIds, required String repositoryName, List<String>? acceptedMediaTypes, String? registryId}) Future<BatchGetImageResponse>
Gets detailed information for an image. Images are specified with either an imageTag or imageDigest.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
completeLayerUpload({required List<String> layerDigests, required String repositoryName, required String uploadId, String? registryId}) Future<CompleteLayerUploadResponse>
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes.
createRepository({required String repositoryName, EncryptionConfiguration? encryptionConfiguration, ImageScanningConfiguration? imageScanningConfiguration, ImageTagMutability? imageTagMutability, List<Tag>? tags}) Future<CreateRepositoryResponse>
Creates a repository. For more information, see Amazon ECR Repositories in the Amazon Elastic Container Registry User Guide.
deleteLifecyclePolicy({required String repositoryName, String? registryId}) Future<DeleteLifecyclePolicyResponse>
Deletes the lifecycle policy associated with the specified repository.
deleteRegistryPolicy() Future<DeleteRegistryPolicyResponse>
Deletes the registry permissions policy.
deleteRepository({required String repositoryName, bool? force, String? registryId}) Future<DeleteRepositoryResponse>
Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the force option to delete the repository.
deleteRepositoryPolicy({required String repositoryName, String? registryId}) Future<DeleteRepositoryPolicyResponse>
Deletes the repository policy associated with the specified repository.
describeImages({required String repositoryName, DescribeImagesFilter? filter, List<ImageIdentifier>? imageIds, int? maxResults, String? nextToken, String? registryId}) Future<DescribeImagesResponse>
Returns metadata about the images in a repository.
describeImageScanFindings({required ImageIdentifier imageId, required String repositoryName, int? maxResults, String? nextToken, String? registryId}) Future<DescribeImageScanFindingsResponse>
Returns the scan findings for the specified image.
describeRegistry() Future<DescribeRegistryResponse>
Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
describeRepositories({int? maxResults, String? nextToken, String? registryId, List<String>? repositoryNames}) Future<DescribeRepositoriesResponse>
Describes image repositories in a registry.
getAuthorizationToken({List<String>? registryIds}) Future<GetAuthorizationTokenResponse>
Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.
getDownloadUrlForLayer({required String layerDigest, required String repositoryName, String? registryId}) Future<GetDownloadUrlForLayerResponse>
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image.
getLifecyclePolicy({required String repositoryName, String? registryId}) Future<GetLifecyclePolicyResponse>
Retrieves the lifecycle policy for the specified repository.
getLifecyclePolicyPreview({required String repositoryName, LifecyclePolicyPreviewFilter? filter, List<ImageIdentifier>? imageIds, int? maxResults, String? nextToken, String? registryId}) Future<GetLifecyclePolicyPreviewResponse>
Retrieves the results of the lifecycle policy preview request for the specified repository.
getRegistryPolicy() Future<GetRegistryPolicyResponse>
Retrieves the permissions policy for a registry.
getRepositoryPolicy({required String repositoryName, String? registryId}) Future<GetRepositoryPolicyResponse>
Retrieves the repository policy for the specified repository.
initiateLayerUpload({required String repositoryName, String? registryId}) Future<InitiateLayerUploadResponse>
Notifies Amazon ECR that you intend to upload an image layer.
listImages({required String repositoryName, ListImagesFilter? filter, int? maxResults, String? nextToken, String? registryId}) Future<ListImagesResponse>
Lists all the image IDs for the specified repository.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceResponse>
List the tags for an Amazon ECR resource.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putImage({required String imageManifest, required String repositoryName, String? imageDigest, String? imageManifestMediaType, String? imageTag, String? registryId}) Future<PutImageResponse>
Creates or updates the image manifest and tags associated with an image.
putImageScanningConfiguration({required ImageScanningConfiguration imageScanningConfiguration, required String repositoryName, String? registryId}) Future<PutImageScanningConfigurationResponse>
Updates the image scanning configuration for the specified repository.
putImageTagMutability({required ImageTagMutability imageTagMutability, required String repositoryName, String? registryId}) Future<PutImageTagMutabilityResponse>
Updates the image tag mutability settings for the specified repository. For more information, see Image Tag Mutability in the Amazon Elastic Container Registry User Guide.
putLifecyclePolicy({required String lifecyclePolicyText, required String repositoryName, String? registryId}) Future<PutLifecyclePolicyResponse>
Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle Policy Template.
putRegistryPolicy({required String policyText}) Future<PutRegistryPolicyResponse>
Creates or updates the permissions policy for your registry.
putReplicationConfiguration({required ReplicationConfiguration replicationConfiguration}) Future<PutReplicationConfigurationResponse>
Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see Using Service-Linked Roles for Amazon ECR in the Amazon Elastic Container Registry User Guide.
setRepositoryPolicy({required String policyText, required String repositoryName, bool? force, String? registryId}) Future<SetRepositoryPolicyResponse>
Applies a repository policy to the specified repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.
startImageScan({required ImageIdentifier imageId, required String repositoryName, String? registryId}) Future<StartImageScanResponse>
Starts an image vulnerability scan. An image scan can only be started once per day on an individual image. This limit includes if an image was scanned on initial push. For more information, see Image Scanning in the Amazon Elastic Container Registry User Guide.
startLifecyclePolicyPreview({required String repositoryName, String? lifecyclePolicyText, String? registryId}) Future<StartLifecyclePolicyPreviewResponse>
Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
tagResource({required String resourceArn, required List<Tag> tags}) Future<void>
Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Deletes specified tags from a resource.
uploadLayerPart({required Uint8List layerPartBlob, required int partFirstByte, required int partLastByte, required String repositoryName, required String uploadId, String? registryId}) Future<UploadLayerPartResponse>
Uploads an image layer part to Amazon ECR.

Operators

operator ==(Object other) bool
The equality operator.
inherited