Struct aws_sdk_ecrpublic::Client
source · 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 Config
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
BatchCheckLayerAvailabilityOutput
with 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
imageIds
reference isimageTag=tag
orimageDigest=digest
.
- On success, responds with
BatchDeleteImageOutput
with 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
InitiateLayerUpload
operation to associate with the image layer.layer_digests(impl Into<String>)
/set_layer_digests(Option<Vec::<String>>)
:
required: trueThe
sha256
digest of the image layer.
- On success, responds with
CompleteLayerUploadOutput
with 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
sha256
digest 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
CreateRepositoryOutput
with 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
DeleteRepositoryOutput
with 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
DeleteRepositoryPolicyOutput
with 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
nextToken
value that’s returned from a previous paginatedDescribeImageTags
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. 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
DescribeImageTags
in paginated output. When this parameter is used,DescribeImageTags
only returnsmaxResults
results in a single page along with anextToken
response element. You can see the remaining results of the initial request by sending anotherDescribeImageTags
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeImageTags
returns up to 100 results and anextToken
value, if applicable. If you specify images withimageIds
, you can’t use this option.
- On success, responds with
DescribeImageTagsOutput
with field(s):image_tag_details(Option<Vec::<ImageTagDetail>>)
:The image tag details for the images in the requested repository.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeImageTags
request. When the results of aDescribeImageTags
request 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
nextToken
value that’s returned from a previous paginatedDescribeImages
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. 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
DescribeImages
in paginated output. When this parameter is used,DescribeImages
only returnsmaxResults
results in a single page along with anextToken
response element. You can see the remaining results of the initial request by sending anotherDescribeImages
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeImages
returns up to 100 results and anextToken
value, if applicable. If you specify images withimageIds
, you can’t use this option.
- On success, responds with
DescribeImagesOutput
with field(s):image_details(Option<Vec::<ImageDetail>>)
:A list of
ImageDetail
objects that contain data about the image.next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeImages
request. When the results of aDescribeImages
request 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
nextToken
value that’s returned from a previous paginatedDescribeRegistries
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. 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
DescribeRegistries
in paginated output. When this parameter is used,DescribeRegistries
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeRegistries
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeRegistries
returns up to 100 results and anextToken
value, if applicable.
- On success, responds with
DescribeRegistriesOutput
with field(s):registries(Vec::<Registry>)
:An object that contains the details for a public registry.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeRepositories
request. If the results of aDescribeRepositories
request 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
nextToken
value that’s returned from a previous paginatedDescribeRepositories
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. 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
DescribeRepositories
in paginated output. When this parameter is used,DescribeRepositories
only returnsmaxResults
results in a single page along with anextToken
response element. You can see the remaining results of the initial request by sending anotherDescribeRepositories
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter isn’t used, thenDescribeRepositories
returns up to 100 results and anextToken
value, if applicable. If you specify repositories withrepositoryNames
, you can’t use this option.
- On success, responds with
DescribeRepositoriesOutput
with field(s):repositories(Option<Vec::<Repository>>)
:A list of repository objects corresponding to valid repositories.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeRepositories
request. When the results of aDescribeRepositories
request 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
send
it. - On success, responds with
GetAuthorizationTokenOutput
with 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
send
it. - On success, responds with
GetRegistryCatalogDataOutput
with 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
GetRepositoryCatalogDataOutput
with 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
GetRepositoryPolicyOutput
with 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
InitiateLayerUploadOutput
with field(s):upload_id(Option<String>)
:The upload ID for the layer upload. This parameter is passed to further
UploadLayerPart
andCompleteLayerUpload
operations.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
ListTagsForResourceOutput
with 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
mediaType
field, you must specify theimageManifestMediaType
in 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
PutImageOutput
with 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
PutRegistryCatalogDataOutput
with 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
PutRepositoryCatalogDataOutput
with 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
SetRepositoryPolicy
operation. This prevents accidental repository lockouts.
- On success, responds with
SetRepositoryPolicyOutput
with 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
InitiateLayerUpload
operation 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
UploadLayerPartOutput
with 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_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is 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_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo 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> 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 more