aws-sdk-ecr 1.3.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::ECR
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::ECR::EndpointProvider',
17
+ rbs_type: 'untyped',
18
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
+ 'object that responds to `#resolve_endpoint(parameters)` '\
20
+ 'where `parameters` is a Struct similar to '\
21
+ '`Aws::ECR::EndpointParameters`'
22
+ ) do |cfg|
23
+ Aws::ECR::EndpointProvider.new
24
+ end
25
+
26
+ # @api private
27
+ class Handler < Seahorse::Client::Handler
28
+ def call(context)
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
38
+ end
39
+
40
+ context[:auth_scheme] =
41
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
+
43
+ @handler.call(context)
44
+ end
45
+
46
+ private
47
+
48
+ def apply_endpoint_headers(context, headers)
49
+ headers.each do |key, values|
50
+ value = values
51
+ .compact
52
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
53
+ .join(',')
54
+
55
+ context.http_request.headers[key] = value
56
+ end
57
+ end
58
+
59
+ def parameters_for_operation(context)
60
+ case context.operation_name
61
+ when :batch_check_layer_availability
62
+ Aws::ECR::Endpoints::BatchCheckLayerAvailability.build(context)
63
+ when :batch_delete_image
64
+ Aws::ECR::Endpoints::BatchDeleteImage.build(context)
65
+ when :batch_get_image
66
+ Aws::ECR::Endpoints::BatchGetImage.build(context)
67
+ when :batch_get_repository_scanning_configuration
68
+ Aws::ECR::Endpoints::BatchGetRepositoryScanningConfiguration.build(context)
69
+ when :complete_layer_upload
70
+ Aws::ECR::Endpoints::CompleteLayerUpload.build(context)
71
+ when :create_pull_through_cache_rule
72
+ Aws::ECR::Endpoints::CreatePullThroughCacheRule.build(context)
73
+ when :create_repository
74
+ Aws::ECR::Endpoints::CreateRepository.build(context)
75
+ when :delete_lifecycle_policy
76
+ Aws::ECR::Endpoints::DeleteLifecyclePolicy.build(context)
77
+ when :delete_pull_through_cache_rule
78
+ Aws::ECR::Endpoints::DeletePullThroughCacheRule.build(context)
79
+ when :delete_registry_policy
80
+ Aws::ECR::Endpoints::DeleteRegistryPolicy.build(context)
81
+ when :delete_repository
82
+ Aws::ECR::Endpoints::DeleteRepository.build(context)
83
+ when :delete_repository_policy
84
+ Aws::ECR::Endpoints::DeleteRepositoryPolicy.build(context)
85
+ when :describe_image_replication_status
86
+ Aws::ECR::Endpoints::DescribeImageReplicationStatus.build(context)
87
+ when :describe_image_scan_findings
88
+ Aws::ECR::Endpoints::DescribeImageScanFindings.build(context)
89
+ when :describe_images
90
+ Aws::ECR::Endpoints::DescribeImages.build(context)
91
+ when :describe_pull_through_cache_rules
92
+ Aws::ECR::Endpoints::DescribePullThroughCacheRules.build(context)
93
+ when :describe_registry
94
+ Aws::ECR::Endpoints::DescribeRegistry.build(context)
95
+ when :describe_repositories
96
+ Aws::ECR::Endpoints::DescribeRepositories.build(context)
97
+ when :get_authorization_token
98
+ Aws::ECR::Endpoints::GetAuthorizationToken.build(context)
99
+ when :get_download_url_for_layer
100
+ Aws::ECR::Endpoints::GetDownloadUrlForLayer.build(context)
101
+ when :get_lifecycle_policy
102
+ Aws::ECR::Endpoints::GetLifecyclePolicy.build(context)
103
+ when :get_lifecycle_policy_preview
104
+ Aws::ECR::Endpoints::GetLifecyclePolicyPreview.build(context)
105
+ when :get_registry_policy
106
+ Aws::ECR::Endpoints::GetRegistryPolicy.build(context)
107
+ when :get_registry_scanning_configuration
108
+ Aws::ECR::Endpoints::GetRegistryScanningConfiguration.build(context)
109
+ when :get_repository_policy
110
+ Aws::ECR::Endpoints::GetRepositoryPolicy.build(context)
111
+ when :initiate_layer_upload
112
+ Aws::ECR::Endpoints::InitiateLayerUpload.build(context)
113
+ when :list_images
114
+ Aws::ECR::Endpoints::ListImages.build(context)
115
+ when :list_tags_for_resource
116
+ Aws::ECR::Endpoints::ListTagsForResource.build(context)
117
+ when :put_image
118
+ Aws::ECR::Endpoints::PutImage.build(context)
119
+ when :put_image_scanning_configuration
120
+ Aws::ECR::Endpoints::PutImageScanningConfiguration.build(context)
121
+ when :put_image_tag_mutability
122
+ Aws::ECR::Endpoints::PutImageTagMutability.build(context)
123
+ when :put_lifecycle_policy
124
+ Aws::ECR::Endpoints::PutLifecyclePolicy.build(context)
125
+ when :put_registry_policy
126
+ Aws::ECR::Endpoints::PutRegistryPolicy.build(context)
127
+ when :put_registry_scanning_configuration
128
+ Aws::ECR::Endpoints::PutRegistryScanningConfiguration.build(context)
129
+ when :put_replication_configuration
130
+ Aws::ECR::Endpoints::PutReplicationConfiguration.build(context)
131
+ when :set_repository_policy
132
+ Aws::ECR::Endpoints::SetRepositoryPolicy.build(context)
133
+ when :start_image_scan
134
+ Aws::ECR::Endpoints::StartImageScan.build(context)
135
+ when :start_lifecycle_policy_preview
136
+ Aws::ECR::Endpoints::StartLifecyclePolicyPreview.build(context)
137
+ when :tag_resource
138
+ Aws::ECR::Endpoints::TagResource.build(context)
139
+ when :untag_resource
140
+ Aws::ECR::Endpoints::UntagResource.build(context)
141
+ when :update_pull_through_cache_rule
142
+ Aws::ECR::Endpoints::UpdatePullThroughCacheRule.build(context)
143
+ when :upload_layer_part
144
+ Aws::ECR::Endpoints::UploadLayerPart.build(context)
145
+ when :validate_pull_through_cache_rule
146
+ Aws::ECR::Endpoints::ValidatePullThroughCacheRule.build(context)
147
+ end
148
+ end
149
+ end
150
+
151
+ def add_handlers(handlers, _config)
152
+ handlers.add(Handler, step: :build, priority: 75)
153
+ end
154
+ end
155
+ end
156
+ end
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::ECR
11
+
9
12
  class Resource
10
13
 
11
14
  # @param options ({})