@Generated(value="software.amazon.awssdk:codegen") public interface ECRAsyncClient extends SdkClient, SdkAutoCloseable
builder()
method.
Amazon EC2 Container Registry (Amazon ECR) is a managed Docker registry service. Customers can use the familiar Docker CLI to push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon ECR supports private Docker repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can access repositories and images. Developers can use the Docker CLI to author and manage images.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
default CompletableFuture<BatchCheckLayerAvailabilityResponse> |
batchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
|
default CompletableFuture<BatchCheckLayerAvailabilityResponse> |
batchCheckLayerAvailability(Consumer<BatchCheckLayerAvailabilityRequest.Builder> batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
|
default CompletableFuture<BatchDeleteImageResponse> |
batchDeleteImage(BatchDeleteImageRequest batchDeleteImageRequest)
Deletes a list of specified images within a specified repository.
|
default CompletableFuture<BatchDeleteImageResponse> |
batchDeleteImage(Consumer<BatchDeleteImageRequest.Builder> batchDeleteImageRequest)
Deletes a list of specified images within a specified repository.
|
default CompletableFuture<BatchGetImageResponse> |
batchGetImage(BatchGetImageRequest batchGetImageRequest)
Gets detailed information for specified images within a specified repository.
|
default CompletableFuture<BatchGetImageResponse> |
batchGetImage(Consumer<BatchGetImageRequest.Builder> batchGetImageRequest)
Gets detailed information for specified images within a specified repository.
|
static ECRAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ECRAsyncClient . |
default CompletableFuture<CompleteLayerUploadResponse> |
completeLayerUpload(CompleteLayerUploadRequest completeLayerUploadRequest)
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and
upload ID.
|
default CompletableFuture<CompleteLayerUploadResponse> |
completeLayerUpload(Consumer<CompleteLayerUploadRequest.Builder> completeLayerUploadRequest)
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and
upload ID.
|
static ECRAsyncClient |
create()
Create a
ECRAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from
the DefaultCredentialsProvider . |
default CompletableFuture<CreateRepositoryResponse> |
createRepository(Consumer<CreateRepositoryRequest.Builder> createRepositoryRequest)
Creates an image repository.
|
default CompletableFuture<CreateRepositoryResponse> |
createRepository(CreateRepositoryRequest createRepositoryRequest)
Creates an image repository.
|
default CompletableFuture<DeleteLifecyclePolicyResponse> |
deleteLifecyclePolicy(Consumer<DeleteLifecyclePolicyRequest.Builder> deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
|
default CompletableFuture<DeleteLifecyclePolicyResponse> |
deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
|
default CompletableFuture<DeleteRepositoryResponse> |
deleteRepository(Consumer<DeleteRepositoryRequest.Builder> deleteRepositoryRequest)
Deletes an existing image repository.
|
default CompletableFuture<DeleteRepositoryResponse> |
deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest)
Deletes an existing image repository.
|
default CompletableFuture<DeleteRepositoryPolicyResponse> |
deleteRepositoryPolicy(Consumer<DeleteRepositoryPolicyRequest.Builder> deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
|
default CompletableFuture<DeleteRepositoryPolicyResponse> |
deleteRepositoryPolicy(DeleteRepositoryPolicyRequest deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
|
default CompletableFuture<DescribeImagesResponse> |
describeImages(Consumer<DescribeImagesRequest.Builder> describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
|
default CompletableFuture<DescribeImagesResponse> |
describeImages(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
|
default DescribeImagesPublisher |
describeImagesPaginator(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
|
default CompletableFuture<DescribeRepositoriesResponse> |
describeRepositories()
Describes image repositories in a registry.
|
default CompletableFuture<DescribeRepositoriesResponse> |
describeRepositories(Consumer<DescribeRepositoriesRequest.Builder> describeRepositoriesRequest)
Describes image repositories in a registry.
|
default CompletableFuture<DescribeRepositoriesResponse> |
describeRepositories(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
|
default DescribeRepositoriesPublisher |
describeRepositoriesPaginator()
Describes image repositories in a registry.
|
default DescribeRepositoriesPublisher |
describeRepositoriesPaginator(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
|
default CompletableFuture<GetAuthorizationTokenResponse> |
getAuthorizationToken()
Retrieves a token that is valid for a specified registry for 12 hours.
|
default CompletableFuture<GetAuthorizationTokenResponse> |
getAuthorizationToken(Consumer<GetAuthorizationTokenRequest.Builder> getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours.
|
default CompletableFuture<GetAuthorizationTokenResponse> |
getAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours.
|
default CompletableFuture<GetDownloadUrlForLayerResponse> |
getDownloadUrlForLayer(Consumer<GetDownloadUrlForLayerRequest.Builder> getDownloadUrlForLayerRequest)
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
|
default CompletableFuture<GetDownloadUrlForLayerResponse> |
getDownloadUrlForLayer(GetDownloadUrlForLayerRequest getDownloadUrlForLayerRequest)
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
|
default CompletableFuture<GetLifecyclePolicyResponse> |
getLifecyclePolicy(Consumer<GetLifecyclePolicyRequest.Builder> getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
|
default CompletableFuture<GetLifecyclePolicyResponse> |
getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
|
default CompletableFuture<GetLifecyclePolicyPreviewResponse> |
getLifecyclePolicyPreview(Consumer<GetLifecyclePolicyPreviewRequest.Builder> getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
|
default CompletableFuture<GetLifecyclePolicyPreviewResponse> |
getLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
|
default CompletableFuture<GetRepositoryPolicyResponse> |
getRepositoryPolicy(Consumer<GetRepositoryPolicyRequest.Builder> getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
|
default CompletableFuture<GetRepositoryPolicyResponse> |
getRepositoryPolicy(GetRepositoryPolicyRequest getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
|
default CompletableFuture<InitiateLayerUploadResponse> |
initiateLayerUpload(Consumer<InitiateLayerUploadRequest.Builder> initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
|
default CompletableFuture<InitiateLayerUploadResponse> |
initiateLayerUpload(InitiateLayerUploadRequest initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
|
default CompletableFuture<ListImagesResponse> |
listImages(Consumer<ListImagesRequest.Builder> listImagesRequest)
Lists all the image IDs for a given repository.
|
default CompletableFuture<ListImagesResponse> |
listImages(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
|
default ListImagesPublisher |
listImagesPaginator(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
|
default CompletableFuture<PutImageResponse> |
putImage(Consumer<PutImageRequest.Builder> putImageRequest)
Creates or updates the image manifest and tags associated with an image.
|
default CompletableFuture<PutImageResponse> |
putImage(PutImageRequest putImageRequest)
Creates or updates the image manifest and tags associated with an image.
|
default CompletableFuture<PutLifecyclePolicyResponse> |
putLifecyclePolicy(Consumer<PutLifecyclePolicyRequest.Builder> putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
|
default CompletableFuture<PutLifecyclePolicyResponse> |
putLifecyclePolicy(PutLifecyclePolicyRequest putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
|
default CompletableFuture<SetRepositoryPolicyResponse> |
setRepositoryPolicy(Consumer<SetRepositoryPolicyRequest.Builder> setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
|
default CompletableFuture<SetRepositoryPolicyResponse> |
setRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
|
default CompletableFuture<StartLifecyclePolicyPreviewResponse> |
startLifecyclePolicyPreview(Consumer<StartLifecyclePolicyPreviewRequest.Builder> startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy.
|
default CompletableFuture<StartLifecyclePolicyPreviewResponse> |
startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy.
|
default CompletableFuture<UploadLayerPartResponse> |
uploadLayerPart(Consumer<UploadLayerPartRequest.Builder> uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
|
default CompletableFuture<UploadLayerPartResponse> |
uploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
|
serviceName
close
static final String SERVICE_NAME
static ECRAsyncClient create()
ECRAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from
the DefaultCredentialsProvider
.static ECRAsyncClientBuilder builder()
ECRAsyncClient
.default CompletableFuture<BatchCheckLayerAvailabilityResponse> batchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
batchCheckLayerAvailabilityRequest
- default CompletableFuture<BatchCheckLayerAvailabilityResponse> batchCheckLayerAvailability(Consumer<BatchCheckLayerAvailabilityRequest.Builder> batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
BatchCheckLayerAvailabilityRequest.Builder
avoiding the need to create one manually via BatchCheckLayerAvailabilityRequest.builder()
batchCheckLayerAvailabilityRequest
- a Consumer
that will call methods on BatchCheckLayerAvailabilityRequest.Builder
.default CompletableFuture<BatchDeleteImageResponse> batchDeleteImage(BatchDeleteImageRequest batchDeleteImageRequest)
Deletes a list of specified images within a specified repository. Images are specified with either
imageTag
or imageDigest
.
You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.
You can completely delete an image (and all of its tags) by specifying the image's digest in your request.
batchDeleteImageRequest
- Deletes specified images within a specified repository. Images are specified with either the
imageTag
or imageDigest
.default CompletableFuture<BatchDeleteImageResponse> batchDeleteImage(Consumer<BatchDeleteImageRequest.Builder> batchDeleteImageRequest)
Deletes a list of specified images within a specified repository. Images are specified with either
imageTag
or imageDigest
.
You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.
You can completely delete an image (and all of its tags) by specifying the image's digest in your request.
BatchDeleteImageRequest.Builder
avoiding the need
to create one manually via BatchDeleteImageRequest.builder()
batchDeleteImageRequest
- a Consumer
that will call methods on BatchDeleteImageRequest.Builder
.default CompletableFuture<BatchGetImageResponse> batchGetImage(BatchGetImageRequest batchGetImageRequest)
Gets detailed information for specified images within a specified repository. Images are specified with either
imageTag
or imageDigest
.
batchGetImageRequest
- default CompletableFuture<BatchGetImageResponse> batchGetImage(Consumer<BatchGetImageRequest.Builder> batchGetImageRequest)
Gets detailed information for specified images within a specified repository. Images are specified with either
imageTag
or imageDigest
.
BatchGetImageRequest.Builder
avoiding the need to
create one manually via BatchGetImageRequest.builder()
batchGetImageRequest
- a Consumer
that will call methods on BatchGetImageRequest.Builder
.default CompletableFuture<CompleteLayerUploadResponse> completeLayerUpload(CompleteLayerUploadRequest completeLayerUploadRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
completeLayerUploadRequest
- default CompletableFuture<CompleteLayerUploadResponse> completeLayerUpload(Consumer<CompleteLayerUploadRequest.Builder> completeLayerUploadRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
CompleteLayerUploadRequest.Builder
avoiding the
need to create one manually via CompleteLayerUploadRequest.builder()
completeLayerUploadRequest
- a Consumer
that will call methods on CompleteLayerUploadRequest.Builder
.default CompletableFuture<CreateRepositoryResponse> createRepository(CreateRepositoryRequest createRepositoryRequest)
Creates an image repository.
createRepositoryRequest
- default CompletableFuture<CreateRepositoryResponse> createRepository(Consumer<CreateRepositoryRequest.Builder> createRepositoryRequest)
Creates an image repository.
CreateRepositoryRequest.Builder
avoiding the need
to create one manually via CreateRepositoryRequest.builder()
createRepositoryRequest
- a Consumer
that will call methods on CreateRepositoryRequest.Builder
.default CompletableFuture<DeleteLifecyclePolicyResponse> deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
deleteLifecyclePolicyRequest
- default CompletableFuture<DeleteLifecyclePolicyResponse> deleteLifecyclePolicy(Consumer<DeleteLifecyclePolicyRequest.Builder> deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
DeleteLifecyclePolicyRequest.Builder
avoiding the
need to create one manually via DeleteLifecyclePolicyRequest.builder()
deleteLifecyclePolicyRequest
- a Consumer
that will call methods on DeleteLifecyclePolicyRequest.Builder
.default CompletableFuture<DeleteRepositoryResponse> deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest)
Deletes an existing image repository. If a repository contains images, you must use the force
option
to delete it.
deleteRepositoryRequest
- force
parameter.default CompletableFuture<DeleteRepositoryResponse> deleteRepository(Consumer<DeleteRepositoryRequest.Builder> deleteRepositoryRequest)
Deletes an existing image repository. If a repository contains images, you must use the force
option
to delete it.
DeleteRepositoryRequest.Builder
avoiding the need
to create one manually via DeleteRepositoryRequest.builder()
deleteRepositoryRequest
- a Consumer
that will call methods on DeleteRepositoryRequest.Builder
.force
parameter.default CompletableFuture<DeleteRepositoryPolicyResponse> deleteRepositoryPolicy(DeleteRepositoryPolicyRequest deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
deleteRepositoryPolicyRequest
- default CompletableFuture<DeleteRepositoryPolicyResponse> deleteRepositoryPolicy(Consumer<DeleteRepositoryPolicyRequest.Builder> deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
DeleteRepositoryPolicyRequest.Builder
avoiding the
need to create one manually via DeleteRepositoryPolicyRequest.builder()
deleteRepositoryPolicyRequest
- a Consumer
that will call methods on DeleteRepositoryPolicyRequest.Builder
.default CompletableFuture<DescribeImagesResponse> describeImages(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
registry. The output of the docker images
command shows the uncompressed image size, so it may
return a larger image size than the image sizes returned by DescribeImages.
describeImagesRequest
- default CompletableFuture<DescribeImagesResponse> describeImages(Consumer<DescribeImagesRequest.Builder> describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
registry. The output of the docker images
command shows the uncompressed image size, so it may
return a larger image size than the image sizes returned by DescribeImages.
DescribeImagesRequest.Builder
avoiding the need to
create one manually via DescribeImagesRequest.builder()
describeImagesRequest
- a Consumer
that will call methods on DescribeImagesRequest.Builder
.default DescribeImagesPublisher describeImagesPaginator(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
registry. The output of the docker images
command shows the uncompressed image size, so it may
return a larger image size than the image sizes returned by DescribeImages.
This is a variant of describeImages(software.amazon.awssdk.services.ecr.model.DescribeImagesRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.ecr.paginators.DescribeImagesPublisher publisher = client.describeImagesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.ecr.paginators.DescribeImagesPublisher publisher = client.describeImagesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.ecr.model.DescribeImagesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.ecr.model.DescribeImagesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeImages(software.amazon.awssdk.services.ecr.model.DescribeImagesRequest)
operation.
describeImagesRequest
- default CompletableFuture<DescribeRepositoriesResponse> describeRepositories(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
describeRepositoriesRequest
- default CompletableFuture<DescribeRepositoriesResponse> describeRepositories()
Describes image repositories in a registry.
default CompletableFuture<DescribeRepositoriesResponse> describeRepositories(Consumer<DescribeRepositoriesRequest.Builder> describeRepositoriesRequest)
Describes image repositories in a registry.
DescribeRepositoriesRequest.Builder
avoiding the
need to create one manually via DescribeRepositoriesRequest.builder()
describeRepositoriesRequest
- a Consumer
that will call methods on DescribeRepositoriesRequest.Builder
.default DescribeRepositoriesPublisher describeRepositoriesPaginator(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
This is a variant of
describeRepositories(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesRequest)
operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.ecr.paginators.DescribeRepositoriesPublisher publisher = client.describeRepositoriesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.ecr.paginators.DescribeRepositoriesPublisher publisher = client.describeRepositoriesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.ecr.model.DescribeRepositoriesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeRepositories(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesRequest)
operation.
describeRepositoriesRequest
- default DescribeRepositoriesPublisher describeRepositoriesPaginator()
Describes image repositories in a registry.
This is a variant of
describeRepositories(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesRequest)
operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.ecr.paginators.DescribeRepositoriesPublisher publisher = client.describeRepositoriesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.ecr.paginators.DescribeRepositoriesPublisher publisher = client.describeRepositoriesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.ecr.model.DescribeRepositoriesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeRepositories(software.amazon.awssdk.services.ecr.model.DescribeRepositoriesRequest)
operation.
default CompletableFuture<GetAuthorizationTokenResponse> getAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the
docker
CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default
registry is assumed.
The authorizationToken
returned for each registry specified is a base64 encoded string that can be
decoded and used in a docker login
command to authenticate to a registry. The AWS CLI offers an
aws ecr get-login
command that simplifies the login process.
getAuthorizationTokenRequest
- default CompletableFuture<GetAuthorizationTokenResponse> getAuthorizationToken()
Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the
docker
CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default
registry is assumed.
The authorizationToken
returned for each registry specified is a base64 encoded string that can be
decoded and used in a docker login
command to authenticate to a registry. The AWS CLI offers an
aws ecr get-login
command that simplifies the login process.
default CompletableFuture<GetAuthorizationTokenResponse> getAuthorizationToken(Consumer<GetAuthorizationTokenRequest.Builder> getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the
docker
CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default
registry is assumed.
The authorizationToken
returned for each registry specified is a base64 encoded string that can be
decoded and used in a docker login
command to authenticate to a registry. The AWS CLI offers an
aws ecr get-login
command that simplifies the login process.
GetAuthorizationTokenRequest.Builder
avoiding the
need to create one manually via GetAuthorizationTokenRequest.builder()
getAuthorizationTokenRequest
- a Consumer
that will call methods on GetAuthorizationTokenRequest.Builder
.default CompletableFuture<GetDownloadUrlForLayerResponse> getDownloadUrlForLayer(GetDownloadUrlForLayerRequest getDownloadUrlForLayerRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
getDownloadUrlForLayerRequest
- default CompletableFuture<GetDownloadUrlForLayerResponse> getDownloadUrlForLayer(Consumer<GetDownloadUrlForLayerRequest.Builder> getDownloadUrlForLayerRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
GetDownloadUrlForLayerRequest.Builder
avoiding the
need to create one manually via GetDownloadUrlForLayerRequest.builder()
getDownloadUrlForLayerRequest
- a Consumer
that will call methods on GetDownloadUrlForLayerRequest.Builder
.default CompletableFuture<GetLifecyclePolicyResponse> getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
getLifecyclePolicyRequest
- default CompletableFuture<GetLifecyclePolicyResponse> getLifecyclePolicy(Consumer<GetLifecyclePolicyRequest.Builder> getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
GetLifecyclePolicyRequest.Builder
avoiding the
need to create one manually via GetLifecyclePolicyRequest.builder()
getLifecyclePolicyRequest
- a Consumer
that will call methods on GetLifecyclePolicyRequest.Builder
.default CompletableFuture<GetLifecyclePolicyPreviewResponse> getLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
getLifecyclePolicyPreviewRequest
- default CompletableFuture<GetLifecyclePolicyPreviewResponse> getLifecyclePolicyPreview(Consumer<GetLifecyclePolicyPreviewRequest.Builder> getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
GetLifecyclePolicyPreviewRequest.Builder
avoiding
the need to create one manually via GetLifecyclePolicyPreviewRequest.builder()
getLifecyclePolicyPreviewRequest
- a Consumer
that will call methods on GetLifecyclePolicyPreviewRequest.Builder
.default CompletableFuture<GetRepositoryPolicyResponse> getRepositoryPolicy(GetRepositoryPolicyRequest getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
getRepositoryPolicyRequest
- default CompletableFuture<GetRepositoryPolicyResponse> getRepositoryPolicy(Consumer<GetRepositoryPolicyRequest.Builder> getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
GetRepositoryPolicyRequest.Builder
avoiding the
need to create one manually via GetRepositoryPolicyRequest.builder()
getRepositoryPolicyRequest
- a Consumer
that will call methods on GetRepositoryPolicyRequest.Builder
.default CompletableFuture<InitiateLayerUploadResponse> initiateLayerUpload(InitiateLayerUploadRequest initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
initiateLayerUploadRequest
- default CompletableFuture<InitiateLayerUploadResponse> initiateLayerUpload(Consumer<InitiateLayerUploadRequest.Builder> initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
InitiateLayerUploadRequest.Builder
avoiding the
need to create one manually via InitiateLayerUploadRequest.builder()
initiateLayerUploadRequest
- a Consumer
that will call methods on InitiateLayerUploadRequest.Builder
.default CompletableFuture<ListImagesResponse> listImages(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
You can filter images based on whether or not they are tagged by setting the tagStatus
parameter to
TAGGED
or UNTAGGED
. For example, you can filter your results to return only
UNTAGGED
images and then pipe that result to a BatchDeleteImage operation to delete them. Or,
you can filter your results to return only TAGGED
images to list all of the tags in your repository.
listImagesRequest
- default CompletableFuture<ListImagesResponse> listImages(Consumer<ListImagesRequest.Builder> listImagesRequest)
Lists all the image IDs for a given repository.
You can filter images based on whether or not they are tagged by setting the tagStatus
parameter to
TAGGED
or UNTAGGED
. For example, you can filter your results to return only
UNTAGGED
images and then pipe that result to a BatchDeleteImage operation to delete them. Or,
you can filter your results to return only TAGGED
images to list all of the tags in your repository.
ListImagesRequest.Builder
avoiding the need to
create one manually via ListImagesRequest.builder()
listImagesRequest
- a Consumer
that will call methods on ListImagesRequest.Builder
.default ListImagesPublisher listImagesPaginator(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
You can filter images based on whether or not they are tagged by setting the tagStatus
parameter to
TAGGED
or UNTAGGED
. For example, you can filter your results to return only
UNTAGGED
images and then pipe that result to a BatchDeleteImage operation to delete them. Or,
you can filter your results to return only TAGGED
images to list all of the tags in your repository.
This is a variant of listImages(software.amazon.awssdk.services.ecr.model.ListImagesRequest)
operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the forEach helper method
software.amazon.awssdk.services.ecr.paginators.ListImagesPublisher publisher = client.listImagesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.ecr.paginators.ListImagesPublisher publisher = client.listImagesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.ecr.model.ListImagesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.ecr.model.ListImagesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listImages(software.amazon.awssdk.services.ecr.model.ListImagesRequest)
operation.
listImagesRequest
- default CompletableFuture<PutImageResponse> putImage(PutImageRequest putImageRequest)
Creates or updates the image manifest and tags associated with an image.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
putImageRequest
- default CompletableFuture<PutImageResponse> putImage(Consumer<PutImageRequest.Builder> putImageRequest)
Creates or updates the image manifest and tags associated with an image.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
PutImageRequest.Builder
avoiding the need to
create one manually via PutImageRequest.builder()
putImageRequest
- a Consumer
that will call methods on PutImageRequest.Builder
.default CompletableFuture<PutLifecyclePolicyResponse> putLifecyclePolicy(PutLifecyclePolicyRequest putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
putLifecyclePolicyRequest
- default CompletableFuture<PutLifecyclePolicyResponse> putLifecyclePolicy(Consumer<PutLifecyclePolicyRequest.Builder> putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
PutLifecyclePolicyRequest.Builder
avoiding the
need to create one manually via PutLifecyclePolicyRequest.builder()
putLifecyclePolicyRequest
- a Consumer
that will call methods on PutLifecyclePolicyRequest.Builder
.default CompletableFuture<SetRepositoryPolicyResponse> setRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
setRepositoryPolicyRequest
- default CompletableFuture<SetRepositoryPolicyResponse> setRepositoryPolicy(Consumer<SetRepositoryPolicyRequest.Builder> setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
SetRepositoryPolicyRequest.Builder
avoiding the
need to create one manually via SetRepositoryPolicyRequest.builder()
setRepositoryPolicyRequest
- a Consumer
that will call methods on SetRepositoryPolicyRequest.Builder
.default CompletableFuture<StartLifecyclePolicyPreviewResponse> startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy. This allows you to see the results before creating the lifecycle policy.
startLifecyclePolicyPreviewRequest
- default CompletableFuture<StartLifecyclePolicyPreviewResponse> startLifecyclePolicyPreview(Consumer<StartLifecyclePolicyPreviewRequest.Builder> startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy. This allows you to see the results before creating the lifecycle policy.
StartLifecyclePolicyPreviewRequest.Builder
avoiding the need to create one manually via StartLifecyclePolicyPreviewRequest.builder()
startLifecyclePolicyPreviewRequest
- a Consumer
that will call methods on StartLifecyclePolicyPreviewRequest.Builder
.default CompletableFuture<UploadLayerPartResponse> uploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
uploadLayerPartRequest
- default CompletableFuture<UploadLayerPartResponse> uploadLayerPart(Consumer<UploadLayerPartRequest.Builder> uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
UploadLayerPartRequest.Builder
avoiding the need
to create one manually via UploadLayerPartRequest.builder()
uploadLayerPartRequest
- a Consumer
that will call methods on UploadLayerPartRequest.Builder
.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.