aws-sdk-ecr 1.89.0 → 1.90.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 +8 -17
- data/lib/aws-sdk-ecr/endpoint_provider.rb +16 -35
- 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: 876665e3dbf35c24907a79c459fa6981b7afc85b09203927d72edd9962d32d08
|
4
|
+
data.tar.gz: ed230e37b26f52a1ee9b78fbe233c7375ac80dea842bbe6fb91e00f0febf9190
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92477f29c1f970e79fae0b3985f27f50e337117ddb373c481aa57a1cdf8c44e14d755970be853ef1f38c0e4121efd6249683319953e0da73282a6707babd6262
|
7
|
+
data.tar.gz: cd77bf2ee5a246f55a0214faeee51c814cfdf59477678c6a00212f45af03c1ecd837e047fb1207624da981f4724019d775dc2a81e1b9357321960f6945f4f346
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.90.0
|
data/lib/aws-sdk-ecr/client.rb
CHANGED
@@ -15,26 +15,20 @@ 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
|
-
#
|
23
18
|
# @!attribute use_fips
|
24
19
|
# 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.
|
25
20
|
#
|
26
21
|
# @return [Boolean]
|
27
22
|
#
|
28
|
-
# @!attribute
|
29
|
-
#
|
23
|
+
# @!attribute use_dual_stack
|
24
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
30
25
|
#
|
31
|
-
# @return [
|
26
|
+
# @return [Boolean]
|
32
27
|
#
|
33
28
|
EndpointParameters = Struct.new(
|
34
29
|
:region,
|
35
|
-
:use_dual_stack,
|
36
30
|
:use_fips,
|
37
|
-
:
|
31
|
+
:use_dual_stack,
|
38
32
|
) do
|
39
33
|
include Aws::Structure
|
40
34
|
|
@@ -42,27 +36,24 @@ module Aws::ECR
|
|
42
36
|
class << self
|
43
37
|
PARAM_MAP = {
|
44
38
|
'Region' => :region,
|
45
|
-
'UseDualStack' => :use_dual_stack,
|
46
39
|
'UseFIPS' => :use_fips,
|
47
|
-
'
|
40
|
+
'UseDualStack' => :use_dual_stack,
|
48
41
|
}.freeze
|
49
42
|
end
|
50
43
|
|
51
44
|
def initialize(options = {})
|
52
45
|
self[:region] = options[:region]
|
53
|
-
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
-
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
46
|
self[:use_fips] = options[:use_fips]
|
56
47
|
self[:use_fips] = false if self[:use_fips].nil?
|
57
|
-
self[:
|
48
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
49
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
50
|
end
|
59
51
|
|
60
52
|
def self.create(config, options={})
|
61
53
|
new({
|
62
54
|
region: config.region,
|
63
|
-
use_dual_stack: config.use_dualstack_endpoint,
|
64
55
|
use_fips: config.use_fips_endpoint,
|
65
|
-
|
56
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
66
57
|
}.merge(options))
|
67
58
|
end
|
68
59
|
end
|
@@ -11,48 +11,29 @@ module Aws::ECR
|
|
11
11
|
class EndpointProvider
|
12
12
|
def resolve_endpoint(parameters)
|
13
13
|
region = parameters.region
|
14
|
-
use_dual_stack = parameters.use_dual_stack
|
15
14
|
use_fips = parameters.use_fips
|
16
|
-
|
17
|
-
if Aws::Endpoints::Matchers.set?(
|
18
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
-
|
15
|
+
use_dual_stack = parameters.use_dual_stack
|
16
|
+
if Aws::Endpoints::Matchers.set?(region) && (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
18
|
+
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"))
|
19
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ecr-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
20
|
+
end
|
21
|
+
raise ArgumentError, "FIPS and dualstack are enabled, but this partition does not support one or both"
|
20
22
|
end
|
21
23
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
-
|
23
|
-
|
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"
|
24
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
25
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ecr.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
45
26
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
27
|
+
raise ArgumentError, "Dualstack is enabled but this partition does not support dualstack"
|
28
|
+
end
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
30
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
31
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ecr-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
51
32
|
end
|
52
|
-
|
33
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
53
34
|
end
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://api.ecr.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
54
36
|
end
|
55
|
-
raise ArgumentError, "Invalid Configuration: Missing Region"
|
56
37
|
raise ArgumentError, 'No endpoint could be resolved'
|
57
38
|
|
58
39
|
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.90.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-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|