aws-sdk-ecr 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 550c05cc325f6d13ec968bd24d30ebdab9798bea
4
+ data.tar.gz: 8808b15bb4cceea1e70952a38f464d958f46a48c
5
+ SHA512:
6
+ metadata.gz: bfaa4b586b0527b4cc9852a9f65207a2e8be95dfcfc2ab380c78b0c1f3bd4b9b42bd8f2cb1e93703a23f50774c31acc50a271d063cbbfd4c4db4cb8967c781bc
7
+ data.tar.gz: 2320655cc1b4e281a6f0105ad25a590df314883bdf5cd6110859922b30c585fda3d51e1591abdec108aa6b80f6aee2dcb19e40ab0d684a43bdefc532e48df11b
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-ecr/types'
12
+ require_relative 'aws-sdk-ecr/client_api'
13
+ require_relative 'aws-sdk-ecr/client'
14
+ require_relative 'aws-sdk-ecr/errors'
15
+ require_relative 'aws-sdk-ecr/resource'
16
+ require_relative 'aws-sdk-ecr/customizations'
17
+
18
+ # This module provides support for Amazon EC2 Container Registry. This module is available in the
19
+ # `aws-sdk-ecr` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon EC2 Container Registry all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::ECR::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::ECR
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,926 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ecr)
25
+
26
+ module Aws
27
+ module ECR
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :ecr
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Check the availability of multiple image layers in a specified
143
+ # registry and repository.
144
+ #
145
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
146
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
147
+ # push images.
148
+ #
149
+ # </note>
150
+ # @option params [String] :registry_id
151
+ # The AWS account ID associated with the registry that contains the
152
+ # image layers to check. If you do not specify a registry, the default
153
+ # registry is assumed.
154
+ # @option params [required, String] :repository_name
155
+ # The name of the repository that is associated with the image layers to
156
+ # check.
157
+ # @option params [required, Array<String>] :layer_digests
158
+ # The digests of the image layers to check.
159
+ # @return [Types::BatchCheckLayerAvailabilityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
160
+ #
161
+ # * {Types::BatchCheckLayerAvailabilityResponse#layers #layers} => Array&lt;Types::Layer&gt;
162
+ # * {Types::BatchCheckLayerAvailabilityResponse#failures #failures} => Array&lt;Types::LayerFailure&gt;
163
+ #
164
+ # @example Request syntax with placeholder values
165
+ # resp = client.batch_check_layer_availability({
166
+ # registry_id: "RegistryId",
167
+ # repository_name: "RepositoryName", # required
168
+ # layer_digests: ["BatchedOperationLayerDigest"], # required
169
+ # })
170
+ #
171
+ # @example Response structure
172
+ # resp.layers #=> Array
173
+ # resp.layers[0].layer_digest #=> String
174
+ # resp.layers[0].layer_availability #=> String, one of "AVAILABLE", "UNAVAILABLE"
175
+ # resp.layers[0].layer_size #=> Integer
176
+ # resp.failures #=> Array
177
+ # resp.failures[0].layer_digest #=> String
178
+ # resp.failures[0].failure_code #=> String, one of "InvalidLayerDigest", "MissingLayerDigest"
179
+ # resp.failures[0].failure_reason #=> String
180
+ # @overload batch_check_layer_availability(params = {})
181
+ # @param [Hash] params ({})
182
+ def batch_check_layer_availability(params = {}, options = {})
183
+ req = build_request(:batch_check_layer_availability, params)
184
+ req.send_request(options)
185
+ end
186
+
187
+ # Deletes a list of specified images within a specified repository.
188
+ # Images are specified with either `imageTag` or `imageDigest`.
189
+ # @option params [String] :registry_id
190
+ # The AWS account ID associated with the registry that contains the
191
+ # image to delete. If you do not specify a registry, the default
192
+ # registry is assumed.
193
+ # @option params [required, String] :repository_name
194
+ # The repository that contains the image to delete.
195
+ # @option params [required, Array<Types::ImageIdentifier>] :image_ids
196
+ # A list of image ID references that correspond to images to delete. The
197
+ # format of the `imageIds` reference is `imageTag=tag` or
198
+ # `imageDigest=digest`.
199
+ # @return [Types::BatchDeleteImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
200
+ #
201
+ # * {Types::BatchDeleteImageResponse#image_ids #imageIds} => Array&lt;Types::ImageIdentifier&gt;
202
+ # * {Types::BatchDeleteImageResponse#failures #failures} => Array&lt;Types::ImageFailure&gt;
203
+ #
204
+ # @example Request syntax with placeholder values
205
+ # resp = client.batch_delete_image({
206
+ # registry_id: "RegistryId",
207
+ # repository_name: "RepositoryName", # required
208
+ # image_ids: [ # required
209
+ # {
210
+ # image_digest: "ImageDigest",
211
+ # image_tag: "ImageTag",
212
+ # },
213
+ # ],
214
+ # })
215
+ #
216
+ # @example Response structure
217
+ # resp.image_ids #=> Array
218
+ # resp.image_ids[0].image_digest #=> String
219
+ # resp.image_ids[0].image_tag #=> String
220
+ # resp.failures #=> Array
221
+ # resp.failures[0].image_id.image_digest #=> String
222
+ # resp.failures[0].image_id.image_tag #=> String
223
+ # resp.failures[0].failure_code #=> String, one of "InvalidImageDigest", "InvalidImageTag", "ImageTagDoesNotMatchDigest", "ImageNotFound", "MissingDigestAndTag"
224
+ # resp.failures[0].failure_reason #=> String
225
+ # @overload batch_delete_image(params = {})
226
+ # @param [Hash] params ({})
227
+ def batch_delete_image(params = {}, options = {})
228
+ req = build_request(:batch_delete_image, params)
229
+ req.send_request(options)
230
+ end
231
+
232
+ # Gets detailed information for specified images within a specified
233
+ # repository. Images are specified with either `imageTag` or
234
+ # `imageDigest`.
235
+ # @option params [String] :registry_id
236
+ # The AWS account ID associated with the registry that contains the
237
+ # images to describe. If you do not specify a registry, the default
238
+ # registry is assumed.
239
+ # @option params [required, String] :repository_name
240
+ # The repository that contains the images to describe.
241
+ # @option params [required, Array<Types::ImageIdentifier>] :image_ids
242
+ # A list of image ID references that correspond to images to describe.
243
+ # The format of the `imageIds` reference is `imageTag=tag` or
244
+ # `imageDigest=digest`.
245
+ # @return [Types::BatchGetImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
246
+ #
247
+ # * {Types::BatchGetImageResponse#images #images} => Array&lt;Types::Image&gt;
248
+ # * {Types::BatchGetImageResponse#failures #failures} => Array&lt;Types::ImageFailure&gt;
249
+ #
250
+ # @example Request syntax with placeholder values
251
+ # resp = client.batch_get_image({
252
+ # registry_id: "RegistryId",
253
+ # repository_name: "RepositoryName", # required
254
+ # image_ids: [ # required
255
+ # {
256
+ # image_digest: "ImageDigest",
257
+ # image_tag: "ImageTag",
258
+ # },
259
+ # ],
260
+ # })
261
+ #
262
+ # @example Response structure
263
+ # resp.images #=> Array
264
+ # resp.images[0].registry_id #=> String
265
+ # resp.images[0].repository_name #=> String
266
+ # resp.images[0].image_id.image_digest #=> String
267
+ # resp.images[0].image_id.image_tag #=> String
268
+ # resp.images[0].image_manifest #=> String
269
+ # resp.failures #=> Array
270
+ # resp.failures[0].image_id.image_digest #=> String
271
+ # resp.failures[0].image_id.image_tag #=> String
272
+ # resp.failures[0].failure_code #=> String, one of "InvalidImageDigest", "InvalidImageTag", "ImageTagDoesNotMatchDigest", "ImageNotFound", "MissingDigestAndTag"
273
+ # resp.failures[0].failure_reason #=> String
274
+ # @overload batch_get_image(params = {})
275
+ # @param [Hash] params ({})
276
+ def batch_get_image(params = {}, options = {})
277
+ req = build_request(:batch_get_image, params)
278
+ req.send_request(options)
279
+ end
280
+
281
+ # Inform Amazon ECR that the image layer upload for a specified
282
+ # registry, repository name, and upload ID, has completed. You can
283
+ # optionally provide a `sha256` digest of the image layer for data
284
+ # validation purposes.
285
+ #
286
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
287
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
288
+ # push images.
289
+ #
290
+ # </note>
291
+ # @option params [String] :registry_id
292
+ # The AWS account ID associated with the registry to which to upload
293
+ # layers. If you do not specify a registry, the default registry is
294
+ # assumed.
295
+ # @option params [required, String] :repository_name
296
+ # The name of the repository to associate with the image layer.
297
+ # @option params [required, String] :upload_id
298
+ # The upload ID from a previous InitiateLayerUpload operation to
299
+ # associate with the image layer.
300
+ # @option params [required, Array<String>] :layer_digests
301
+ # The `sha256` digest of the image layer.
302
+ # @return [Types::CompleteLayerUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
303
+ #
304
+ # * {Types::CompleteLayerUploadResponse#registry_id #registryId} => String
305
+ # * {Types::CompleteLayerUploadResponse#repository_name #repositoryName} => String
306
+ # * {Types::CompleteLayerUploadResponse#upload_id #uploadId} => String
307
+ # * {Types::CompleteLayerUploadResponse#layer_digest #layerDigest} => String
308
+ #
309
+ # @example Request syntax with placeholder values
310
+ # resp = client.complete_layer_upload({
311
+ # registry_id: "RegistryId",
312
+ # repository_name: "RepositoryName", # required
313
+ # upload_id: "UploadId", # required
314
+ # layer_digests: ["LayerDigest"], # required
315
+ # })
316
+ #
317
+ # @example Response structure
318
+ # resp.registry_id #=> String
319
+ # resp.repository_name #=> String
320
+ # resp.upload_id #=> String
321
+ # resp.layer_digest #=> String
322
+ # @overload complete_layer_upload(params = {})
323
+ # @param [Hash] params ({})
324
+ def complete_layer_upload(params = {}, options = {})
325
+ req = build_request(:complete_layer_upload, params)
326
+ req.send_request(options)
327
+ end
328
+
329
+ # Creates an image repository.
330
+ # @option params [required, String] :repository_name
331
+ # The name to use for the repository. The repository name may be
332
+ # specified on its own (such as `nginx-web-app`) or it can be prepended
333
+ # with a namespace to group the repository into a category (such as
334
+ # `project-a/nginx-web-app`).
335
+ # @return [Types::CreateRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
336
+ #
337
+ # * {Types::CreateRepositoryResponse#repository #repository} => Types::Repository
338
+ #
339
+ # @example Request syntax with placeholder values
340
+ # resp = client.create_repository({
341
+ # repository_name: "RepositoryName", # required
342
+ # })
343
+ #
344
+ # @example Response structure
345
+ # resp.repository.repository_arn #=> String
346
+ # resp.repository.registry_id #=> String
347
+ # resp.repository.repository_name #=> String
348
+ # resp.repository.repository_uri #=> String
349
+ # resp.repository.created_at #=> Time
350
+ # @overload create_repository(params = {})
351
+ # @param [Hash] params ({})
352
+ def create_repository(params = {}, options = {})
353
+ req = build_request(:create_repository, params)
354
+ req.send_request(options)
355
+ end
356
+
357
+ # Deletes an existing image repository. If a repository contains images,
358
+ # you must use the `force` option to delete it.
359
+ # @option params [String] :registry_id
360
+ # The AWS account ID associated with the registry that contains the
361
+ # repository to delete. If you do not specify a registry, the default
362
+ # registry is assumed.
363
+ # @option params [required, String] :repository_name
364
+ # The name of the repository to delete.
365
+ # @option params [Boolean] :force
366
+ # Force the deletion of the repository if it contains images.
367
+ # @return [Types::DeleteRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
368
+ #
369
+ # * {Types::DeleteRepositoryResponse#repository #repository} => Types::Repository
370
+ #
371
+ # @example Request syntax with placeholder values
372
+ # resp = client.delete_repository({
373
+ # registry_id: "RegistryId",
374
+ # repository_name: "RepositoryName", # required
375
+ # force: false,
376
+ # })
377
+ #
378
+ # @example Response structure
379
+ # resp.repository.repository_arn #=> String
380
+ # resp.repository.registry_id #=> String
381
+ # resp.repository.repository_name #=> String
382
+ # resp.repository.repository_uri #=> String
383
+ # resp.repository.created_at #=> Time
384
+ # @overload delete_repository(params = {})
385
+ # @param [Hash] params ({})
386
+ def delete_repository(params = {}, options = {})
387
+ req = build_request(:delete_repository, params)
388
+ req.send_request(options)
389
+ end
390
+
391
+ # Deletes the repository policy from a specified repository.
392
+ # @option params [String] :registry_id
393
+ # The AWS account ID associated with the registry that contains the
394
+ # repository policy to delete. If you do not specify a registry, the
395
+ # default registry is assumed.
396
+ # @option params [required, String] :repository_name
397
+ # The name of the repository that is associated with the repository
398
+ # policy to delete.
399
+ # @return [Types::DeleteRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
400
+ #
401
+ # * {Types::DeleteRepositoryPolicyResponse#registry_id #registryId} => String
402
+ # * {Types::DeleteRepositoryPolicyResponse#repository_name #repositoryName} => String
403
+ # * {Types::DeleteRepositoryPolicyResponse#policy_text #policyText} => String
404
+ #
405
+ # @example Request syntax with placeholder values
406
+ # resp = client.delete_repository_policy({
407
+ # registry_id: "RegistryId",
408
+ # repository_name: "RepositoryName", # required
409
+ # })
410
+ #
411
+ # @example Response structure
412
+ # resp.registry_id #=> String
413
+ # resp.repository_name #=> String
414
+ # resp.policy_text #=> String
415
+ # @overload delete_repository_policy(params = {})
416
+ # @param [Hash] params ({})
417
+ def delete_repository_policy(params = {}, options = {})
418
+ req = build_request(:delete_repository_policy, params)
419
+ req.send_request(options)
420
+ end
421
+
422
+ # Returns metadata about the images in a repository, including image
423
+ # size and creation date.
424
+ #
425
+ # <note markdown="1"> Beginning with Docker version 1.9, the Docker client compresses image
426
+ # layers before pushing them to a V2 Docker registry. The output of the
427
+ # `docker images` command shows the uncompressed image size, so it may
428
+ # return a larger image size than the image sizes returned by
429
+ # DescribeImages.
430
+ #
431
+ # </note>
432
+ # @option params [String] :registry_id
433
+ # The AWS account ID associated with the registry that contains the
434
+ # repository in which to list images. If you do not specify a registry,
435
+ # the default registry is assumed.
436
+ # @option params [required, String] :repository_name
437
+ # A list of repositories to describe. If this parameter is omitted, then
438
+ # all repositories in a registry are described.
439
+ # @option params [Array<Types::ImageIdentifier>] :image_ids
440
+ # The list of image IDs for the requested repository.
441
+ # @option params [String] :next_token
442
+ # The `nextToken` value returned from a previous paginated
443
+ # `DescribeImages` request where `maxResults` was used and the results
444
+ # exceeded the value of that parameter. Pagination continues from the
445
+ # end of the previous results that returned the `nextToken` value. This
446
+ # value is `null` when there are no more results to return.
447
+ # @option params [Integer] :max_results
448
+ # The maximum number of repository results returned by `DescribeImages`
449
+ # in paginated output. When this parameter is used, `DescribeImages`
450
+ # only returns `maxResults` results in a single page along with a
451
+ # `nextToken` response element. The remaining results of the initial
452
+ # request can be seen by sending another `DescribeImages` request with
453
+ # the returned `nextToken` value. This value can be between 1 and 100.
454
+ # If this parameter is not used, then `DescribeImages` returns up to 100
455
+ # results and a `nextToken` value, if applicable.
456
+ # @option params [Types::DescribeImagesFilter] :filter
457
+ # The filter key and value with which to filter your `DescribeImages`
458
+ # results.
459
+ # @return [Types::DescribeImagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
460
+ #
461
+ # * {Types::DescribeImagesResponse#image_details #imageDetails} => Array&lt;Types::ImageDetail&gt;
462
+ # * {Types::DescribeImagesResponse#next_token #nextToken} => String
463
+ #
464
+ # @example Request syntax with placeholder values
465
+ # resp = client.describe_images({
466
+ # registry_id: "RegistryId",
467
+ # repository_name: "RepositoryName", # required
468
+ # image_ids: [
469
+ # {
470
+ # image_digest: "ImageDigest",
471
+ # image_tag: "ImageTag",
472
+ # },
473
+ # ],
474
+ # next_token: "NextToken",
475
+ # max_results: 1,
476
+ # filter: {
477
+ # tag_status: "TAGGED", # accepts TAGGED, UNTAGGED
478
+ # },
479
+ # })
480
+ #
481
+ # @example Response structure
482
+ # resp.image_details #=> Array
483
+ # resp.image_details[0].registry_id #=> String
484
+ # resp.image_details[0].repository_name #=> String
485
+ # resp.image_details[0].image_digest #=> String
486
+ # resp.image_details[0].image_tags #=> Array
487
+ # resp.image_details[0].image_tags[0] #=> String
488
+ # resp.image_details[0].image_size_in_bytes #=> Integer
489
+ # resp.image_details[0].image_pushed_at #=> Time
490
+ # resp.next_token #=> String
491
+ # @overload describe_images(params = {})
492
+ # @param [Hash] params ({})
493
+ def describe_images(params = {}, options = {})
494
+ req = build_request(:describe_images, params)
495
+ req.send_request(options)
496
+ end
497
+
498
+ # Describes image repositories in a registry.
499
+ # @option params [String] :registry_id
500
+ # The AWS account ID associated with the registry that contains the
501
+ # repositories to be described. If you do not specify a registry, the
502
+ # default registry is assumed.
503
+ # @option params [Array<String>] :repository_names
504
+ # A list of repositories to describe. If this parameter is omitted, then
505
+ # all repositories in a registry are described.
506
+ # @option params [String] :next_token
507
+ # The `nextToken` value returned from a previous paginated
508
+ # `DescribeRepositories` request where `maxResults` was used and the
509
+ # results exceeded the value of that parameter. Pagination continues
510
+ # from the end of the previous results that returned the `nextToken`
511
+ # value. This value is `null` when there are no more results to return.
512
+ #
513
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
514
+ # to retrieve the next items in a list and not for other programmatic
515
+ # purposes.
516
+ #
517
+ # </note>
518
+ # @option params [Integer] :max_results
519
+ # The maximum number of repository results returned by
520
+ # `DescribeRepositories` in paginated output. When this parameter is
521
+ # used, `DescribeRepositories` only returns `maxResults` results in a
522
+ # single page along with a `nextToken` response element. The remaining
523
+ # results of the initial request can be seen by sending another
524
+ # `DescribeRepositories` request with the returned `nextToken` value.
525
+ # This value can be between 1 and 100. If this parameter is not used,
526
+ # then `DescribeRepositories` returns up to 100 results and a
527
+ # `nextToken` value, if applicable.
528
+ # @return [Types::DescribeRepositoriesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
529
+ #
530
+ # * {Types::DescribeRepositoriesResponse#repositories #repositories} => Array&lt;Types::Repository&gt;
531
+ # * {Types::DescribeRepositoriesResponse#next_token #nextToken} => String
532
+ #
533
+ # @example Request syntax with placeholder values
534
+ # resp = client.describe_repositories({
535
+ # registry_id: "RegistryId",
536
+ # repository_names: ["RepositoryName"],
537
+ # next_token: "NextToken",
538
+ # max_results: 1,
539
+ # })
540
+ #
541
+ # @example Response structure
542
+ # resp.repositories #=> Array
543
+ # resp.repositories[0].repository_arn #=> String
544
+ # resp.repositories[0].registry_id #=> String
545
+ # resp.repositories[0].repository_name #=> String
546
+ # resp.repositories[0].repository_uri #=> String
547
+ # resp.repositories[0].created_at #=> Time
548
+ # resp.next_token #=> String
549
+ # @overload describe_repositories(params = {})
550
+ # @param [Hash] params ({})
551
+ def describe_repositories(params = {}, options = {})
552
+ req = build_request(:describe_repositories, params)
553
+ req.send_request(options)
554
+ end
555
+
556
+ # Retrieves a token that is valid for a specified registry for 12 hours.
557
+ # This command allows you to use the `docker` CLI to push and pull
558
+ # images with Amazon ECR. If you do not specify a registry, the default
559
+ # registry is assumed.
560
+ #
561
+ # The `authorizationToken` returned for each registry specified is a
562
+ # base64 encoded string that can be decoded and used in a `docker login`
563
+ # command to authenticate to a registry. The AWS CLI offers an `aws ecr
564
+ # get-login` command that simplifies the login process.
565
+ # @option params [Array<String>] :registry_ids
566
+ # A list of AWS account IDs that are associated with the registries for
567
+ # which to get authorization tokens. If you do not specify a registry,
568
+ # the default registry is assumed.
569
+ # @return [Types::GetAuthorizationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
570
+ #
571
+ # * {Types::GetAuthorizationTokenResponse#authorization_data #authorizationData} => Array&lt;Types::AuthorizationData&gt;
572
+ #
573
+ # @example Request syntax with placeholder values
574
+ # resp = client.get_authorization_token({
575
+ # registry_ids: ["RegistryId"],
576
+ # })
577
+ #
578
+ # @example Response structure
579
+ # resp.authorization_data #=> Array
580
+ # resp.authorization_data[0].authorization_token #=> String
581
+ # resp.authorization_data[0].expires_at #=> Time
582
+ # resp.authorization_data[0].proxy_endpoint #=> String
583
+ # @overload get_authorization_token(params = {})
584
+ # @param [Hash] params ({})
585
+ def get_authorization_token(params = {}, options = {})
586
+ req = build_request(:get_authorization_token, params)
587
+ req.send_request(options)
588
+ end
589
+
590
+ # Retrieves the pre-signed Amazon S3 download URL corresponding to an
591
+ # image layer. You can only get URLs for image layers that are
592
+ # referenced in an image.
593
+ #
594
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
595
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
596
+ # push images.
597
+ #
598
+ # </note>
599
+ # @option params [String] :registry_id
600
+ # The AWS account ID associated with the registry that contains the
601
+ # image layer to download. If you do not specify a registry, the default
602
+ # registry is assumed.
603
+ # @option params [required, String] :repository_name
604
+ # The name of the repository that is associated with the image layer to
605
+ # download.
606
+ # @option params [required, String] :layer_digest
607
+ # The digest of the image layer to download.
608
+ # @return [Types::GetDownloadUrlForLayerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
609
+ #
610
+ # * {Types::GetDownloadUrlForLayerResponse#download_url #downloadUrl} => String
611
+ # * {Types::GetDownloadUrlForLayerResponse#layer_digest #layerDigest} => String
612
+ #
613
+ # @example Request syntax with placeholder values
614
+ # resp = client.get_download_url_for_layer({
615
+ # registry_id: "RegistryId",
616
+ # repository_name: "RepositoryName", # required
617
+ # layer_digest: "LayerDigest", # required
618
+ # })
619
+ #
620
+ # @example Response structure
621
+ # resp.download_url #=> String
622
+ # resp.layer_digest #=> String
623
+ # @overload get_download_url_for_layer(params = {})
624
+ # @param [Hash] params ({})
625
+ def get_download_url_for_layer(params = {}, options = {})
626
+ req = build_request(:get_download_url_for_layer, params)
627
+ req.send_request(options)
628
+ end
629
+
630
+ # Retrieves the repository policy for a specified repository.
631
+ # @option params [String] :registry_id
632
+ # The AWS account ID associated with the registry that contains the
633
+ # repository. If you do not specify a registry, the default registry is
634
+ # assumed.
635
+ # @option params [required, String] :repository_name
636
+ # The name of the repository whose policy you want to retrieve.
637
+ # @return [Types::GetRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
638
+ #
639
+ # * {Types::GetRepositoryPolicyResponse#registry_id #registryId} => String
640
+ # * {Types::GetRepositoryPolicyResponse#repository_name #repositoryName} => String
641
+ # * {Types::GetRepositoryPolicyResponse#policy_text #policyText} => String
642
+ #
643
+ # @example Request syntax with placeholder values
644
+ # resp = client.get_repository_policy({
645
+ # registry_id: "RegistryId",
646
+ # repository_name: "RepositoryName", # required
647
+ # })
648
+ #
649
+ # @example Response structure
650
+ # resp.registry_id #=> String
651
+ # resp.repository_name #=> String
652
+ # resp.policy_text #=> String
653
+ # @overload get_repository_policy(params = {})
654
+ # @param [Hash] params ({})
655
+ def get_repository_policy(params = {}, options = {})
656
+ req = build_request(:get_repository_policy, params)
657
+ req.send_request(options)
658
+ end
659
+
660
+ # Notify Amazon ECR that you intend to upload an image layer.
661
+ #
662
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
663
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
664
+ # push images.
665
+ #
666
+ # </note>
667
+ # @option params [String] :registry_id
668
+ # The AWS account ID associated with the registry that you intend to
669
+ # upload layers to. If you do not specify a registry, the default
670
+ # registry is assumed.
671
+ # @option params [required, String] :repository_name
672
+ # The name of the repository that you intend to upload layers to.
673
+ # @return [Types::InitiateLayerUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
674
+ #
675
+ # * {Types::InitiateLayerUploadResponse#upload_id #uploadId} => String
676
+ # * {Types::InitiateLayerUploadResponse#part_size #partSize} => Integer
677
+ #
678
+ # @example Request syntax with placeholder values
679
+ # resp = client.initiate_layer_upload({
680
+ # registry_id: "RegistryId",
681
+ # repository_name: "RepositoryName", # required
682
+ # })
683
+ #
684
+ # @example Response structure
685
+ # resp.upload_id #=> String
686
+ # resp.part_size #=> Integer
687
+ # @overload initiate_layer_upload(params = {})
688
+ # @param [Hash] params ({})
689
+ def initiate_layer_upload(params = {}, options = {})
690
+ req = build_request(:initiate_layer_upload, params)
691
+ req.send_request(options)
692
+ end
693
+
694
+ # Lists all the image IDs for a given repository.
695
+ #
696
+ # You can filter images based on whether or not they are tagged by
697
+ # setting the `tagStatus` parameter to `TAGGED` or `UNTAGGED`. For
698
+ # example, you can filter your results to return only `UNTAGGED` images
699
+ # and then pipe that result to a BatchDeleteImage operation to delete
700
+ # them. Or, you can filter your results to return only `TAGGED` images
701
+ # to list all of the tags in your repository.
702
+ # @option params [String] :registry_id
703
+ # The AWS account ID associated with the registry that contains the
704
+ # repository to list images in. If you do not specify a registry, the
705
+ # default registry is assumed.
706
+ # @option params [required, String] :repository_name
707
+ # The repository whose image IDs are to be listed.
708
+ # @option params [String] :next_token
709
+ # The `nextToken` value returned from a previous paginated `ListImages`
710
+ # request where `maxResults` was used and the results exceeded the value
711
+ # of that parameter. Pagination continues from the end of the previous
712
+ # results that returned the `nextToken` value. This value is `null` when
713
+ # there are no more results to return.
714
+ #
715
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
716
+ # to retrieve the next items in a list and not for other programmatic
717
+ # purposes.
718
+ #
719
+ # </note>
720
+ # @option params [Integer] :max_results
721
+ # The maximum number of image results returned by `ListImages` in
722
+ # paginated output. When this parameter is used, `ListImages` only
723
+ # returns `maxResults` results in a single page along with a `nextToken`
724
+ # response element. The remaining results of the initial request can be
725
+ # seen by sending another `ListImages` request with the returned
726
+ # `nextToken` value. This value can be between 1 and 100. If this
727
+ # parameter is not used, then `ListImages` returns up to 100 results and
728
+ # a `nextToken` value, if applicable.
729
+ # @option params [Types::ListImagesFilter] :filter
730
+ # The filter key and value with which to filter your `ListImages`
731
+ # results.
732
+ # @return [Types::ListImagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
733
+ #
734
+ # * {Types::ListImagesResponse#image_ids #imageIds} => Array&lt;Types::ImageIdentifier&gt;
735
+ # * {Types::ListImagesResponse#next_token #nextToken} => String
736
+ #
737
+ # @example Request syntax with placeholder values
738
+ # resp = client.list_images({
739
+ # registry_id: "RegistryId",
740
+ # repository_name: "RepositoryName", # required
741
+ # next_token: "NextToken",
742
+ # max_results: 1,
743
+ # filter: {
744
+ # tag_status: "TAGGED", # accepts TAGGED, UNTAGGED
745
+ # },
746
+ # })
747
+ #
748
+ # @example Response structure
749
+ # resp.image_ids #=> Array
750
+ # resp.image_ids[0].image_digest #=> String
751
+ # resp.image_ids[0].image_tag #=> String
752
+ # resp.next_token #=> String
753
+ # @overload list_images(params = {})
754
+ # @param [Hash] params ({})
755
+ def list_images(params = {}, options = {})
756
+ req = build_request(:list_images, params)
757
+ req.send_request(options)
758
+ end
759
+
760
+ # Creates or updates the image manifest associated with an image.
761
+ #
762
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
763
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
764
+ # push images.
765
+ #
766
+ # </note>
767
+ # @option params [String] :registry_id
768
+ # The AWS account ID associated with the registry that contains the
769
+ # repository in which to put the image. If you do not specify a
770
+ # registry, the default registry is assumed.
771
+ # @option params [required, String] :repository_name
772
+ # The name of the repository in which to put the image.
773
+ # @option params [required, String] :image_manifest
774
+ # The image manifest corresponding to the image to be uploaded.
775
+ # @return [Types::PutImageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
776
+ #
777
+ # * {Types::PutImageResponse#image #image} => Types::Image
778
+ #
779
+ # @example Request syntax with placeholder values
780
+ # resp = client.put_image({
781
+ # registry_id: "RegistryId",
782
+ # repository_name: "RepositoryName", # required
783
+ # image_manifest: "ImageManifest", # required
784
+ # })
785
+ #
786
+ # @example Response structure
787
+ # resp.image.registry_id #=> String
788
+ # resp.image.repository_name #=> String
789
+ # resp.image.image_id.image_digest #=> String
790
+ # resp.image.image_id.image_tag #=> String
791
+ # resp.image.image_manifest #=> String
792
+ # @overload put_image(params = {})
793
+ # @param [Hash] params ({})
794
+ def put_image(params = {}, options = {})
795
+ req = build_request(:put_image, params)
796
+ req.send_request(options)
797
+ end
798
+
799
+ # Applies a repository policy on a specified repository to control
800
+ # access permissions.
801
+ # @option params [String] :registry_id
802
+ # The AWS account ID associated with the registry that contains the
803
+ # repository. If you do not specify a registry, the default registry is
804
+ # assumed.
805
+ # @option params [required, String] :repository_name
806
+ # The name of the repository to receive the policy.
807
+ # @option params [required, String] :policy_text
808
+ # The JSON repository policy text to apply to the repository.
809
+ # @option params [Boolean] :force
810
+ # If the policy you are attempting to set on a repository policy would
811
+ # prevent you from setting another policy in the future, you must force
812
+ # the SetRepositoryPolicy operation. This is intended to prevent
813
+ # accidental repository lock outs.
814
+ # @return [Types::SetRepositoryPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
815
+ #
816
+ # * {Types::SetRepositoryPolicyResponse#registry_id #registryId} => String
817
+ # * {Types::SetRepositoryPolicyResponse#repository_name #repositoryName} => String
818
+ # * {Types::SetRepositoryPolicyResponse#policy_text #policyText} => String
819
+ #
820
+ # @example Request syntax with placeholder values
821
+ # resp = client.set_repository_policy({
822
+ # registry_id: "RegistryId",
823
+ # repository_name: "RepositoryName", # required
824
+ # policy_text: "RepositoryPolicyText", # required
825
+ # force: false,
826
+ # })
827
+ #
828
+ # @example Response structure
829
+ # resp.registry_id #=> String
830
+ # resp.repository_name #=> String
831
+ # resp.policy_text #=> String
832
+ # @overload set_repository_policy(params = {})
833
+ # @param [Hash] params ({})
834
+ def set_repository_policy(params = {}, options = {})
835
+ req = build_request(:set_repository_policy, params)
836
+ req.send_request(options)
837
+ end
838
+
839
+ # Uploads an image layer part to Amazon ECR.
840
+ #
841
+ # <note markdown="1"> This operation is used by the Amazon ECR proxy, and it is not intended
842
+ # for general use by customers. Use the `docker` CLI to pull, tag, and
843
+ # push images.
844
+ #
845
+ # </note>
846
+ # @option params [String] :registry_id
847
+ # The AWS account ID associated with the registry that you are uploading
848
+ # layer parts to. If you do not specify a registry, the default registry
849
+ # is assumed.
850
+ # @option params [required, String] :repository_name
851
+ # The name of the repository that you are uploading layer parts to.
852
+ # @option params [required, String] :upload_id
853
+ # The upload ID from a previous InitiateLayerUpload operation to
854
+ # associate with the layer part upload.
855
+ # @option params [required, Integer] :part_first_byte
856
+ # The integer value of the first byte of the layer part.
857
+ # @option params [required, Integer] :part_last_byte
858
+ # The integer value of the last byte of the layer part.
859
+ # @option params [required, String, IO] :layer_part_blob
860
+ # The base64-encoded layer part payload.
861
+ # @return [Types::UploadLayerPartResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
862
+ #
863
+ # * {Types::UploadLayerPartResponse#registry_id #registryId} => String
864
+ # * {Types::UploadLayerPartResponse#repository_name #repositoryName} => String
865
+ # * {Types::UploadLayerPartResponse#upload_id #uploadId} => String
866
+ # * {Types::UploadLayerPartResponse#last_byte_received #lastByteReceived} => Integer
867
+ #
868
+ # @example Request syntax with placeholder values
869
+ # resp = client.upload_layer_part({
870
+ # registry_id: "RegistryId",
871
+ # repository_name: "RepositoryName", # required
872
+ # upload_id: "UploadId", # required
873
+ # part_first_byte: 1, # required
874
+ # part_last_byte: 1, # required
875
+ # layer_part_blob: "data", # required
876
+ # })
877
+ #
878
+ # @example Response structure
879
+ # resp.registry_id #=> String
880
+ # resp.repository_name #=> String
881
+ # resp.upload_id #=> String
882
+ # resp.last_byte_received #=> Integer
883
+ # @overload upload_layer_part(params = {})
884
+ # @param [Hash] params ({})
885
+ def upload_layer_part(params = {}, options = {})
886
+ req = build_request(:upload_layer_part, params)
887
+ req.send_request(options)
888
+ end
889
+
890
+ # @!endgroup
891
+
892
+ # @param params ({})
893
+ # @api private
894
+ def build_request(operation_name, params = {})
895
+ handlers = @handlers.for(operation_name)
896
+ context = Seahorse::Client::RequestContext.new(
897
+ operation_name: operation_name,
898
+ operation: config.api.operation(operation_name),
899
+ client: self,
900
+ params: params,
901
+ config: config)
902
+ context[:gem_name] = 'aws-sdk-ecr'
903
+ context[:gem_version] = '1.0.0.rc1'
904
+ Seahorse::Client::Request.new(handlers, context)
905
+ end
906
+
907
+ # @api private
908
+ # @deprecated
909
+ def waiter_names
910
+ []
911
+ end
912
+
913
+ class << self
914
+
915
+ # @api private
916
+ attr_reader :identifier
917
+
918
+ # @api private
919
+ def errors_module
920
+ Errors
921
+ end
922
+
923
+ end
924
+ end
925
+ end
926
+ end