aws-sdk-dynamodb 1.153.0 → 1.154.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-dynamodb/client.rb +1 -1
- data/lib/aws-sdk-dynamodb/customizations.rb +0 -3
- data/lib/aws-sdk-dynamodb/endpoint_parameters.rb +7 -7
- data/lib/aws-sdk-dynamodb/endpoint_provider.rb +35 -11
- data/lib/aws-sdk-dynamodb.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75dca57db619f584c304b3ea9adf0d27725659e4bc92d199382893375dde014e
|
4
|
+
data.tar.gz: 9f923f93b3ffd0b998594ae2b021f81458f6624c83ca321b2c1ebbb059977b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51ffdcd17267048326d8def65e5342963af67e694d3b44cc30a19fa0b9c3e56ac0a1e8edeee784897907b0e9ca4be2d67a8aff04f8c15c55a63b2dfec69e7a9c
|
7
|
+
data.tar.gz: 91000b5667f0c5474586ea9d8887d3295b67e4c21bccad4d52fb74fd5f63f2e58f247103f390af1bc87bbbffcfe6480c020333c240018077fcf912d066e50f82
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.154.0
|
@@ -13,37 +13,37 @@ module Aws::DynamoDB
|
|
13
13
|
# @!attribute region
|
14
14
|
# The AWS region used to dispatch the request.
|
15
15
|
#
|
16
|
-
# @return [
|
16
|
+
# @return [string]
|
17
17
|
#
|
18
18
|
# @!attribute use_dual_stack
|
19
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
20
|
#
|
21
|
-
# @return [
|
21
|
+
# @return [boolean]
|
22
22
|
#
|
23
23
|
# @!attribute use_fips
|
24
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.
|
25
25
|
#
|
26
|
-
# @return [
|
26
|
+
# @return [boolean]
|
27
27
|
#
|
28
28
|
# @!attribute endpoint
|
29
29
|
# Override the endpoint used to send this request
|
30
30
|
#
|
31
|
-
# @return [
|
31
|
+
# @return [string]
|
32
32
|
#
|
33
33
|
# @!attribute account_id
|
34
34
|
# The AWS AccountId used for the request.
|
35
35
|
#
|
36
|
-
# @return [
|
36
|
+
# @return [string]
|
37
37
|
#
|
38
38
|
# @!attribute account_id_endpoint_mode
|
39
39
|
# The AccountId Endpoint Mode.
|
40
40
|
#
|
41
|
-
# @return [
|
41
|
+
# @return [string]
|
42
42
|
#
|
43
43
|
# @!attribute resource_arn
|
44
44
|
# ResourceArn containing arn of resource
|
45
45
|
#
|
46
|
-
# @return [
|
46
|
+
# @return [string]
|
47
47
|
#
|
48
48
|
# @!attribute resource_arn_list
|
49
49
|
# ResourceArnList containing list of resource arns
|
@@ -10,6 +10,18 @@
|
|
10
10
|
module Aws::DynamoDB
|
11
11
|
class EndpointProvider
|
12
12
|
def resolve_endpoint(parameters)
|
13
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint) && Aws::Endpoints::Matchers.set?(parameters.region) && (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
14
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
15
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
16
|
+
end
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
18
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
19
|
+
end
|
20
|
+
if Aws::Endpoints::Matchers.string_equals?(parameters.endpoint, "https://dynamodb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}")
|
21
|
+
raise ArgumentError, "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html"
|
22
|
+
end
|
23
|
+
return Aws::Endpoints::Endpoint.new(url: "#{parameters.endpoint}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
|
24
|
+
end
|
13
25
|
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
14
26
|
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
15
27
|
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
@@ -28,7 +40,7 @@ module Aws::DynamoDB
|
|
28
40
|
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
29
41
|
raise ArgumentError, "Invalid Configuration: Dualstack and local endpoint are not supported"
|
30
42
|
end
|
31
|
-
return Aws::Endpoints::Endpoint.new(url: "http://localhost:8000", headers: {}, properties: {"authSchemes" => [{"
|
43
|
+
return Aws::Endpoints::Endpoint.new(url: "http://localhost:8000", headers: {}, properties: {"authSchemes" => [{"signingRegion" => "us-east-1", "name" => "sigv4", "signingName" => "dynamodb"}]}, metadata: { account_id_endpoint: false })
|
32
44
|
end
|
33
45
|
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
34
46
|
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"), true)
|
@@ -56,9 +68,24 @@ module Aws::DynamoDB
|
|
56
68
|
end
|
57
69
|
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
58
70
|
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"), true)
|
71
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.resource_arn) && (parsed_arn = Aws::Endpoints::Matchers.aws_parse_arn(parameters.resource_arn)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "service"), "dynamodb") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), false) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), "#{parameters.region}") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "accountId"), false)
|
72
|
+
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.ddb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
|
73
|
+
end
|
74
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.resource_arn_list) && (first_arn = Aws::Endpoints::Matchers.attr(parameters.resource_arn_list, "[0]")) && (parsed_arn = Aws::Endpoints::Matchers.aws_parse_arn(first_arn)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "service"), "dynamodb") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), false) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), "#{parameters.region}") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "accountId"), false)
|
75
|
+
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.ddb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
|
76
|
+
end
|
77
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.account_id)
|
78
|
+
if Aws::Endpoints::Matchers.valid_host_label?(parameters.account_id, false)
|
79
|
+
return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.ddb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: true })
|
80
|
+
end
|
81
|
+
raise ArgumentError, "Credentials-sourced account ID parameter is invalid"
|
82
|
+
end
|
59
83
|
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "required")
|
60
84
|
if Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true))
|
61
|
-
|
85
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
|
86
|
+
raise ArgumentError, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"
|
87
|
+
end
|
88
|
+
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition"
|
62
89
|
end
|
63
90
|
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported"
|
64
91
|
end
|
@@ -66,13 +93,13 @@ module Aws::DynamoDB
|
|
66
93
|
end
|
67
94
|
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
68
95
|
end
|
69
|
-
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.
|
96
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.resource_arn) && (parsed_arn = Aws::Endpoints::Matchers.aws_parse_arn(parameters.resource_arn)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "service"), "dynamodb") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), false) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), "#{parameters.region}") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "accountId"), false)
|
70
97
|
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.ddb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
|
71
98
|
end
|
72
|
-
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.
|
99
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.resource_arn_list) && (first_arn = Aws::Endpoints::Matchers.attr(parameters.resource_arn_list, "[0]")) && (parsed_arn = Aws::Endpoints::Matchers.aws_parse_arn(first_arn)) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "service"), "dynamodb") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), false) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), "#{parameters.region}") && Aws::Endpoints::Matchers.valid_host_label?(Aws::Endpoints::Matchers.attr(parsed_arn, "accountId"), false)
|
73
100
|
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.ddb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
|
74
101
|
end
|
75
|
-
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.
|
102
|
+
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.set?(parameters.account_id)
|
76
103
|
if Aws::Endpoints::Matchers.valid_host_label?(parameters.account_id, false)
|
77
104
|
return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.ddb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: true })
|
78
105
|
end
|
@@ -80,13 +107,10 @@ module Aws::DynamoDB
|
|
80
107
|
end
|
81
108
|
if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "required")
|
82
109
|
if Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true))
|
83
|
-
if Aws::Endpoints::Matchers.
|
84
|
-
|
85
|
-
raise ArgumentError, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"
|
86
|
-
end
|
87
|
-
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition"
|
110
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
|
111
|
+
raise ArgumentError, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"
|
88
112
|
end
|
89
|
-
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required
|
113
|
+
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition"
|
90
114
|
end
|
91
115
|
raise ArgumentError, "Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported"
|
92
116
|
end
|
data/lib/aws-sdk-dynamodb.rb
CHANGED