Class: Aws::ECR::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ECR::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-ecr/client.rb
Overview
An API client for ECR. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::ECR::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_check_layer_availability(params = {}) ⇒ Types::BatchCheckLayerAvailabilityResponse
Checks the availability of one or more image layers in a repository.
-
#batch_delete_image(params = {}) ⇒ Types::BatchDeleteImageResponse
Deletes a list of specified images within a repository.
-
#batch_get_image(params = {}) ⇒ Types::BatchGetImageResponse
Gets detailed information for an image.
-
#batch_get_repository_scanning_configuration(params = {}) ⇒ Types::BatchGetRepositoryScanningConfigurationResponse
Gets the scanning configuration for one or more repositories.
-
#complete_layer_upload(params = {}) ⇒ Types::CompleteLayerUploadResponse
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID.
-
#create_pull_through_cache_rule(params = {}) ⇒ Types::CreatePullThroughCacheRuleResponse
Creates a pull through cache rule.
-
#create_repository(params = {}) ⇒ Types::CreateRepositoryResponse
Creates a repository.
-
#create_repository_creation_template(params = {}) ⇒ Types::CreateRepositoryCreationTemplateResponse
Creates a repository creation template.
-
#delete_lifecycle_policy(params = {}) ⇒ Types::DeleteLifecyclePolicyResponse
Deletes the lifecycle policy associated with the specified repository.
-
#delete_pull_through_cache_rule(params = {}) ⇒ Types::DeletePullThroughCacheRuleResponse
Deletes a pull through cache rule.
-
#delete_registry_policy(params = {}) ⇒ Types::DeleteRegistryPolicyResponse
Deletes the registry permissions policy.
-
#delete_repository(params = {}) ⇒ Types::DeleteRepositoryResponse
Deletes a repository.
-
#delete_repository_creation_template(params = {}) ⇒ Types::DeleteRepositoryCreationTemplateResponse
Deletes a repository creation template.
-
#delete_repository_policy(params = {}) ⇒ Types::DeleteRepositoryPolicyResponse
Deletes the repository policy associated with the specified repository.
-
#delete_signing_configuration(params = {}) ⇒ Types::DeleteSigningConfigurationResponse
Deletes the registry’s signing configuration.
-
#deregister_pull_time_update_exclusion(params = {}) ⇒ Types::DeregisterPullTimeUpdateExclusionResponse
Removes a principal from the pull time update exclusion list for a registry.
-
#describe_image_replication_status(params = {}) ⇒ Types::DescribeImageReplicationStatusResponse
Returns the replication status for a specified image.
-
#describe_image_scan_findings(params = {}) ⇒ Types::DescribeImageScanFindingsResponse
Returns the scan findings for the specified image.
-
#describe_image_signing_status(params = {}) ⇒ Types::DescribeImageSigningStatusResponse
Returns the signing status for a specified image.
-
#describe_images(params = {}) ⇒ Types::DescribeImagesResponse
Returns metadata about the images in a repository.
-
#describe_pull_through_cache_rules(params = {}) ⇒ Types::DescribePullThroughCacheRulesResponse
Returns the pull through cache rules for a registry.
-
#describe_registry(params = {}) ⇒ Types::DescribeRegistryResponse
Describes the settings for a registry.
-
#describe_repositories(params = {}) ⇒ Types::DescribeRepositoriesResponse
Describes image repositories in a registry.
-
#describe_repository_creation_templates(params = {}) ⇒ Types::DescribeRepositoryCreationTemplatesResponse
Returns details about the repository creation templates in a registry.
-
#get_account_setting(params = {}) ⇒ Types::GetAccountSettingResponse
Retrieves the account setting value for the specified setting name.
-
#get_authorization_token(params = {}) ⇒ Types::GetAuthorizationTokenResponse
Retrieves an authorization token.
-
#get_download_url_for_layer(params = {}) ⇒ Types::GetDownloadUrlForLayerResponse
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
-
#get_lifecycle_policy(params = {}) ⇒ Types::GetLifecyclePolicyResponse
Retrieves the lifecycle policy for the specified repository.
-
#get_lifecycle_policy_preview(params = {}) ⇒ Types::GetLifecyclePolicyPreviewResponse
Retrieves the results of the lifecycle policy preview request for the specified repository.
-
#get_registry_policy(params = {}) ⇒ Types::GetRegistryPolicyResponse
Retrieves the permissions policy for a registry.
-
#get_registry_scanning_configuration(params = {}) ⇒ Types::GetRegistryScanningConfigurationResponse
Retrieves the scanning configuration for a registry.
-
#get_repository_policy(params = {}) ⇒ Types::GetRepositoryPolicyResponse
Retrieves the repository policy for the specified repository.
-
#get_signing_configuration(params = {}) ⇒ Types::GetSigningConfigurationResponse
Retrieves the registry’s signing configuration, which defines rules for automatically signing images using Amazon Web Services Signer.
-
#initiate_layer_upload(params = {}) ⇒ Types::InitiateLayerUploadResponse
Notifies Amazon ECR that you intend to upload an image layer.
-
#list_image_referrers(params = {}) ⇒ Types::ListImageReferrersResponse
Lists the artifacts associated with a specified subject image.
-
#list_images(params = {}) ⇒ Types::ListImagesResponse
Lists all the image IDs for the specified repository.
-
#list_pull_time_update_exclusions(params = {}) ⇒ Types::ListPullTimeUpdateExclusionsResponse
Lists the IAM principals that are excluded from having their image pull times recorded.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List the tags for an Amazon ECR resource.
-
#put_account_setting(params = {}) ⇒ Types::PutAccountSettingResponse
Allows you to change the basic scan type version or registry policy scope.
-
#put_image(params = {}) ⇒ Types::PutImageResponse
Creates or updates the image manifest and tags associated with an image.
-
#put_image_scanning_configuration(params = {}) ⇒ Types::PutImageScanningConfigurationResponse
The ‘PutImageScanningConfiguration` API is being deprecated, in favor of specifying the image scanning configuration at the registry level.
-
#put_image_tag_mutability(params = {}) ⇒ Types::PutImageTagMutabilityResponse
Updates the image tag mutability settings for the specified repository.
-
#put_lifecycle_policy(params = {}) ⇒ Types::PutLifecyclePolicyResponse
Creates or updates the lifecycle policy for the specified repository.
-
#put_registry_policy(params = {}) ⇒ Types::PutRegistryPolicyResponse
Creates or updates the permissions policy for your registry.
-
#put_registry_scanning_configuration(params = {}) ⇒ Types::PutRegistryScanningConfigurationResponse
Creates or updates the scanning configuration for your private registry.
-
#put_replication_configuration(params = {}) ⇒ Types::PutReplicationConfigurationResponse
Creates or updates the replication configuration for a registry.
-
#put_signing_configuration(params = {}) ⇒ Types::PutSigningConfigurationResponse
Creates or updates the registry’s signing configuration, which defines rules for automatically signing images with Amazon Web Services Signer.
-
#register_pull_time_update_exclusion(params = {}) ⇒ Types::RegisterPullTimeUpdateExclusionResponse
Adds an IAM principal to the pull time update exclusion list for a registry.
-
#set_repository_policy(params = {}) ⇒ Types::SetRepositoryPolicyResponse
Applies a repository policy to the specified repository to control access permissions.
-
#start_image_scan(params = {}) ⇒ Types::StartImageScanResponse
Starts a basic image vulnerability scan.
-
#start_lifecycle_policy_preview(params = {}) ⇒ Types::StartLifecyclePolicyPreviewResponse
Starts a preview of a lifecycle policy for the specified repository.
-
#tag_resource(params = {}) ⇒ Struct
Adds specified tags to a resource with the specified ARN.
-
#untag_resource(params = {}) ⇒ Struct
Deletes specified tags from a resource.
-
#update_image_storage_class(params = {}) ⇒ Types::UpdateImageStorageClassResponse
Transitions an image between storage classes.
-
#update_pull_through_cache_rule(params = {}) ⇒ Types::UpdatePullThroughCacheRuleResponse
Updates an existing pull through cache rule.
-
#update_repository_creation_template(params = {}) ⇒ Types::UpdateRepositoryCreationTemplateResponse
Updates an existing repository creation template.
-
#upload_layer_part(params = {}) ⇒ Types::UploadLayerPartResponse
Uploads an image layer part to Amazon ECR.
-
#validate_pull_through_cache_rule(params = {}) ⇒ Types::ValidatePullThroughCacheRuleResponse
Validates an existing pull through cache rule for an upstream registry that requires authentication.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'lib/aws-sdk-ecr/client.rb', line 478 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4656 4657 4658 |
# File 'lib/aws-sdk-ecr/client.rb', line 4656 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4659 4660 4661 |
# File 'lib/aws-sdk-ecr/client.rb', line 4659 def errors_module Errors end |
Instance Method Details
#batch_check_layer_availability(params = {}) ⇒ Types::BatchCheckLayerAvailabilityResponse
Checks the availability of one or more image layers in a repository.
When an image is pushed to a repository, each image layer is checked to verify if it has been uploaded before. If it has been uploaded, then the image layer is skipped.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
537 538 539 540 |
# File 'lib/aws-sdk-ecr/client.rb', line 537 def batch_check_layer_availability(params = {}, = {}) req = build_request(:batch_check_layer_availability, params) req.send_request() end |
#batch_delete_image(params = {}) ⇒ Types::BatchDeleteImageResponse
Deletes a list of specified images within a repository. Images are specified with either an ‘imageTag` or `imageDigest`.
You can remove a tag from an image by specifying the image’s tag in your request. When you remove the last tag from an image, the image is deleted from your repository.
You can completely delete an image (and all of its tags) by specifying the image’s digest in your request.
625 626 627 628 |
# File 'lib/aws-sdk-ecr/client.rb', line 625 def batch_delete_image(params = {}, = {}) req = build_request(:batch_delete_image, params) req.send_request() end |
#batch_get_image(params = {}) ⇒ Types::BatchGetImageResponse
Gets detailed information for an image. Images are specified with either an ‘imageTag` or `imageDigest`.
When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
726 727 728 729 |
# File 'lib/aws-sdk-ecr/client.rb', line 726 def batch_get_image(params = {}, = {}) req = build_request(:batch_get_image, params) req.send_request() end |
#batch_get_repository_scanning_configuration(params = {}) ⇒ Types::BatchGetRepositoryScanningConfigurationResponse
Gets the scanning configuration for one or more repositories.
766 767 768 769 |
# File 'lib/aws-sdk-ecr/client.rb', line 766 def batch_get_repository_scanning_configuration(params = {}, = {}) req = build_request(:batch_get_repository_scanning_configuration, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 |
# File 'lib/aws-sdk-ecr/client.rb', line 4514 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ECR') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-ecr' context[:gem_version] = '1.129.0' Seahorse::Client::Request.new(handlers, context) end |
#complete_layer_upload(params = {}) ⇒ Types::CompleteLayerUploadResponse
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a ‘sha256` digest of the image layer for data validation purposes.
When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
827 828 829 830 |
# File 'lib/aws-sdk-ecr/client.rb', line 827 def complete_layer_upload(params = {}, = {}) req = build_request(:complete_layer_upload, params) req.send_request() end |
#create_pull_through_cache_rule(params = {}) ⇒ Types::CreatePullThroughCacheRuleResponse
Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an upstream registry source in your Amazon ECR private registry. For more information, see [Using pull through cache rules] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html
933 934 935 936 |
# File 'lib/aws-sdk-ecr/client.rb', line 933 def create_pull_through_cache_rule(params = {}, = {}) req = build_request(:create_pull_through_cache_rule, params) req.send_request() end |
#create_repository(params = {}) ⇒ Types::CreateRepositoryResponse
Creates a repository. For more information, see [Amazon ECR repositories] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html
1060 1061 1062 1063 |
# File 'lib/aws-sdk-ecr/client.rb', line 1060 def create_repository(params = {}, = {}) req = build_request(:create_repository, params) req.send_request() end |
#create_repository_creation_template(params = {}) ⇒ Types::CreateRepositoryCreationTemplateResponse
Creates a repository creation template. This template is used to define the settings for repositories created by Amazon ECR on your behalf. For example, repositories created through pull through cache actions. For more information, see [Private repository creation templates] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/repository-creation-templates.html
1254 1255 1256 1257 |
# File 'lib/aws-sdk-ecr/client.rb', line 1254 def create_repository_creation_template(params = {}, = {}) req = build_request(:create_repository_creation_template, params) req.send_request() end |
#delete_lifecycle_policy(params = {}) ⇒ Types::DeleteLifecyclePolicyResponse
Deletes the lifecycle policy associated with the specified repository.
1294 1295 1296 1297 |
# File 'lib/aws-sdk-ecr/client.rb', line 1294 def delete_lifecycle_policy(params = {}, = {}) req = build_request(:delete_lifecycle_policy, params) req.send_request() end |
#delete_pull_through_cache_rule(params = {}) ⇒ Types::DeletePullThroughCacheRuleResponse
Deletes a pull through cache rule.
1341 1342 1343 1344 |
# File 'lib/aws-sdk-ecr/client.rb', line 1341 def delete_pull_through_cache_rule(params = {}, = {}) req = build_request(:delete_pull_through_cache_rule, params) req.send_request() end |
#delete_registry_policy(params = {}) ⇒ Types::DeleteRegistryPolicyResponse
Deletes the registry permissions policy.
1362 1363 1364 1365 |
# File 'lib/aws-sdk-ecr/client.rb', line 1362 def delete_registry_policy(params = {}, = {}) req = build_request(:delete_registry_policy, params) req.send_request() end |
#delete_repository(params = {}) ⇒ Types::DeleteRepositoryResponse
Deletes a repository. If the repository isn’t empty, you must either delete the contents of the repository or use the ‘force` option to delete the repository and have Amazon ECR delete all of its contents on your behalf.
1436 1437 1438 1439 |
# File 'lib/aws-sdk-ecr/client.rb', line 1436 def delete_repository(params = {}, = {}) req = build_request(:delete_repository, params) req.send_request() end |
#delete_repository_creation_template(params = {}) ⇒ Types::DeleteRepositoryCreationTemplateResponse
Deletes a repository creation template.
1507 1508 1509 1510 |
# File 'lib/aws-sdk-ecr/client.rb', line 1507 def delete_repository_creation_template(params = {}, = {}) req = build_request(:delete_repository_creation_template, params) req.send_request() end |
#delete_repository_policy(params = {}) ⇒ Types::DeleteRepositoryPolicyResponse
Deletes the repository policy associated with the specified repository.
1563 1564 1565 1566 |
# File 'lib/aws-sdk-ecr/client.rb', line 1563 def delete_repository_policy(params = {}, = {}) req = build_request(:delete_repository_policy, params) req.send_request() end |
#delete_signing_configuration(params = {}) ⇒ Types::DeleteSigningConfigurationResponse
Deletes the registry’s signing configuration. Images pushed after deletion of the signing configuration will no longer be automatically signed.
For more information, see [Managed signing] in the *Amazon Elastic Container Registry User Guide*.
<note markdown=“1”> Deleting the signing configuration does not affect existing image signatures.
</note>
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/managed-signing.html
1602 1603 1604 1605 |
# File 'lib/aws-sdk-ecr/client.rb', line 1602 def delete_signing_configuration(params = {}, = {}) req = build_request(:delete_signing_configuration, params) req.send_request() end |
#deregister_pull_time_update_exclusion(params = {}) ⇒ Types::DeregisterPullTimeUpdateExclusionResponse
Removes a principal from the pull time update exclusion list for a registry. Once removed, Amazon ECR will resume updating the pull time if the specified principal pulls an image.
1648 1649 1650 1651 |
# File 'lib/aws-sdk-ecr/client.rb', line 1648 def deregister_pull_time_update_exclusion(params = {}, = {}) req = build_request(:deregister_pull_time_update_exclusion, params) req.send_request() end |
#describe_image_replication_status(params = {}) ⇒ Types::DescribeImageReplicationStatusResponse
Returns the replication status for a specified image.
1698 1699 1700 1701 |
# File 'lib/aws-sdk-ecr/client.rb', line 1698 def describe_image_replication_status(params = {}, = {}) req = build_request(:describe_image_replication_status, params) req.send_request() end |
#describe_image_scan_findings(params = {}) ⇒ Types::DescribeImageScanFindingsResponse
Returns the scan findings for the specified image.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* image_scan_complete
1855 1856 1857 1858 |
# File 'lib/aws-sdk-ecr/client.rb', line 1855 def describe_image_scan_findings(params = {}, = {}) req = build_request(:describe_image_scan_findings, params) req.send_request() end |
#describe_image_signing_status(params = {}) ⇒ Types::DescribeImageSigningStatusResponse
Returns the signing status for a specified image. If the image matched signing rules that reference different signing profiles, a status is returned for each profile.
For more information, see [Managed signing] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/managed-signing.html
1916 1917 1918 1919 |
# File 'lib/aws-sdk-ecr/client.rb', line 1916 def describe_image_signing_status(params = {}, = {}) req = build_request(:describe_image_signing_status, params) req.send_request() end |
#describe_images(params = {}) ⇒ Types::DescribeImagesResponse
Returns metadata about the images in a repository.
<note markdown=“1”> Starting with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the ‘docker images` command shows the uncompressed image size. Therefore, Docker might return a larger image than the image shown in the Amazon Web Services Management Console.
</note>
The new version of Amazon ECR *Basic Scanning* doesn’t use the ImageDetail$imageScanFindingsSummary and ImageDetail$imageScanStatus attributes from the API response to return scan results. Use the DescribeImageScanFindings API instead. For more information about Amazon Web Services native basic scanning, see [ Scan images for software vulnerabilities in Amazon ECR].
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2031 2032 2033 2034 |
# File 'lib/aws-sdk-ecr/client.rb', line 2031 def describe_images(params = {}, = {}) req = build_request(:describe_images, params) req.send_request() end |
#describe_pull_through_cache_rules(params = {}) ⇒ Types::DescribePullThroughCacheRulesResponse
Returns the pull through cache rules for a registry.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2102 2103 2104 2105 |
# File 'lib/aws-sdk-ecr/client.rb', line 2102 def describe_pull_through_cache_rules(params = {}, = {}) req = build_request(:describe_pull_through_cache_rules, params) req.send_request() end |
#describe_registry(params = {}) ⇒ Types::DescribeRegistryResponse
Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
2131 2132 2133 2134 |
# File 'lib/aws-sdk-ecr/client.rb', line 2131 def describe_registry(params = {}, = {}) req = build_request(:describe_registry, params) req.send_request() end |
#describe_repositories(params = {}) ⇒ Types::DescribeRepositoriesResponse
Describes image repositories in a registry.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2236 2237 2238 2239 |
# File 'lib/aws-sdk-ecr/client.rb', line 2236 def describe_repositories(params = {}, = {}) req = build_request(:describe_repositories, params) req.send_request() end |
#describe_repository_creation_templates(params = {}) ⇒ Types::DescribeRepositoryCreationTemplatesResponse
Returns details about the repository creation templates in a registry. The ‘prefixes` request parameter can be used to return the details for a specific repository creation template.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2368 2369 2370 2371 |
# File 'lib/aws-sdk-ecr/client.rb', line 2368 def describe_repository_creation_templates(params = {}, = {}) req = build_request(:describe_repository_creation_templates, params) req.send_request() end |
#get_account_setting(params = {}) ⇒ Types::GetAccountSettingResponse
Retrieves the account setting value for the specified setting name.
2399 2400 2401 2402 |
# File 'lib/aws-sdk-ecr/client.rb', line 2399 def get_account_setting(params = {}, = {}) req = build_request(:get_account_setting, params) req.send_request() end |
#get_authorization_token(params = {}) ⇒ Types::GetAuthorizationTokenResponse
Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.
The ‘authorizationToken` returned is a base64 encoded string that can be decoded and used in a `docker login` command to authenticate to a registry. The CLI offers an `get-login-password` command that simplifies the login process. For more information, see [Registry authentication] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth
2465 2466 2467 2468 |
# File 'lib/aws-sdk-ecr/client.rb', line 2465 def (params = {}, = {}) req = build_request(:get_authorization_token, params) req.send_request() end |
#get_download_url_for_layer(params = {}) ⇒ Types::GetDownloadUrlForLayerResponse
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image.
When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
2517 2518 2519 2520 |
# File 'lib/aws-sdk-ecr/client.rb', line 2517 def get_download_url_for_layer(params = {}, = {}) req = build_request(:get_download_url_for_layer, params) req.send_request() end |
#get_lifecycle_policy(params = {}) ⇒ Types::GetLifecyclePolicyResponse
Retrieves the lifecycle policy for the specified repository.
2557 2558 2559 2560 |
# File 'lib/aws-sdk-ecr/client.rb', line 2557 def get_lifecycle_policy(params = {}, = {}) req = build_request(:get_lifecycle_policy, params) req.send_request() end |
#get_lifecycle_policy_preview(params = {}) ⇒ Types::GetLifecyclePolicyPreviewResponse
Retrieves the results of the lifecycle policy preview request for the specified repository.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* lifecycle_policy_preview_complete
2662 2663 2664 2665 |
# File 'lib/aws-sdk-ecr/client.rb', line 2662 def get_lifecycle_policy_preview(params = {}, = {}) req = build_request(:get_lifecycle_policy_preview, params) req.send_request() end |
#get_registry_policy(params = {}) ⇒ Types::GetRegistryPolicyResponse
Retrieves the permissions policy for a registry.
2683 2684 2685 2686 |
# File 'lib/aws-sdk-ecr/client.rb', line 2683 def get_registry_policy(params = {}, = {}) req = build_request(:get_registry_policy, params) req.send_request() end |
#get_registry_scanning_configuration(params = {}) ⇒ Types::GetRegistryScanningConfigurationResponse
Retrieves the scanning configuration for a registry.
2709 2710 2711 2712 |
# File 'lib/aws-sdk-ecr/client.rb', line 2709 def get_registry_scanning_configuration(params = {}, = {}) req = build_request(:get_registry_scanning_configuration, params) req.send_request() end |
#get_repository_policy(params = {}) ⇒ Types::GetRepositoryPolicyResponse
Retrieves the repository policy for the specified repository.
2763 2764 2765 2766 |
# File 'lib/aws-sdk-ecr/client.rb', line 2763 def get_repository_policy(params = {}, = {}) req = build_request(:get_repository_policy, params) req.send_request() end |
#get_signing_configuration(params = {}) ⇒ Types::GetSigningConfigurationResponse
Retrieves the registry’s signing configuration, which defines rules for automatically signing images using Amazon Web Services Signer.
For more information, see [Managed signing] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/managed-signing.html
2796 2797 2798 2799 |
# File 'lib/aws-sdk-ecr/client.rb', line 2796 def get_signing_configuration(params = {}, = {}) req = build_request(:get_signing_configuration, params) req.send_request() end |
#initiate_layer_upload(params = {}) ⇒ Types::InitiateLayerUploadResponse
Notifies Amazon ECR that you intend to upload an image layer.
When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded is determined by the BatchCheckLayerAvailability API action.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
2843 2844 2845 2846 |
# File 'lib/aws-sdk-ecr/client.rb', line 2843 def initiate_layer_upload(params = {}, = {}) req = build_request(:initiate_layer_upload, params) req.send_request() end |
#list_image_referrers(params = {}) ⇒ Types::ListImageReferrersResponse
Lists the artifacts associated with a specified subject image.
<note markdown=“1”> The IAM principal invoking this operation must have the ‘ecr:BatchGetImage` permission.
</note>
3042 3043 3044 3045 |
# File 'lib/aws-sdk-ecr/client.rb', line 3042 def list_image_referrers(params = {}, = {}) req = build_request(:list_image_referrers, params) req.send_request() end |
#list_images(params = {}) ⇒ Types::ListImagesResponse
Lists all the image IDs for the specified repository.
You can filter images based on whether or not they are tagged by using the ‘tagStatus` filter and specifying either `TAGGED`, `UNTAGGED` or `ANY`. For example, you can filter your results to return only `UNTAGGED` images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return only `TAGGED` images to list all of the tags in your repository.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3141 3142 3143 3144 |
# File 'lib/aws-sdk-ecr/client.rb', line 3141 def list_images(params = {}, = {}) req = build_request(:list_images, params) req.send_request() end |
#list_pull_time_update_exclusions(params = {}) ⇒ Types::ListPullTimeUpdateExclusionsResponse
Lists the IAM principals that are excluded from having their image pull times recorded.
3228 3229 3230 3231 |
# File 'lib/aws-sdk-ecr/client.rb', line 3228 def list_pull_time_update_exclusions(params = {}, = {}) req = build_request(:list_pull_time_update_exclusions, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List the tags for an Amazon ECR resource.
3260 3261 3262 3263 |
# File 'lib/aws-sdk-ecr/client.rb', line 3260 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_account_setting(params = {}) ⇒ Types::PutAccountSettingResponse
Allows you to change the basic scan type version or registry policy scope.
3298 3299 3300 3301 |
# File 'lib/aws-sdk-ecr/client.rb', line 3298 def put_account_setting(params = {}, = {}) req = build_request(:put_account_setting, params) req.send_request() end |
#put_image(params = {}) ⇒ Types::PutImageResponse
Creates or updates the image manifest and tags associated with an image.
When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags associated with the image.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
3366 3367 3368 3369 |
# File 'lib/aws-sdk-ecr/client.rb', line 3366 def put_image(params = {}, = {}) req = build_request(:put_image, params) req.send_request() end |
#put_image_scanning_configuration(params = {}) ⇒ Types::PutImageScanningConfigurationResponse
The ‘PutImageScanningConfiguration` API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see PutRegistryScanningConfiguration.
Updates the image scanning configuration for the specified repository.
3418 3419 3420 3421 |
# File 'lib/aws-sdk-ecr/client.rb', line 3418 def put_image_scanning_configuration(params = {}, = {}) req = build_request(:put_image_scanning_configuration, params) req.send_request() end |
#put_image_tag_mutability(params = {}) ⇒ Types::PutImageTagMutabilityResponse
Updates the image tag mutability settings for the specified repository. For more information, see [Image tag mutability] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html
3485 3486 3487 3488 |
# File 'lib/aws-sdk-ecr/client.rb', line 3485 def put_image_tag_mutability(params = {}, = {}) req = build_request(:put_image_tag_mutability, params) req.send_request() end |
#put_lifecycle_policy(params = {}) ⇒ Types::PutLifecyclePolicyResponse
Creates or updates the lifecycle policy for the specified repository. For more information, see [Lifecycle policy template].
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html
3532 3533 3534 3535 |
# File 'lib/aws-sdk-ecr/client.rb', line 3532 def put_lifecycle_policy(params = {}, = {}) req = build_request(:put_lifecycle_policy, params) req.send_request() end |
#put_registry_policy(params = {}) ⇒ Types::PutRegistryPolicyResponse
Creates or updates the permissions policy for your registry.
A registry policy is used to specify permissions for another Amazon Web Services account and is used when configuring cross-account replication. For more information, see [Registry permissions] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/registry-permissions.html
3578 3579 3580 3581 |
# File 'lib/aws-sdk-ecr/client.rb', line 3578 def put_registry_policy(params = {}, = {}) req = build_request(:put_registry_policy, params) req.send_request() end |
#put_registry_scanning_configuration(params = {}) ⇒ Types::PutRegistryScanningConfigurationResponse
Creates or updates the scanning configuration for your private registry.
3640 3641 3642 3643 |
# File 'lib/aws-sdk-ecr/client.rb', line 3640 def put_registry_scanning_configuration(params = {}, = {}) req = build_request(:put_registry_scanning_configuration, params) req.send_request() end |
#put_replication_configuration(params = {}) ⇒ Types::PutReplicationConfigurationResponse
Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see [Using service-linked roles for Amazon ECR] in the *Amazon Elastic Container Registry User Guide*. For more information on the custom role for replication, see [Creating an IAM role for replication].
<note markdown=“1”> When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
</note>
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/using-service-linked-roles.html [2]: docs.aws.amazon.com/AmazonECR/latest/userguide/replication-creation-templates.html#roles-creatingrole-user-console
3711 3712 3713 3714 |
# File 'lib/aws-sdk-ecr/client.rb', line 3711 def put_replication_configuration(params = {}, = {}) req = build_request(:put_replication_configuration, params) req.send_request() end |
#put_signing_configuration(params = {}) ⇒ Types::PutSigningConfigurationResponse
Creates or updates the registry’s signing configuration, which defines rules for automatically signing images with Amazon Web Services Signer.
For more information, see [Managed signing] in the *Amazon Elastic Container Registry User Guide*.
<note markdown=“1”> To successfully generate a signature, the IAM principal pushing images must have permission to sign payloads with the Amazon Web Services Signer signing profile referenced in the signing configuration.
</note>
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/managed-signing.html
3770 3771 3772 3773 |
# File 'lib/aws-sdk-ecr/client.rb', line 3770 def put_signing_configuration(params = {}, = {}) req = build_request(:put_signing_configuration, params) req.send_request() end |
#register_pull_time_update_exclusion(params = {}) ⇒ Types::RegisterPullTimeUpdateExclusionResponse
Adds an IAM principal to the pull time update exclusion list for a registry. Amazon ECR will not record the pull time if an excluded principal pulls an image.
3819 3820 3821 3822 |
# File 'lib/aws-sdk-ecr/client.rb', line 3819 def register_pull_time_update_exclusion(params = {}, = {}) req = build_request(:register_pull_time_update_exclusion, params) req.send_request() end |
#set_repository_policy(params = {}) ⇒ Types::SetRepositoryPolicyResponse
Applies a repository policy to the specified repository to control access permissions. For more information, see [Amazon ECR Repository policies] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policies.html
3880 3881 3882 3883 |
# File 'lib/aws-sdk-ecr/client.rb', line 3880 def set_repository_policy(params = {}, = {}) req = build_request(:set_repository_policy, params) req.send_request() end |
#start_image_scan(params = {}) ⇒ Types::StartImageScanResponse
Starts a basic image vulnerability scan.
A basic image scan can only be started once per 24 hours on an individual image. This limit includes if an image was scanned on initial push. You can start up to 100,000 basic scans per 24 hours. This limit includes both scans on initial push and scans initiated by the StartImageScan API. For more information, see [Basic scanning] in the *Amazon Elastic Container Registry User Guide*.
[1]: docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning-basic.html
3941 3942 3943 3944 |
# File 'lib/aws-sdk-ecr/client.rb', line 3941 def start_image_scan(params = {}, = {}) req = build_request(:start_image_scan, params) req.send_request() end |
#start_lifecycle_policy_preview(params = {}) ⇒ Types::StartLifecyclePolicyPreviewResponse
Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
3988 3989 3990 3991 |
# File 'lib/aws-sdk-ecr/client.rb', line 3988 def start_lifecycle_policy_preview(params = {}, = {}) req = build_request(:start_lifecycle_policy_preview, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.
4025 4026 4027 4028 |
# File 'lib/aws-sdk-ecr/client.rb', line 4025 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Deletes specified tags from a resource.
4053 4054 4055 4056 |
# File 'lib/aws-sdk-ecr/client.rb', line 4053 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_image_storage_class(params = {}) ⇒ Types::UpdateImageStorageClassResponse
Transitions an image between storage classes. You can transition images from Amazon ECR standard storage class to Amazon ECR archival storage class for long-term storage, or restore archived images back to Amazon ECR standard.
4157 4158 4159 4160 |
# File 'lib/aws-sdk-ecr/client.rb', line 4157 def update_image_storage_class(params = {}, = {}) req = build_request(:update_image_storage_class, params) req.send_request() end |
#update_pull_through_cache_rule(params = {}) ⇒ Types::UpdatePullThroughCacheRuleResponse
Updates an existing pull through cache rule.
4214 4215 4216 4217 |
# File 'lib/aws-sdk-ecr/client.rb', line 4214 def update_pull_through_cache_rule(params = {}, = {}) req = build_request(:update_pull_through_cache_rule, params) req.send_request() end |
#update_repository_creation_template(params = {}) ⇒ Types::UpdateRepositoryCreationTemplateResponse
Updates an existing repository creation template.
4383 4384 4385 4386 |
# File 'lib/aws-sdk-ecr/client.rb', line 4383 def update_repository_creation_template(params = {}, = {}) req = build_request(:update_repository_creation_template, params) req.send_request() end |
#upload_layer_part(params = {}) ⇒ Types::UploadLayerPartResponse
Uploads an image layer part to Amazon ECR.
When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API is called once per each new image layer part.
<note markdown=“1”> This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the ‘docker` CLI to pull, tag, and push images.
</note>
4453 4454 4455 4456 |
# File 'lib/aws-sdk-ecr/client.rb', line 4453 def upload_layer_part(params = {}, = {}) req = build_request(:upload_layer_part, params) req.send_request() end |
#validate_pull_through_cache_rule(params = {}) ⇒ Types::ValidatePullThroughCacheRuleResponse
Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.
4505 4506 4507 4508 |
# File 'lib/aws-sdk-ecr/client.rb', line 4505 def validate_pull_through_cache_rule(params = {}, = {}) req = build_request(:validate_pull_through_cache_rule, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ——————————— | ————————————- | ——– | ————- | | image_scan_complete | #describe_image_scan_findings | 5 | 60 | | lifecycle_policy_preview_complete | #get_lifecycle_policy_preview | 5 | 20 |
4621 4622 4623 4624 4625 |
# File 'lib/aws-sdk-ecr/client.rb', line 4621 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4629 4630 4631 |
# File 'lib/aws-sdk-ecr/client.rb', line 4629 def waiter_names waiters.keys end |