pub struct Client { /* 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.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_ecrpublic::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_ecrpublic::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the BatchCheckLayerAvailability operation has
a Client::batch_check_layer_availability, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.batch_check_layer_availability()
.registry_id("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn batch_check_layer_availability(
&self,
) -> BatchCheckLayerAvailabilityFluentBuilder
pub fn batch_check_layer_availability( &self, ) -> BatchCheckLayerAvailabilityFluentBuilder
Constructs a fluent builder for the BatchCheckLayerAvailability operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, 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>):
required: trueThe name of the repository that’s associated with the image layers to check.
layer_digests(impl Into<String>)/set_layer_digests(Option<Vec::<String>>):
required: trueThe digests of the image layers to check.
- On success, responds with
BatchCheckLayerAvailabilityOutputwith field(s):layers(Option<Vec::<Layer>>):A list of image layer objects that correspond to the image layer references in the request.
failures(Option<Vec::<LayerFailure>>):Any failures associated with the call.
- On failure, responds with
SdkError<BatchCheckLayerAvailabilityError>
Source§impl Client
impl Client
Sourcepub fn batch_delete_image(&self) -> BatchDeleteImageFluentBuilder
pub fn batch_delete_image(&self) -> BatchDeleteImageFluentBuilder
Constructs a fluent builder for the BatchDeleteImage operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, that’s 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>):
required: trueThe repository in a public registry that contains the image to delete.
image_ids(ImageIdentifier)/set_image_ids(Option<Vec::<ImageIdentifier>>):
required: trueA 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>
Source§impl Client
impl Client
Sourcepub fn complete_layer_upload(&self) -> CompleteLayerUploadFluentBuilder
pub fn complete_layer_upload(&self) -> CompleteLayerUploadFluentBuilder
Constructs a fluent builder for the CompleteLayerUpload operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, associated with the registry where layers are uploaded. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe name of the repository in a public registry to associate with the image layer.
upload_id(impl Into<String>)/set_upload_id(Option<String>):
required: trueThe upload ID from a previous
InitiateLayerUploadoperation to associate with the image layer.layer_digests(impl Into<String>)/set_layer_digests(Option<Vec::<String>>):
required: trueThe
sha256digest of the image layer.
- On success, responds with
CompleteLayerUploadOutputwith field(s):registry_id(Option<String>):The public registry ID that’s associated with the request.
repository_name(Option<String>):The repository name that’s associated with the request.
upload_id(Option<String>):The upload ID that’s associated with the layer.
layer_digest(Option<String>):The
sha256digest of the image layer.
- On failure, responds with
SdkError<CompleteLayerUploadError>
Source§impl Client
impl Client
Sourcepub fn create_repository(&self) -> CreateRepositoryFluentBuilder
pub fn create_repository(&self) -> CreateRepositoryFluentBuilder
Constructs a fluent builder for the CreateRepository operation.
- The fluent builder is configurable:
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name can be specified on its own (for example
nginx-web-app) or prepended with a namespace to group the repository into a category (for exampleproject-a/nginx-web-app).catalog_data(RepositoryCatalogDataInput)/set_catalog_data(Option<RepositoryCatalogDataInput>):
required: falseThe details about the repository that are publicly visible in the Amazon ECR Public Gallery.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe metadata that you apply to each repository to help categorize and organize your repositories. Each tag consists of a key and an optional value. You define both of them. 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>
Source§impl Client
impl Client
Sourcepub fn delete_repository(&self) -> DeleteRepositoryFluentBuilder
pub fn delete_repository(&self) -> DeleteRepositoryFluentBuilder
Constructs a fluent builder for the DeleteRepository operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe name of the repository to delete.
force(bool)/set_force(Option<bool>):
required: falseThe force option can be used to delete a repository that contains images. If the force option is not used, the repository must be empty prior to deletion.
- On success, responds with
DeleteRepositoryOutputwith field(s):repository(Option<Repository>):The repository that was deleted.
- On failure, responds with
SdkError<DeleteRepositoryError>
Source§impl Client
impl Client
Sourcepub fn delete_repository_policy(&self) -> DeleteRepositoryPolicyFluentBuilder
pub fn delete_repository_policy(&self) -> DeleteRepositoryPolicyFluentBuilder
Constructs a fluent builder for the DeleteRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe name of the repository that’s associated with the repository policy to delete.
- On success, responds with
DeleteRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID that’s associated with the request.
repository_name(Option<String>):The repository name that’s associated with the request.
policy_text(Option<String>):The JSON repository policy that was deleted from the repository.
- On failure, responds with
SdkError<DeleteRepositoryPolicyError>
Source§impl Client
impl Client
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>):
required: falseThe Amazon Web Services account ID that’s associated with the public registry that contains the repository where images are described. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe name of the repository that contains the image tag details to describe.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
nextTokenvalue that’s 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. If there are no more results to return, this value isnull. If you specify images withimageIds, you can’t use this option.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of repository results that’s returned by
DescribeImageTagsin paginated output. When this parameter is used,DescribeImageTagsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. You can see the remaining results of the initial request by sending anotherDescribeImageTagsrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeImageTagsreturns up to 100 results and anextTokenvalue, if applicable. If you specify images withimageIds, you can’t use this option.
- 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, you can use this value to retrieve the next page of results. If there are no more results to return, this value isnull.
- On failure, responds with
SdkError<DescribeImageTagsError>
Source§impl Client
impl Client
Sourcepub fn describe_images(&self) -> DescribeImagesFluentBuilder
pub fn describe_images(&self) -> DescribeImagesFluentBuilder
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>):
required: falseThe Amazon Web Services account ID that’s associated with the public registry that contains the repository where images are described. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe repository that contains the images to describe.
image_ids(ImageIdentifier)/set_image_ids(Option<Vec::<ImageIdentifier>>):
required: falseThe list of image IDs for the requested repository.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe
nextTokenvalue that’s 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. If there are no more results to return, this value isnull. If you specify images withimageIds, you can’t use this option.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of repository results that’s returned by
DescribeImagesin paginated output. When this parameter is used,DescribeImagesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. You can see the remaining results of the initial request by sending anotherDescribeImagesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeImagesreturns up to 100 results and anextTokenvalue, if applicable. If you specify images withimageIds, you can’t use this option.
- 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, you can use this value to retrieve the next page of results. If there are no more results to return, this value isnull.
- On failure, responds with
SdkError<DescribeImagesError>
Source§impl Client
impl Client
Sourcepub fn describe_registries(&self) -> DescribeRegistriesFluentBuilder
pub fn describe_registries(&self) -> DescribeRegistriesFluentBuilder
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>):
required: falseThe
nextTokenvalue that’s 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. If there are no more results to return, this value isnull.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>):
required: falseThe maximum number of repository results that’s 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 isn’t used, thenDescribeRegistriesreturns up to 100 results and anextTokenvalue, if applicable.
- On success, responds with
DescribeRegistriesOutputwith field(s):registries(Vec::<Registry>):An object that contains the details for a public registry.
next_token(Option<String>):The
nextTokenvalue to include in a futureDescribeRepositoriesrequest. If the results of aDescribeRepositoriesrequest exceedmaxResults, you can use this value to retrieve the next page of results. If there are no more results, this value isnull.
- On failure, responds with
SdkError<DescribeRegistriesError>
Source§impl Client
impl Client
Sourcepub fn describe_repositories(&self) -> DescribeRepositoriesFluentBuilder
pub fn describe_repositories(&self) -> DescribeRepositoriesFluentBuilder
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>):
required: falseThe Amazon Web Services account ID that’s 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(impl Into<String>)/set_repository_names(Option<Vec::<String>>):
required: falseA 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>):
required: falseThe
nextTokenvalue that’s 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. If there are no more results to return, this value isnull. If you specify repositories withrepositoryNames, you can’t use this option.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>):
required: falseThe maximum number of repository results that’s returned by
DescribeRepositoriesin paginated output. When this parameter is used,DescribeRepositoriesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. You can see the remaining results of the initial request by sending anotherDescribeRepositoriesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeRepositoriesreturns up to 100 results and anextTokenvalue, if applicable. If you specify repositories withrepositoryNames, you can’t use this option.
- 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. If there are no more results to return, this value isnull.
- On failure, responds with
SdkError<DescribeRepositoriesError>
Source§impl Client
impl Client
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>
Source§impl Client
impl Client
Sourcepub fn get_registry_catalog_data(&self) -> GetRegistryCatalogDataFluentBuilder
pub fn get_registry_catalog_data(&self) -> GetRegistryCatalogDataFluentBuilder
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>
Source§impl Client
impl Client
Sourcepub fn get_repository_catalog_data(
&self,
) -> GetRepositoryCatalogDataFluentBuilder
pub fn get_repository_catalog_data( &self, ) -> GetRepositoryCatalogDataFluentBuilder
Constructs a fluent builder for the GetRepositoryCatalogData operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe 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>
Source§impl Client
impl Client
Sourcepub fn get_repository_policy(&self) -> GetRepositoryPolicyFluentBuilder
pub fn get_repository_policy(&self) -> GetRepositoryPolicyFluentBuilder
Constructs a fluent builder for the GetRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe name of the repository with the policy to retrieve.
- On success, responds with
GetRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID that’s associated with the request.
repository_name(Option<String>):The repository name that’s associated with the request.
policy_text(Option<String>):The repository policy text that’s associated with the repository. The policy text will be in JSON format.
- On failure, responds with
SdkError<GetRepositoryPolicyError>
Source§impl Client
impl Client
Sourcepub fn initiate_layer_upload(&self) -> InitiateLayerUploadFluentBuilder
pub fn initiate_layer_upload(&self) -> InitiateLayerUploadFluentBuilder
Constructs a fluent builder for the InitiateLayerUpload operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, that’s 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>):
required: trueThe name of the repository that you want to upload layers to.
- 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>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the resource to list the tags for. 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>
Source§impl Client
impl Client
Sourcepub fn put_image(&self) -> PutImageFluentBuilder
pub fn put_image(&self) -> PutImageFluentBuilder
Constructs a fluent builder for the PutImage operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, that’s associated with the public registry that contains the repository where the image is put. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe name of the repository where the image is put.
image_manifest(impl Into<String>)/set_image_manifest(Option<String>):
required: trueThe image manifest that corresponds to the image to be uploaded.
image_manifest_media_type(impl Into<String>)/set_image_manifest_media_type(Option<String>):
required: falseThe media type of the image manifest. If you push an image manifest that doesn’t contain the
mediaTypefield, you must specify theimageManifestMediaTypein the request.image_tag(impl Into<String>)/set_image_tag(Option<String>):
required: falseThe 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>):
required: falseThe image digest of the image manifest that corresponds to the image.
- On success, responds with
PutImageOutputwith field(s):image(Option<Image>):Details of the image uploaded.
- On failure, responds with
SdkError<PutImageError>
Source§impl Client
impl Client
Sourcepub fn put_registry_catalog_data(&self) -> PutRegistryCatalogDataFluentBuilder
pub fn put_registry_catalog_data(&self) -> PutRegistryCatalogDataFluentBuilder
Constructs a fluent builder for the PutRegistryCatalogData operation.
- The fluent builder is configurable:
display_name(impl Into<String>)/set_display_name(Option<String>):
required: falseThe 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>
Source§impl Client
impl Client
Sourcepub fn put_repository_catalog_data(
&self,
) -> PutRepositoryCatalogDataFluentBuilder
pub fn put_repository_catalog_data( &self, ) -> PutRepositoryCatalogDataFluentBuilder
Constructs a fluent builder for the PutRepositoryCatalogData operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe name of the repository to create or update the catalog data for.
catalog_data(RepositoryCatalogDataInput)/set_catalog_data(Option<RepositoryCatalogDataInput>):
required: trueAn 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>
Source§impl Client
impl Client
Sourcepub fn set_repository_policy(&self) -> SetRepositoryPolicyFluentBuilder
pub fn set_repository_policy(&self) -> SetRepositoryPolicyFluentBuilder
Constructs a fluent builder for the SetRepositoryPolicy operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID that’s 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>):
required: trueThe name of the repository to receive the policy.
policy_text(impl Into<String>)/set_policy_text(Option<String>):
required: trueThe 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(Option<bool>):
required: falseIf the policy that you want to set on a repository policy would prevent you from setting another policy in the future, you must force the
SetRepositoryPolicyoperation. This prevents accidental repository lockouts.
- On success, responds with
SetRepositoryPolicyOutputwith field(s):registry_id(Option<String>):The registry ID that’s associated with the request.
repository_name(Option<String>):The repository name that’s associated with the request.
policy_text(Option<String>):The JSON repository policy text that’s applied to the repository.
- On failure, responds with
SdkError<SetRepositoryPolicyError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to add tags to. Currently, the supported resource is an Amazon ECR Public repository.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueThe 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>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resource is an Amazon ECR Public repository.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe keys of the tags to be removed.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn upload_layer_part(&self) -> UploadLayerPartFluentBuilder
pub fn upload_layer_part(&self) -> UploadLayerPartFluentBuilder
Constructs a fluent builder for the UploadLayerPart operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: falseThe Amazon Web Services account ID, or registry alias, that’s associated with the registry that you’re uploading layer parts to. If you do not specify a registry, the default public registry is assumed.
repository_name(impl Into<String>)/set_repository_name(Option<String>):
required: trueThe name of the repository that you’re uploading layer parts to.
upload_id(impl Into<String>)/set_upload_id(Option<String>):
required: trueThe upload ID from a previous
InitiateLayerUploadoperation to associate with the layer part upload.part_first_byte(i64)/set_part_first_byte(Option<i64>):
required: trueThe position of the first byte of the layer part witin the overall image layer.
part_last_byte(i64)/set_part_last_byte(Option<i64>):
required: trueThe position of the last byte of the layer part within the overall image layer.
layer_part_blob(Blob)/set_layer_part_blob(Option<Blob>):
required: trueThe base64-encoded layer part payload.
- On success, responds with
UploadLayerPartOutputwith field(s):registry_id(Option<String>):The registry ID that’s associated with the request.
repository_name(Option<String>):The repository name that’s associated with the request.
upload_id(Option<String>):The upload ID that’s associated with the request.
last_byte_received(Option<i64>):The integer value of the last byte that’s received in the request.
- On failure, responds with
SdkError<UploadLayerPartError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);