aws-sdk-ecr 1.90.0 → 1.91.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-ecr/client.rb +1 -1
- data/lib/aws-sdk-ecr/endpoint_parameters.rb +17 -8
- data/lib/aws-sdk-ecr/endpoint_provider.rb +35 -16
- data/lib/aws-sdk-ecr.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b6df06c784d20e1acae3dd59447e58dc5da702c1d2d31cb2961277b9956ddce
|
4
|
+
data.tar.gz: 9d2789f6281dcfaba8c81c4e4d52dbf73a384bb69b981163489e00b41f57363c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 331f506b7622d28196b6d4aa652ed5cd4f8076419bc822acf428409c9e089c032a45db4e99974841a96c4959d6d7c3f9762c0dbd39a4e78c53fbb320c72652c0
|
7
|
+
data.tar.gz: c191bc8b306988a3352273be1764f884dc8ff5a278d64cfec30bcc3c94797112af45e72a7cca7c2e767396f6a68f8187f6f55a04ef5e92e3819f27c54bc29f9a
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.91.0
|
data/lib/aws-sdk-ecr/client.rb
CHANGED
@@ -15,20 +15,26 @@ module Aws::ECR
|
|
15
15
|
#
|
16
16
|
# @return [String]
|
17
17
|
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
18
23
|
# @!attribute use_fips
|
19
24
|
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
20
25
|
#
|
21
26
|
# @return [Boolean]
|
22
27
|
#
|
23
|
-
# @!attribute
|
24
|
-
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
25
30
|
#
|
26
|
-
# @return [
|
31
|
+
# @return [String]
|
27
32
|
#
|
28
33
|
EndpointParameters = Struct.new(
|
29
34
|
:region,
|
30
|
-
:use_fips,
|
31
35
|
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
32
38
|
) do
|
33
39
|
include Aws::Structure
|
34
40
|
|
@@ -36,24 +42,27 @@ module Aws::ECR
|
|
36
42
|
class << self
|
37
43
|
PARAM_MAP = {
|
38
44
|
'Region' => :region,
|
39
|
-
'UseFIPS' => :use_fips,
|
40
45
|
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
41
48
|
}.freeze
|
42
49
|
end
|
43
50
|
|
44
51
|
def initialize(options = {})
|
45
52
|
self[:region] = options[:region]
|
46
|
-
self[:use_fips] = options[:use_fips]
|
47
|
-
self[:use_fips] = false if self[:use_fips].nil?
|
48
53
|
self[:use_dual_stack] = options[:use_dual_stack]
|
49
54
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
self[:use_fips] = options[:use_fips]
|
56
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
57
|
+
self[:endpoint] = options[:endpoint]
|
50
58
|
end
|
51
59
|
|
52
60
|
def self.create(config, options={})
|
53
61
|
new({
|
54
62
|
region: config.region,
|
55
|
-
use_fips: config.use_fips_endpoint,
|
56
63
|
use_dual_stack: config.use_dualstack_endpoint,
|
64
|
+
use_fips: config.use_fips_endpoint,
|
65
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
57
66
|
}.merge(options))
|
58
67
|
end
|
59
68
|
end
|
@@ -11,29 +11,48 @@ module Aws::ECR
|
|
11
11
|
class EndpointProvider
|
12
12
|
def resolve_endpoint(parameters)
|
13
13
|
region = parameters.region
|
14
|
-
use_fips = parameters.use_fips
|
15
14
|
use_dual_stack = parameters.use_dual_stack
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
raise ArgumentError, "FIPS and dualstack are enabled, but this partition does not support one or both"
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
22
20
|
end
|
23
21
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
24
|
-
|
25
|
-
return Aws::Endpoints::Endpoint.new(url: "https://ecr.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
26
|
-
end
|
27
|
-
raise ArgumentError, "Dualstack is enabled but this partition does not support dualstack"
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
28
23
|
end
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ecr-fips.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
|
40
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ecr-fips.#{region}.amazonaws.com", headers: {}, properties: {})
|
41
|
+
end
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
45
|
+
end
|
46
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
47
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
48
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
49
|
+
end
|
50
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
32
51
|
end
|
33
|
-
|
52
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
34
53
|
end
|
35
|
-
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
54
|
end
|
55
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
37
56
|
raise ArgumentError, 'No endpoint could be resolved'
|
38
57
|
|
39
58
|
end
|
data/lib/aws-sdk-ecr.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-ecr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.91.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|