Struct aws_sdk_ecrpublic::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Client for Amazon Elastic Container Registry Public
Client for invoking operations on Amazon Elastic Container Registry Public. Each operation on Amazon Elastic Container Registry Public is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_ecrpublic::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_ecrpublic::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_ecrpublic::Client::from_conf(config);Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the BatchCheckLayerAvailability operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository that is associated with the image layers to check.
layer_digests(Vec<String>)/set_layer_digests(Option<Vec<String>>):The digests of the image layers to check.
- On success, responds with
BatchCheckLayerAvailabilityOutputwith field(s):layers(Option<Vec<Layer>>):A list of image layer objects corresponding to the image layer references in the request.
failures(Option<Vec<LayerFailure>>):Any failures associated with the call.
- On failure, responds with
SdkError<BatchCheckLayerAvailabilityError>
Constructs a fluent builder for the BatchDeleteImage operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The repository in a public registry that contains the image to delete.
image_ids(Vec<ImageIdentifier>)/set_image_ids(Option<Vec<ImageIdentifier>>):A list of image ID references that correspond to images to delete. The format of the
imageIdsreference isimageTag=tagorimageDigest=digest.
- On success, responds with
BatchDeleteImageOutputwith field(s):image_ids(Option<Vec<ImageIdentifier>>):The image IDs of the deleted images.
failures(Option<Vec<ImageFailure>>):Any failures associated with the call.
- On failure, responds with
SdkError<BatchDeleteImageError>
Constructs a fluent builder for the CompleteLayerUpload operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry to which to upload layers. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository in a public registry to associate with the image layer.
upload_id(impl Into<String>)/set_upload_id(Option<String>):The upload ID from a previous
InitiateLayerUploadoperation to associate with the image layer.layer_digests(Vec<String>)/set_layer_digests(Option<Vec<String>>):The
sha256digest of the image layer.
- On success, responds with
CompleteLayerUploadOutputwith field(s):registry_id(Option<String>):The public registry ID associated with the request.
repository_name(Option<String>):The repository name associated with the request.
upload_id(Option<String>):The upload ID associated with the layer.
layer_digest(Option<String>):The
sha256digest of the image layer.
- On failure, responds with
SdkError<CompleteLayerUploadError>
Constructs a fluent builder for the CreateRepository operation.
- The fluent builder is configurable:
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name may be specified on its own (such as
nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app).catalog_data(RepositoryCatalogDataInput)/set_catalog_data(Option<RepositoryCatalogDataInput>):The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
- On success, responds with
CreateRepositoryOutputwith field(s):repository(Option<Repository>):The repository that was created.
catalog_data(Option<RepositoryCatalogData>):The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
- On failure, responds with
SdkError<CreateRepositoryError>
Constructs a fluent builder for the DeleteRepository operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository to delete. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to delete.
force(bool)/set_force(bool):If a repository contains images, forces the deletion.
- On success, responds with
DeleteRepositoryOutputwith field(s):repository(Option<Repository>):The repository that was deleted.
- On failure, responds with
SdkError<DeleteRepositoryError>
Constructs a fluent builder for the DeleteRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository policy to delete. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository that is associated with the repository policy to delete.
- On success, responds with
DeleteRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID associated with the request.
repository_name(Option<String>):The repository name associated with the request.
policy_text(Option<String>):The JSON repository policy that was deleted from the repository.
- On failure, responds with
SdkError<DeleteRepositoryPolicyError>
Constructs a fluent builder for the DescribeImages operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The repository that contains the images to describe.
image_ids(Vec<ImageIdentifier>)/set_image_ids(Option<Vec<ImageIdentifier>>):The list of image IDs for the requested repository.
next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from a previous paginatedDescribeImagesrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return. This option cannot be used when you specify images withimageIds.max_results(i32)/set_max_results(Option<i32>):The maximum number of repository results returned by
DescribeImagesin paginated output. When this parameter is used,DescribeImagesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeImagesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImagesreturns up to 100 results and anextTokenvalue, if applicable. This option cannot be used when you specify images withimageIds.
- On success, responds with
DescribeImagesOutputwith field(s):image_details(Option<Vec<ImageDetail>>):A list of
ImageDetailobjects that contain data about the image.next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeImagesrequest. When the results of aDescribeImagesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<DescribeImagesError>
Constructs a fluent builder for the DescribeImageTags operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository that contains the image tag details to describe.
next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from a previous paginatedDescribeImageTagsrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return. This option cannot be used when you specify images withimageIds.max_results(i32)/set_max_results(Option<i32>):The maximum number of repository results returned by
DescribeImageTagsin paginated output. When this parameter is used,DescribeImageTagsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeImageTagsrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImageTagsreturns up to 100 results and anextTokenvalue, if applicable. This option cannot be used when you specify images withimageIds.
- On success, responds with
DescribeImageTagsOutputwith field(s):image_tag_details(Option<Vec<ImageTagDetail>>):The image tag details for the images in the requested repository.
next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeImageTagsrequest. When the results of aDescribeImageTagsrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<DescribeImageTagsError>
Constructs a fluent builder for the DescribeRegistries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from a previous paginatedDescribeRegistriesrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of repository results returned by
DescribeRegistriesin paginated output. When this parameter is used,DescribeRegistriesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeRegistriesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenDescribeRegistriesreturns up to 100 results and anextTokenvalue, if applicable.
- On success, responds with
DescribeRegistriesOutputwith field(s):registries(Option<Vec<Registry>>):An object containing the details for a public registry.
next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeRepositoriesrequest. When the results of aDescribeRepositoriesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<DescribeRegistriesError>
Constructs a fluent builder for the DescribeRepositories operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.
repository_names(Vec<String>)/set_repository_names(Option<Vec<String>>):A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
next_token(impl Into<String>)/set_next_token(Option<String>):The
nextTokenvalue returned from a previous paginatedDescribeRepositoriesrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return. This option cannot be used when you specify repositories withrepositoryNames.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
max_results(i32)/set_max_results(Option<i32>):The maximum number of repository results returned by
DescribeRepositoriesin paginated output. When this parameter is used,DescribeRepositoriesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeRepositoriesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenDescribeRepositoriesreturns up to 100 results and anextTokenvalue, if applicable. This option cannot be used when you specify repositories withrepositoryNames.
- On success, responds with
DescribeRepositoriesOutputwith field(s):repositories(Option<Vec<Repository>>):A list of repository objects corresponding to valid repositories.
next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeRepositoriesrequest. When the results of aDescribeRepositoriesrequest exceedmaxResults, this value can be used to retrieve the next page of results. This value isnullwhen there are no more results to return.
- On failure, responds with
SdkError<DescribeRepositoriesError>
Constructs a fluent builder for the GetAuthorizationToken operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetAuthorizationTokenOutputwith field(s):authorization_data(Option<AuthorizationData>):An authorization token data object that corresponds to a public registry.
- On failure, responds with
SdkError<GetAuthorizationTokenError>
Constructs a fluent builder for the GetRegistryCatalogData operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetRegistryCatalogDataOutputwith field(s):registry_catalog_data(Option<RegistryCatalogData>):The catalog metadata for the public registry.
- On failure, responds with
SdkError<GetRegistryCatalogDataError>
Constructs a fluent builder for the GetRepositoryCatalogData operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to retrieve the catalog metadata for.
- On success, responds with
GetRepositoryCatalogDataOutputwith field(s):catalog_data(Option<RepositoryCatalogData>):The catalog metadata for the repository.
- On failure, responds with
SdkError<GetRepositoryCatalogDataError>
Constructs a fluent builder for the GetRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository with the policy to retrieve.
- On success, responds with
GetRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID associated with the request.
repository_name(Option<String>):The repository name associated with the request.
policy_text(Option<String>):The repository policy text associated with the repository. The policy text will be in JSON format.
- On failure, responds with
SdkError<GetRepositoryPolicyError>
Constructs a fluent builder for the InitiateLayerUpload operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry to which you intend to upload layers. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to which you intend to upload layers.
- On success, responds with
InitiateLayerUploadOutputwith field(s):upload_id(Option<String>):The upload ID for the layer upload. This parameter is passed to further
UploadLayerPartandCompleteLayerUploadoperations.part_size(Option<i64>):The size, in bytes, that Amazon ECR expects future layer part uploads to be.
- On failure, responds with
SdkError<InitiateLayerUploadError>
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the supported resource is an Amazon ECR Public repository.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec<Tag>>):The tags for the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Constructs a fluent builder for the PutImage operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry that contains the repository in which to put the image. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository in which to put the image.
image_manifest(impl Into<String>)/set_image_manifest(Option<String>):The image manifest corresponding to the image to be uploaded.
image_manifest_media_type(impl Into<String>)/set_image_manifest_media_type(Option<String>):The media type of the image manifest. If you push an image manifest that does not contain the
mediaTypefield, you must specify theimageManifestMediaTypein the request.image_tag(impl Into<String>)/set_image_tag(Option<String>):The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.
image_digest(impl Into<String>)/set_image_digest(Option<String>):The image digest of the image manifest corresponding to the image.
- On success, responds with
PutImageOutputwith field(s):image(Option<Image>):Details of the image uploaded.
- On failure, responds with
SdkError<PutImageError>
Constructs a fluent builder for the PutRegistryCatalogData operation.
- The fluent builder is configurable:
display_name(impl Into<String>)/set_display_name(Option<String>):The display name for a public registry. The display name is shown as the repository author in the Amazon ECR Public Gallery.
The registry display name is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
- On success, responds with
PutRegistryCatalogDataOutputwith field(s):registry_catalog_data(Option<RegistryCatalogData>):The catalog data for the public registry.
- On failure, responds with
SdkError<PutRegistryCatalogDataError>
Constructs a fluent builder for the PutRepositoryCatalogData operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the public registry the repository is in. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to create or update the catalog data for.
catalog_data(RepositoryCatalogDataInput)/set_catalog_data(Option<RepositoryCatalogDataInput>):An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
- On success, responds with
PutRepositoryCatalogDataOutputwith field(s):catalog_data(Option<RepositoryCatalogData>):The catalog data for the repository.
- On failure, responds with
SdkError<PutRepositoryCatalogDataError>
Constructs a fluent builder for the SetRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to receive the policy.
policy_text(impl Into<String>)/set_policy_text(Option<String>):The JSON repository policy text to apply to the repository. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.
force(bool)/set_force(bool):If the policy you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the
SetRepositoryPolicyoperation. This is intended to prevent accidental repository lock outs.
- On success, responds with
SetRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID associated with the request.
repository_name(Option<String>):The repository name associated with the request.
policy_text(Option<String>):The JSON repository policy text applied to the repository.
- On failure, responds with
SdkError<SetRepositoryPolicyError>
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, the supported resource is an Amazon ECR Public repository.
tags(Vec<Tag>)/set_tags(Option<Vec<Tag>>):The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon Resource Name (ARN) of the resource from which to delete tags. Currently, the supported resource is an Amazon ECR Public repository.
tag_keys(Vec<String>)/set_tag_keys(Option<Vec<String>>):The keys of the tags to be removed.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Constructs a fluent builder for the UploadLayerPart operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):The AWS account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):The name of the repository to which you are uploading layer parts.
upload_id(impl Into<String>)/set_upload_id(Option<String>):The upload ID from a previous
InitiateLayerUploadoperation to associate with the layer part upload.part_first_byte(i64)/set_part_first_byte(Option<i64>):The position of the first byte of the layer part witin the overall image layer.
part_last_byte(i64)/set_part_last_byte(Option<i64>):The position of the last byte of the layer part within the overall image layer.
layer_part_blob(Blob)/set_layer_part_blob(Option<Blob>):The base64-encoded layer part payload.
- On success, responds with
UploadLayerPartOutputwith field(s):registry_id(Option<String>):The registry ID associated with the request.
repository_name(Option<String>):The repository name associated with the request.
upload_id(Option<String>):The upload ID associated with the request.
last_byte_received(Option<i64>):The integer value of the last byte received in the request.
- On failure, responds with
SdkError<UploadLayerPartError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more