pub struct Client { /* private fields */ }
Expand description
Client for Amazon Elastic Container Registry
Client for invoking operations on Amazon Elastic Container Registry. Each operation on Amazon Elastic Container Registry 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_ecr::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_ecr::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.
§Waiters
This client provides wait_until
methods behind the Waiters
trait.
To use them, simply import the trait, and then call one of the wait_until
methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait
method can be called to initiate waiting.
For example, if there was a wait_until_thing
method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;
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 associated with the registry that contains the image layers to check. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository that is 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 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>
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 associated with the registry that contains the image to delete. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe repository 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 batch_get_image(&self) -> BatchGetImageFluentBuilder
pub fn batch_get_image(&self) -> BatchGetImageFluentBuilder
Constructs a fluent builder for the BatchGetImage
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default 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: trueA list of image ID references that correspond to images to describe. The format of the
imageIds
reference isimageTag=tag
orimageDigest=digest
.accepted_media_types(impl Into<String>)
/set_accepted_media_types(Option<Vec::<String>>)
:
required: falseThe accepted media types for the request.
Valid values:
application/vnd.docker.distribution.manifest.v1+json
|application/vnd.docker.distribution.manifest.v2+json
|application/vnd.oci.image.manifest.v1+json
- On success, responds with
BatchGetImageOutput
with field(s):images(Option<Vec::<Image>>)
:A list of image objects corresponding to the image references in the request.
failures(Option<Vec::<ImageFailure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<BatchGetImageError>
Source§impl Client
impl Client
Sourcepub fn batch_get_repository_scanning_configuration(
&self,
) -> BatchGetRepositoryScanningConfigurationFluentBuilder
pub fn batch_get_repository_scanning_configuration( &self, ) -> BatchGetRepositoryScanningConfigurationFluentBuilder
Constructs a fluent builder for the BatchGetRepositoryScanningConfiguration
operation.
- The fluent builder is configurable:
repository_names(impl Into<String>)
/set_repository_names(Option<Vec::<String>>)
:
required: trueOne or more repository names to get the scanning configuration for.
- On success, responds with
BatchGetRepositoryScanningConfigurationOutput
with field(s):scanning_configurations(Option<Vec::<RepositoryScanningConfiguration>>)
:The scanning configuration for the requested repositories.
failures(Option<Vec::<RepositoryScanningConfigurationFailure>>)
:Any failures associated with the call.
- On failure, responds with
SdkError<BatchGetRepositoryScanningConfigurationError>
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 associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository 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 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
sha256
digest of the image layer.
- On failure, responds with
SdkError<CompleteLayerUploadError>
Source§impl Client
impl Client
Sourcepub fn create_pull_through_cache_rule(
&self,
) -> CreatePullThroughCacheRuleFluentBuilder
pub fn create_pull_through_cache_rule( &self, ) -> CreatePullThroughCacheRuleFluentBuilder
Constructs a fluent builder for the CreatePullThroughCacheRule
operation.
- The fluent builder is configurable:
ecr_repository_prefix(impl Into<String>)
/set_ecr_repository_prefix(Option<String>)
:
required: trueThe repository name prefix to use when caching images from the source registry.
There is always an assumed
/
applied to the end of the prefix. If you specifyecr-public
as the prefix, Amazon ECR treats that asecr-public/
.upstream_registry_url(impl Into<String>)
/set_upstream_registry_url(Option<String>)
:
required: trueThe registry URL of the upstream public registry to use as the source for the pull through cache rule. The following is the syntax to use for each supported upstream registry.
-
Amazon ECR (
ecr
) –dkr.ecr.
.amazonaws.com -
Amazon ECR Public (
ecr-public
) –public.ecr.aws
-
Docker Hub (
docker-hub
) –registry-1.docker.io
-
GitHub Container Registry (
github-container-registry
) –ghcr.io
-
GitLab Container Registry (
gitlab-container-registry
) –registry.gitlab.com
-
Kubernetes (
k8s
) –registry.k8s.io
-
Microsoft Azure Container Registry (
azure-container-registry
) –.azurecr.io -
Quay (
quay
) –quay.io
-
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry to create the pull through cache rule for. If you do not specify a registry, the default registry is assumed.
upstream_registry(UpstreamRegistry)
/set_upstream_registry(Option<UpstreamRegistry>)
:
required: falseThe name of the upstream registry.
credential_arn(impl Into<String>)
/set_credential_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
custom_role_arn(impl Into<String>)
/set_custom_role_arn(Option<String>)
:
required: falseAmazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to authenticate to the ECR upstream registry. This role must be in the same account as the registry that you are configuring.
upstream_repository_prefix(impl Into<String>)
/set_upstream_repository_prefix(Option<String>)
:
required: falseThe repository name prefix of the upstream registry to match with the upstream repository name. When this field isn’t specified, Amazon ECR will use the
ROOT
.
- On success, responds with
CreatePullThroughCacheRuleOutput
with field(s):ecr_repository_prefix(Option<String>)
:The Amazon ECR repository prefix associated with the pull through cache rule.
upstream_registry_url(Option<String>)
:The upstream registry URL associated with the pull through cache rule.
created_at(Option<DateTime>)
:The date and time, in JavaScript date format, when the pull through cache rule was created.
registry_id(Option<String>)
:The registry ID associated with the request.
upstream_registry(Option<UpstreamRegistry>)
:The name of the upstream registry associated with the pull through cache rule.
credential_arn(Option<String>)
:The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret associated with the pull through cache rule.
custom_role_arn(Option<String>)
:The ARN of the IAM role associated with the pull through cache rule.
upstream_repository_prefix(Option<String>)
:The upstream repository prefix associated with the pull through cache rule.
- On failure, responds with
SdkError<CreatePullThroughCacheRuleError>
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:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry to create the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name to use for the repository. 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
).The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseThe 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.
image_tag_mutability(ImageTagMutability)
/set_image_tag_mutability(Option<ImageTagMutability>)
:
required: falseThe tag mutability setting for the repository. If this parameter is omitted, the default setting of
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.image_scanning_configuration(ImageScanningConfiguration)
/set_image_scanning_configuration(Option<ImageScanningConfiguration>)
:
required: falseThe image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
encryption_configuration(EncryptionConfiguration)
/set_encryption_configuration(Option<EncryptionConfiguration>)
:
required: falseThe encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
- On success, responds with
CreateRepositoryOutput
with field(s):repository(Option<Repository>)
:The repository that was created.
- On failure, responds with
SdkError<CreateRepositoryError>
Source§impl Client
impl Client
Sourcepub fn create_repository_creation_template(
&self,
) -> CreateRepositoryCreationTemplateFluentBuilder
pub fn create_repository_creation_template( &self, ) -> CreateRepositoryCreationTemplateFluentBuilder
Constructs a fluent builder for the CreateRepositoryCreationTemplate
operation.
- The fluent builder is configurable:
prefix(impl Into<String>)
/set_prefix(Option<String>)
:
required: trueThe repository namespace prefix to associate with the template. All repositories created using this namespace prefix will have the settings defined in this template applied. For example, a prefix of
prod
would apply to all repositories beginning withprod/
. Similarly, a prefix ofprod/team
would apply to all repositories beginning withprod/team/
.To apply a template to all repositories in your registry that don’t have an associated creation template, you can use
ROOT
as the prefix.There is always an assumed
/
applied to the end of the prefix. If you specifyecr-public
as the prefix, Amazon ECR treats that asecr-public/
. When using a pull through cache rule, the repository prefix you specify during rule creation is what you should specify as your repository creation template prefix as well.description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description for the repository creation template.
encryption_configuration(EncryptionConfigurationForRepositoryCreationTemplate)
/set_encryption_configuration(Option<EncryptionConfigurationForRepositoryCreationTemplate>)
:
required: falseThe encryption configuration to use for repositories created using the template.
resource_tags(Tag)
/set_resource_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata to apply to the repository to help you categorize and organize. 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.
image_tag_mutability(ImageTagMutability)
/set_image_tag_mutability(Option<ImageTagMutability>)
:
required: falseThe tag mutability setting for the repository. If this parameter is omitted, the default setting of
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.repository_policy(impl Into<String>)
/set_repository_policy(Option<String>)
:
required: falseThe repository policy to apply to repositories created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.
lifecycle_policy(impl Into<String>)
/set_lifecycle_policy(Option<String>)
:
required: falseThe lifecycle policy to use for repositories created using the template.
applied_for(RctAppliedFor)
/set_applied_for(Option<Vec::<RctAppliedFor>>)
:
required: trueA list of enumerable strings representing the Amazon ECR repository creation scenarios that this template will apply towards. The two supported scenarios are
PULL_THROUGH_CACHE
andREPLICATION
custom_role_arn(impl Into<String>)
/set_custom_role_arn(Option<String>)
:
required: falseThe ARN of the role to be assumed by Amazon ECR. This role must be in the same account as the registry that you are configuring. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn’t specified, Amazon ECR will use the service-linked role for the repository creation template.
- On success, responds with
CreateRepositoryCreationTemplateOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_creation_template(Option<RepositoryCreationTemplate>)
:The details of the repository creation template associated with the request.
- On failure, responds with
SdkError<CreateRepositoryCreationTemplateError>
Source§impl Client
impl Client
Sourcepub fn delete_lifecycle_policy(&self) -> DeleteLifecyclePolicyFluentBuilder
pub fn delete_lifecycle_policy(&self) -> DeleteLifecyclePolicyFluentBuilder
Constructs a fluent builder for the DeleteLifecyclePolicy
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository.
- On success, responds with
DeleteLifecyclePolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
lifecycle_policy_text(Option<String>)
:The JSON lifecycle policy text.
last_evaluated_at(Option<DateTime>)
:The time stamp of the last time that the lifecycle policy was run.
- On failure, responds with
SdkError<DeleteLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_pull_through_cache_rule(
&self,
) -> DeletePullThroughCacheRuleFluentBuilder
pub fn delete_pull_through_cache_rule( &self, ) -> DeletePullThroughCacheRuleFluentBuilder
Constructs a fluent builder for the DeletePullThroughCacheRule
operation.
- The fluent builder is configurable:
ecr_repository_prefix(impl Into<String>)
/set_ecr_repository_prefix(Option<String>)
:
required: trueThe Amazon ECR repository prefix associated with the pull through cache rule to delete.
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.
- On success, responds with
DeletePullThroughCacheRuleOutput
with field(s):ecr_repository_prefix(Option<String>)
:The Amazon ECR repository prefix associated with the request.
upstream_registry_url(Option<String>)
:The upstream registry URL associated with the pull through cache rule.
created_at(Option<DateTime>)
:The timestamp associated with the pull through cache rule.
registry_id(Option<String>)
:The registry ID associated with the request.
credential_arn(Option<String>)
:The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret associated with the pull through cache rule.
custom_role_arn(Option<String>)
:The ARN of the IAM role associated with the pull through cache rule.
upstream_repository_prefix(Option<String>)
:The upstream repository prefix associated with the pull through cache rule.
- On failure, responds with
SdkError<DeletePullThroughCacheRuleError>
Source§impl Client
impl Client
Sourcepub fn delete_registry_policy(&self) -> DeleteRegistryPolicyFluentBuilder
pub fn delete_registry_policy(&self) -> DeleteRegistryPolicyFluentBuilder
Constructs a fluent builder for the DeleteRegistryPolicy
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DeleteRegistryPolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
policy_text(Option<String>)
:The contents of the registry permissions policy that was deleted.
- On failure, responds with
SdkError<DeleteRegistryPolicyError>
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 associated with the registry that contains the repository to delete. If you do not specify a registry, the default 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: falseIf true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.
- 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_creation_template(
&self,
) -> DeleteRepositoryCreationTemplateFluentBuilder
pub fn delete_repository_creation_template( &self, ) -> DeleteRepositoryCreationTemplateFluentBuilder
Constructs a fluent builder for the DeleteRepositoryCreationTemplate
operation.
- The fluent builder is configurable:
prefix(impl Into<String>)
/set_prefix(Option<String>)
:
required: trueThe repository namespace prefix associated with the repository creation template.
- On success, responds with
DeleteRepositoryCreationTemplateOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_creation_template(Option<RepositoryCreationTemplate>)
:The details of the repository creation template that was deleted.
- On failure, responds with
SdkError<DeleteRepositoryCreationTemplateError>
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 associated with the registry that contains the repository policy to delete. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository that is associated with the repository policy to delete.
- On success, responds with
DeleteRepositoryPolicyOutput
with 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>
Source§impl Client
impl Client
Sourcepub fn describe_image_replication_status(
&self,
) -> DescribeImageReplicationStatusFluentBuilder
pub fn describe_image_replication_status( &self, ) -> DescribeImageReplicationStatusFluentBuilder
Constructs a fluent builder for the DescribeImageReplicationStatus
operation.
- The fluent builder is configurable:
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository that the image is in.
image_id(ImageIdentifier)
/set_image_id(Option<ImageIdentifier>)
:
required: trueAn object with identifying information for an image in an Amazon ECR repository.
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry. If you do not specify a registry, the default registry is assumed.
- On success, responds with
DescribeImageReplicationStatusOutput
with field(s):repository_name(Option<String>)
:The repository name associated with the request.
image_id(Option<ImageIdentifier>)
:An object with identifying information for an image in an Amazon ECR repository.
replication_statuses(Option<Vec::<ImageReplicationStatus>>)
:The replication status details for the images in the specified repository.
- On failure, responds with
SdkError<DescribeImageReplicationStatusError>
Source§impl Client
impl Client
Sourcepub fn describe_image_scan_findings(
&self,
) -> DescribeImageScanFindingsFluentBuilder
pub fn describe_image_scan_findings( &self, ) -> DescribeImageScanFindingsFluentBuilder
Constructs a fluent builder for the DescribeImageScanFindings
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 associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe repository for the image for which to describe the scan findings.
image_id(ImageIdentifier)
/set_image_id(Option<ImageIdentifier>)
:
required: trueAn object with identifying information for an image in an Amazon ECR repository.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedDescribeImageScanFindings
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. This value is null when there are no more results to return.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of image scan results returned by
DescribeImageScanFindings
in paginated output. When this parameter is used,DescribeImageScanFindings
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeImageScanFindings
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImageScanFindings
returns up to 100 results and anextToken
value, if applicable.
- On success, responds with
DescribeImageScanFindingsOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
image_id(Option<ImageIdentifier>)
:An object with identifying information for an image in an Amazon ECR repository.
image_scan_status(Option<ImageScanStatus>)
:The current state of the scan.
image_scan_findings(Option<ImageScanFindings>)
:The information contained in the image scan findings.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeImageScanFindings
request. When the results of aDescribeImageScanFindings
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribeImageScanFindingsError>
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 associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default 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 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. This value isnull
when 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>)
:
required: falseThe maximum number of repository results returned by
DescribeImages
in paginated output. When this parameter is used,DescribeImages
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeImages
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImages
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify images withimageIds
.filter(DescribeImagesFilter)
/set_filter(Option<DescribeImagesFilter>)
:
required: falseThe filter key and value with which to filter your
DescribeImages
results.
- 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
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<DescribeImagesError>
Source§impl Client
impl Client
Sourcepub fn describe_pull_through_cache_rules(
&self,
) -> DescribePullThroughCacheRulesFluentBuilder
pub fn describe_pull_through_cache_rules( &self, ) -> DescribePullThroughCacheRulesFluentBuilder
Constructs a fluent builder for the DescribePullThroughCacheRules
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 associated with the registry to return the pull through cache rules for. If you do not specify a registry, the default registry is assumed.
ecr_repository_prefixes(impl Into<String>)
/set_ecr_repository_prefixes(Option<Vec::<String>>)
:
required: falseThe Amazon ECR repository prefixes associated with the pull through cache rules to return. If no repository prefix value is specified, all pull through cache rules are returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedDescribePullThroughCacheRulesRequest
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. This value is null when there are no more results to return.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of pull through cache rules returned by
DescribePullThroughCacheRulesRequest
in paginated output. When this parameter is used,DescribePullThroughCacheRulesRequest
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribePullThroughCacheRulesRequest
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribePullThroughCacheRulesRequest
returns up to 100 results and anextToken
value, if applicable.
- On success, responds with
DescribePullThroughCacheRulesOutput
with field(s):pull_through_cache_rules(Option<Vec::<PullThroughCacheRule>>)
:The details of the pull through cache rules.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribePullThroughCacheRulesRequest
request. When the results of aDescribePullThroughCacheRulesRequest
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
- On failure, responds with
SdkError<DescribePullThroughCacheRulesError>
Source§impl Client
impl Client
Sourcepub fn describe_registry(&self) -> DescribeRegistryFluentBuilder
pub fn describe_registry(&self) -> DescribeRegistryFluentBuilder
Constructs a fluent builder for the DescribeRegistry
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeRegistryOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
replication_configuration(Option<ReplicationConfiguration>)
:The replication configuration for the registry.
- On failure, responds with
SdkError<DescribeRegistryError>
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 associated with the registry that contains the repositories to be described. If you do not specify a registry, the default 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 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. This value isnull
when 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>)
:
required: falseThe maximum number of repository results returned by
DescribeRepositories
in paginated output. When this parameter is used,DescribeRepositories
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeRepositories
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeRepositories
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify repositories withrepositoryNames
.
- 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. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<DescribeRepositoriesError>
Source§impl Client
impl Client
Sourcepub fn describe_repository_creation_templates(
&self,
) -> DescribeRepositoryCreationTemplatesFluentBuilder
pub fn describe_repository_creation_templates( &self, ) -> DescribeRepositoryCreationTemplatesFluentBuilder
Constructs a fluent builder for the DescribeRepositoryCreationTemplates
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
prefixes(impl Into<String>)
/set_prefixes(Option<Vec::<String>>)
:
required: falseThe repository namespace prefixes associated with the repository creation templates to describe. If this value is not specified, all repository creation templates are returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedDescribeRepositoryCreationTemplates
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. This value isnull
when 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>)
:
required: falseThe maximum number of repository results returned by
DescribeRepositoryCreationTemplatesRequest
in paginated output. When this parameter is used,DescribeRepositoryCreationTemplatesRequest
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeRepositoryCreationTemplatesRequest
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeRepositoryCreationTemplatesRequest
returns up to 100 results and anextToken
value, if applicable.
- On success, responds with
DescribeRepositoryCreationTemplatesOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_creation_templates(Option<Vec::<RepositoryCreationTemplate>>)
:The details of the repository creation templates.
next_token(Option<String>)
:The
nextToken
value to include in a futureDescribeRepositoryCreationTemplates
request. When the results of aDescribeRepositoryCreationTemplates
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<DescribeRepositoryCreationTemplatesError>
Source§impl Client
impl Client
Sourcepub fn get_account_setting(&self) -> GetAccountSettingFluentBuilder
pub fn get_account_setting(&self) -> GetAccountSettingFluentBuilder
Constructs a fluent builder for the GetAccountSetting
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the account setting, such as
BASIC_SCAN_TYPE_VERSION
orREGISTRY_POLICY_SCOPE
.
- On success, responds with
GetAccountSettingOutput
with field(s):name(Option<String>)
:Retrieves the name of the account setting.
value(Option<String>)
:The setting value for the setting name. The following are valid values for the basic scan type being used:
AWS_NATIVE
orCLAIR
. The following are valid values for the registry policy scope being used:V1
orV2
.
- On failure, responds with
SdkError<GetAccountSettingError>
Source§impl Client
impl Client
Constructs a fluent builder for the GetAuthorizationToken
operation.
- The fluent builder is configurable:
registry_ids(impl Into<String>)
/set_registry_ids(Option<Vec::<String>>)
:
required: falseA list of Amazon Web Services account IDs that are associated with the registries for which to get AuthorizationData objects. If you do not specify a registry, the default registry is assumed.
- On success, responds with
GetAuthorizationTokenOutput
with field(s):authorization_data(Option<Vec::<AuthorizationData>>)
:A list of authorization token data objects that correspond to the
registryIds
values in the request.
- On failure, responds with
SdkError<GetAuthorizationTokenError>
Source§impl Client
impl Client
Sourcepub fn get_download_url_for_layer(&self) -> GetDownloadUrlForLayerFluentBuilder
pub fn get_download_url_for_layer(&self) -> GetDownloadUrlForLayerFluentBuilder
Constructs a fluent builder for the GetDownloadUrlForLayer
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the image layer to download. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository that is associated with the image layer to download.
layer_digest(impl Into<String>)
/set_layer_digest(Option<String>)
:
required: trueThe digest of the image layer to download.
- On success, responds with
GetDownloadUrlForLayerOutput
with field(s):download_url(Option<String>)
:The pre-signed Amazon S3 download URL for the requested layer.
layer_digest(Option<String>)
:The digest of the image layer to download.
- On failure, responds with
SdkError<GetDownloadUrlForLayerError>
Source§impl Client
impl Client
Sourcepub fn get_lifecycle_policy(&self) -> GetLifecyclePolicyFluentBuilder
pub fn get_lifecycle_policy(&self) -> GetLifecyclePolicyFluentBuilder
Constructs a fluent builder for the GetLifecyclePolicy
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository.
- On success, responds with
GetLifecyclePolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
lifecycle_policy_text(Option<String>)
:The JSON lifecycle policy text.
last_evaluated_at(Option<DateTime>)
:The time stamp of the last time that the lifecycle policy was run.
- On failure, responds with
SdkError<GetLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn get_lifecycle_policy_preview(
&self,
) -> GetLifecyclePolicyPreviewFluentBuilder
pub fn get_lifecycle_policy_preview( &self, ) -> GetLifecyclePolicyPreviewFluentBuilder
Constructs a fluent builder for the GetLifecyclePolicyPreview
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 associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository.
image_ids(ImageIdentifier)
/set_image_ids(Option<Vec::<ImageIdentifier>>)
:
required: falseThe list of imageIDs to be included.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedGetLifecyclePolicyPreviewRequest
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. This value isnull
when 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>)
:
required: falseThe maximum number of repository results returned by
GetLifecyclePolicyPreviewRequest
in paginated output. When this parameter is used,GetLifecyclePolicyPreviewRequest
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherGetLifecyclePolicyPreviewRequest
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenGetLifecyclePolicyPreviewRequest
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify images withimageIds
.filter(LifecyclePolicyPreviewFilter)
/set_filter(Option<LifecyclePolicyPreviewFilter>)
:
required: falseAn optional parameter that filters results based on image tag status and all tags, if tagged.
- On success, responds with
GetLifecyclePolicyPreviewOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
lifecycle_policy_text(Option<String>)
:The JSON lifecycle policy text.
status(Option<LifecyclePolicyPreviewStatus>)
:The status of the lifecycle policy preview request.
next_token(Option<String>)
:The
nextToken
value to include in a futureGetLifecyclePolicyPreview
request. When the results of aGetLifecyclePolicyPreview
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.preview_results(Option<Vec::<LifecyclePolicyPreviewResult>>)
:The results of the lifecycle policy preview request.
summary(Option<LifecyclePolicyPreviewSummary>)
:The list of images that is returned as a result of the action.
- On failure, responds with
SdkError<GetLifecyclePolicyPreviewError>
Source§impl Client
impl Client
Sourcepub fn get_registry_policy(&self) -> GetRegistryPolicyFluentBuilder
pub fn get_registry_policy(&self) -> GetRegistryPolicyFluentBuilder
Constructs a fluent builder for the GetRegistryPolicy
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetRegistryPolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
policy_text(Option<String>)
:The JSON text of the permissions policy for a registry.
- On failure, responds with
SdkError<GetRegistryPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_registry_scanning_configuration(
&self,
) -> GetRegistryScanningConfigurationFluentBuilder
pub fn get_registry_scanning_configuration( &self, ) -> GetRegistryScanningConfigurationFluentBuilder
Constructs a fluent builder for the GetRegistryScanningConfiguration
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetRegistryScanningConfigurationOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
scanning_configuration(Option<RegistryScanningConfiguration>)
:The scanning configuration for the registry.
- On failure, responds with
SdkError<GetRegistryScanningConfigurationError>
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 associated with the registry that contains the repository. If you do not specify a registry, the default 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 associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
policy_text(Option<String>)
:The JSON repository policy text associated with the repository.
- 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 associated with the registry to which you intend to upload layers. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository to which you intend to upload layers.
- 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
Sourcepub fn list_images(&self) -> ListImagesFluentBuilder
pub fn list_images(&self) -> ListImagesFluentBuilder
Constructs a fluent builder for the ListImages
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 associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe repository with image IDs to be listed.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe
nextToken
value returned from a previous paginatedListImages
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. This value isnull
when 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>)
:
required: falseThe maximum number of image results returned by
ListImages
in paginated output. When this parameter is used,ListImages
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListImages
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenListImages
returns up to 100 results and anextToken
value, if applicable.filter(ListImagesFilter)
/set_filter(Option<ListImagesFilter>)
:
required: falseThe filter key and value with which to filter your
ListImages
results.
- On success, responds with
ListImagesOutput
with field(s):image_ids(Option<Vec::<ImageIdentifier>>)
:The list of image IDs for the requested repository.
next_token(Option<String>)
:The
nextToken
value to include in a futureListImages
request. When the results of aListImages
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
- On failure, responds with
SdkError<ListImagesError>
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 for which to list the tags. Currently, the only supported resource is an Amazon ECR 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_account_setting(&self) -> PutAccountSettingFluentBuilder
pub fn put_account_setting(&self) -> PutAccountSettingFluentBuilder
Constructs a fluent builder for the PutAccountSetting
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the account setting, such as
BASIC_SCAN_TYPE_VERSION
orREGISTRY_POLICY_SCOPE
.value(impl Into<String>)
/set_value(Option<String>)
:
required: trueSetting value that is specified. The following are valid values for the basic scan type being used:
AWS_NATIVE
orCLAIR
. The following are valid values for the registry policy scope being used:V1
orV2
.
- On success, responds with
PutAccountSettingOutput
with field(s):name(Option<String>)
:Retrieves the name of the account setting.
value(Option<String>)
:Retrieves the value of the specified account setting.
- On failure, responds with
SdkError<PutAccountSettingError>
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 associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository in which to put the image.
image_manifest(impl Into<String>)
/set_image_manifest(Option<String>)
:
required: trueThe image manifest corresponding 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 does not 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 corresponding 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_image_scanning_configuration(
&self,
) -> PutImageScanningConfigurationFluentBuilder
pub fn put_image_scanning_configuration( &self, ) -> PutImageScanningConfigurationFluentBuilder
Constructs a fluent builder for the PutImageScanningConfiguration
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository in which to update the image scanning configuration setting.
image_scanning_configuration(ImageScanningConfiguration)
/set_image_scanning_configuration(Option<ImageScanningConfiguration>)
:
required: trueThe image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- On success, responds with
PutImageScanningConfigurationOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
image_scanning_configuration(Option<ImageScanningConfiguration>)
:The image scanning configuration setting for the repository.
- On failure, responds with
SdkError<PutImageScanningConfigurationError>
Source§impl Client
impl Client
Sourcepub fn put_image_tag_mutability(&self) -> PutImageTagMutabilityFluentBuilder
pub fn put_image_tag_mutability(&self) -> PutImageTagMutabilityFluentBuilder
Constructs a fluent builder for the PutImageTagMutability
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository in which to update the image tag mutability settings. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository in which to update the image tag mutability settings.
image_tag_mutability(ImageTagMutability)
/set_image_tag_mutability(Option<ImageTagMutability>)
:
required: trueThe tag mutability setting for the repository. If
MUTABLE
is specified, image tags can be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
- On success, responds with
PutImageTagMutabilityOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
image_tag_mutability(Option<ImageTagMutability>)
:The image tag mutability setting for the repository.
- On failure, responds with
SdkError<PutImageTagMutabilityError>
Source§impl Client
impl Client
Sourcepub fn put_lifecycle_policy(&self) -> PutLifecyclePolicyFluentBuilder
pub fn put_lifecycle_policy(&self) -> PutLifecyclePolicyFluentBuilder
Constructs a fluent builder for the PutLifecyclePolicy
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository to receive the policy.
lifecycle_policy_text(impl Into<String>)
/set_lifecycle_policy_text(Option<String>)
:
required: trueThe JSON repository policy text to apply to the repository.
- On success, responds with
PutLifecyclePolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
lifecycle_policy_text(Option<String>)
:The JSON repository policy text.
- On failure, responds with
SdkError<PutLifecyclePolicyError>
Source§impl Client
impl Client
Sourcepub fn put_registry_policy(&self) -> PutRegistryPolicyFluentBuilder
pub fn put_registry_policy(&self) -> PutRegistryPolicyFluentBuilder
Constructs a fluent builder for the PutRegistryPolicy
operation.
- The fluent builder is configurable:
policy_text(impl Into<String>)
/set_policy_text(Option<String>)
:
required: trueThe JSON policy text to apply to your registry. The policy text follows the same format as IAM policy text. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
- On success, responds with
PutRegistryPolicyOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
policy_text(Option<String>)
:The JSON policy text for your registry.
- On failure, responds with
SdkError<PutRegistryPolicyError>
Source§impl Client
impl Client
Sourcepub fn put_registry_scanning_configuration(
&self,
) -> PutRegistryScanningConfigurationFluentBuilder
pub fn put_registry_scanning_configuration( &self, ) -> PutRegistryScanningConfigurationFluentBuilder
Constructs a fluent builder for the PutRegistryScanningConfiguration
operation.
- The fluent builder is configurable:
scan_type(ScanType)
/set_scan_type(Option<ScanType>)
:
required: falseThe scanning type to set for the registry.
When a registry scanning configuration is not defined, by default the
BASIC
scan type is used. When basic scanning is used, you may specify filters to determine which individual repositories, or all repositories, are scanned when new images are pushed to those repositories. Alternatively, you can do manual scans of images with basic scanning.When the
ENHANCED
scan type is set, Amazon Inspector provides automated vulnerability scanning. You may choose between continuous scanning or scan on push and you may specify filters to determine which individual repositories, or all repositories, are scanned.rules(RegistryScanningRule)
/set_rules(Option<Vec::<RegistryScanningRule>>)
:
required: falseThe scanning rules to use for the registry. A scanning rule is used to determine which repository filters are used and at what frequency scanning will occur.
- On success, responds with
PutRegistryScanningConfigurationOutput
with field(s):registry_scanning_configuration(Option<RegistryScanningConfiguration>)
:The scanning configuration for your registry.
- On failure, responds with
SdkError<PutRegistryScanningConfigurationError>
Source§impl Client
impl Client
Sourcepub fn put_replication_configuration(
&self,
) -> PutReplicationConfigurationFluentBuilder
pub fn put_replication_configuration( &self, ) -> PutReplicationConfigurationFluentBuilder
Constructs a fluent builder for the PutReplicationConfiguration
operation.
- The fluent builder is configurable:
replication_configuration(ReplicationConfiguration)
/set_replication_configuration(Option<ReplicationConfiguration>)
:
required: trueAn object representing the replication configuration for a registry.
- On success, responds with
PutReplicationConfigurationOutput
with field(s):replication_configuration(Option<ReplicationConfiguration>)
:The contents of the replication configuration for the registry.
- On failure, responds with
SdkError<PutReplicationConfigurationError>
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 associated with the registry that contains the repository. If you do not specify a registry, the default 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 you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the
SetRepositoryPolicy
operation. This is intended to prevent accidental repository lock outs.
- On success, responds with
SetRepositoryPolicyOutput
with 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>
Source§impl Client
impl Client
Sourcepub fn start_image_scan(&self) -> StartImageScanFluentBuilder
pub fn start_image_scan(&self) -> StartImageScanFluentBuilder
Constructs a fluent builder for the StartImageScan
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository in which to start an image scan request. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository that contains the images to scan.
image_id(ImageIdentifier)
/set_image_id(Option<ImageIdentifier>)
:
required: trueAn object with identifying information for an image in an Amazon ECR repository.
- On success, responds with
StartImageScanOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
image_id(Option<ImageIdentifier>)
:An object with identifying information for an image in an Amazon ECR repository.
image_scan_status(Option<ImageScanStatus>)
:The current state of the scan.
- On failure, responds with
SdkError<StartImageScanError>
Source§impl Client
impl Client
Sourcepub fn start_lifecycle_policy_preview(
&self,
) -> StartLifecyclePolicyPreviewFluentBuilder
pub fn start_lifecycle_policy_preview( &self, ) -> StartLifecyclePolicyPreviewFluentBuilder
Constructs a fluent builder for the StartLifecyclePolicyPreview
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository to be evaluated.
lifecycle_policy_text(impl Into<String>)
/set_lifecycle_policy_text(Option<String>)
:
required: falseThe policy to be evaluated against. If you do not specify a policy, the current policy for the repository is used.
- On success, responds with
StartLifecyclePolicyPreviewOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_name(Option<String>)
:The repository name associated with the request.
lifecycle_policy_text(Option<String>)
:The JSON repository policy text.
status(Option<LifecyclePolicyPreviewStatus>)
:The status of the lifecycle policy preview request.
- On failure, responds with
SdkError<StartLifecyclePolicyPreviewError>
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 the resource to which to add tags. Currently, the only supported resource is an Amazon ECR 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 from which to remove tags. Currently, the only supported resource is an Amazon ECR 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 update_pull_through_cache_rule(
&self,
) -> UpdatePullThroughCacheRuleFluentBuilder
pub fn update_pull_through_cache_rule( &self, ) -> UpdatePullThroughCacheRuleFluentBuilder
Constructs a fluent builder for the UpdatePullThroughCacheRule
operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe Amazon Web Services account ID associated with the registry associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
ecr_repository_prefix(impl Into<String>)
/set_ecr_repository_prefix(Option<String>)
:
required: trueThe repository name prefix to use when caching images from the source registry.
credential_arn(impl Into<String>)
/set_credential_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
custom_role_arn(impl Into<String>)
/set_custom_role_arn(Option<String>)
:
required: falseAmazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to authenticate to the ECR upstream registry. This role must be in the same account as the registry that you are configuring.
- On success, responds with
UpdatePullThroughCacheRuleOutput
with field(s):ecr_repository_prefix(Option<String>)
:The Amazon ECR repository prefix associated with the pull through cache rule.
registry_id(Option<String>)
:The registry ID associated with the request.
updated_at(Option<DateTime>)
:The date and time, in JavaScript date format, when the pull through cache rule was updated.
credential_arn(Option<String>)
:The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret associated with the pull through cache rule.
custom_role_arn(Option<String>)
:The ARN of the IAM role associated with the pull through cache rule.
upstream_repository_prefix(Option<String>)
:The upstream repository prefix associated with the pull through cache rule.
- On failure, responds with
SdkError<UpdatePullThroughCacheRuleError>
Source§impl Client
impl Client
Sourcepub fn update_repository_creation_template(
&self,
) -> UpdateRepositoryCreationTemplateFluentBuilder
pub fn update_repository_creation_template( &self, ) -> UpdateRepositoryCreationTemplateFluentBuilder
Constructs a fluent builder for the UpdateRepositoryCreationTemplate
operation.
- The fluent builder is configurable:
prefix(impl Into<String>)
/set_prefix(Option<String>)
:
required: trueThe repository namespace prefix that matches an existing repository creation template in the registry. All repositories created using this namespace prefix will have the settings defined in this template applied. For example, a prefix of
prod
would apply to all repositories beginning withprod/
. This includes a repository namedprod/team1
as well as a repository namedprod/repository1
.To apply a template to all repositories in your registry that don’t have an associated creation template, you can use
ROOT
as the prefix.description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA description for the repository creation template.
encryption_configuration(EncryptionConfigurationForRepositoryCreationTemplate)
/set_encryption_configuration(Option<EncryptionConfigurationForRepositoryCreationTemplate>)
:
required: falseThe encryption configuration to associate with the repository creation template.
resource_tags(Tag)
/set_resource_tags(Option<Vec::<Tag>>)
:
required: falseThe metadata to apply to the repository to help you categorize and organize. 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.
image_tag_mutability(ImageTagMutability)
/set_image_tag_mutability(Option<ImageTagMutability>)
:
required: falseUpdates the tag mutability setting for the repository. If this parameter is omitted, the default setting of
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.repository_policy(impl Into<String>)
/set_repository_policy(Option<String>)
:
required: falseUpdates the repository policy created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.
lifecycle_policy(impl Into<String>)
/set_lifecycle_policy(Option<String>)
:
required: falseUpdates the lifecycle policy associated with the specified repository creation template.
applied_for(RctAppliedFor)
/set_applied_for(Option<Vec::<RctAppliedFor>>)
:
required: falseUpdates the list of enumerable strings representing the Amazon ECR repository creation scenarios that this template will apply towards. The two supported scenarios are
PULL_THROUGH_CACHE
andREPLICATION
custom_role_arn(impl Into<String>)
/set_custom_role_arn(Option<String>)
:
required: falseThe ARN of the role to be assumed by Amazon ECR. This role must be in the same account as the registry that you are configuring. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn’t specified, Amazon ECR will use the service-linked role for the repository creation template.
- On success, responds with
UpdateRepositoryCreationTemplateOutput
with field(s):registry_id(Option<String>)
:The registry ID associated with the request.
repository_creation_template(Option<RepositoryCreationTemplate>)
:The details of the repository creation template associated with the request.
- On failure, responds with
SdkError<UpdateRepositoryCreationTemplateError>
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 associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.
repository_name(impl Into<String>)
/set_repository_name(Option<String>)
:
required: trueThe name of the repository to which you are uploading layer parts.
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 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>
Source§impl Client
impl Client
Sourcepub fn validate_pull_through_cache_rule(
&self,
) -> ValidatePullThroughCacheRuleFluentBuilder
pub fn validate_pull_through_cache_rule( &self, ) -> ValidatePullThroughCacheRuleFluentBuilder
Constructs a fluent builder for the ValidatePullThroughCacheRule
operation.
- The fluent builder is configurable:
ecr_repository_prefix(impl Into<String>)
/set_ecr_repository_prefix(Option<String>)
:
required: trueThe repository name prefix associated with the pull through cache rule.
registry_id(impl Into<String>)
/set_registry_id(Option<String>)
:
required: falseThe registry ID associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
- On success, responds with
ValidatePullThroughCacheRuleOutput
with field(s):ecr_repository_prefix(Option<String>)
:The Amazon ECR repository prefix associated with the pull through cache rule.
registry_id(Option<String>)
:The registry ID associated with the request.
upstream_registry_url(Option<String>)
:The upstream registry URL associated with the pull through cache rule.
credential_arn(Option<String>)
:The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret associated with the pull through cache rule.
custom_role_arn(Option<String>)
:The ARN of the IAM role associated with the pull through cache rule.
upstream_repository_prefix(Option<String>)
:The upstream repository prefix associated with the pull through cache rule.
is_valid(bool)
:Whether or not the pull through cache rule was validated. If
true
, Amazon ECR was able to reach the upstream registry and authentication was successful. Iffalse
, there was an issue and validation failed. Thefailure
reason indicates the cause.failure(Option<String>)
:The reason the validation failed. For more details about possible causes and how to address them, see Using pull through cache rules in the Amazon Elastic Container Registry User Guide.
- On failure, responds with
SdkError<ValidatePullThroughCacheRuleError>
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§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_image_scan_complete(&self) -> ImageScanCompleteFluentBuilder
fn wait_until_image_scan_complete(&self) -> ImageScanCompleteFluentBuilder
Source§fn wait_until_lifecycle_policy_preview_complete(
&self,
) -> LifecyclePolicyPreviewCompleteFluentBuilder
fn wait_until_lifecycle_policy_preview_complete( &self, ) -> LifecyclePolicyPreviewCompleteFluentBuilder
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);