aws-sdk-cloudfrontkeyvaluestore 1.0.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 +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/client.rb +688 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/client_api.rb +252 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/customizations.rb +0 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/endpoint_parameters.rb +62 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/endpoint_provider.rb +69 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/endpoints.rb +100 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/errors.rb +134 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/plugins/endpoints.rb +80 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/resource.rb +26 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore/types.rb +449 -0
- data/lib/aws-sdk-cloudfrontkeyvaluestore.rb +57 -0
- metadata +94 -0
@@ -0,0 +1,252 @@
|
|
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
|
+
module Aws::CloudFrontKeyValueStore
|
11
|
+
# @api private
|
12
|
+
module ClientApi
|
13
|
+
|
14
|
+
include Seahorse::Model
|
15
|
+
|
16
|
+
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
17
|
+
ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
|
18
|
+
DeleteKeyRequest = Shapes::StructureShape.new(name: 'DeleteKeyRequest')
|
19
|
+
DeleteKeyRequestListItem = Shapes::StructureShape.new(name: 'DeleteKeyRequestListItem')
|
20
|
+
DeleteKeyRequestsList = Shapes::ListShape.new(name: 'DeleteKeyRequestsList')
|
21
|
+
DeleteKeyResponse = Shapes::StructureShape.new(name: 'DeleteKeyResponse')
|
22
|
+
DescribeKeyValueStoreRequest = Shapes::StructureShape.new(name: 'DescribeKeyValueStoreRequest')
|
23
|
+
DescribeKeyValueStoreResponse = Shapes::StructureShape.new(name: 'DescribeKeyValueStoreResponse')
|
24
|
+
Etag = Shapes::StringShape.new(name: 'Etag')
|
25
|
+
GetKeyRequest = Shapes::StructureShape.new(name: 'GetKeyRequest')
|
26
|
+
GetKeyResponse = Shapes::StructureShape.new(name: 'GetKeyResponse')
|
27
|
+
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
28
|
+
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
29
|
+
Key = Shapes::StringShape.new(name: 'Key')
|
30
|
+
KvsARN = Shapes::StringShape.new(name: 'KvsARN')
|
31
|
+
ListKeysRequest = Shapes::StructureShape.new(name: 'ListKeysRequest')
|
32
|
+
ListKeysRequestMaxResultsInteger = Shapes::IntegerShape.new(name: 'ListKeysRequestMaxResultsInteger')
|
33
|
+
ListKeysResponse = Shapes::StructureShape.new(name: 'ListKeysResponse')
|
34
|
+
ListKeysResponseList = Shapes::ListShape.new(name: 'ListKeysResponseList')
|
35
|
+
ListKeysResponseListItem = Shapes::StructureShape.new(name: 'ListKeysResponseListItem')
|
36
|
+
Long = Shapes::IntegerShape.new(name: 'Long')
|
37
|
+
PutKeyRequest = Shapes::StructureShape.new(name: 'PutKeyRequest')
|
38
|
+
PutKeyRequestListItem = Shapes::StructureShape.new(name: 'PutKeyRequestListItem')
|
39
|
+
PutKeyRequestsList = Shapes::ListShape.new(name: 'PutKeyRequestsList')
|
40
|
+
PutKeyResponse = Shapes::StructureShape.new(name: 'PutKeyResponse')
|
41
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
42
|
+
ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
|
43
|
+
String = Shapes::StringShape.new(name: 'String')
|
44
|
+
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
45
|
+
UpdateKeysRequest = Shapes::StructureShape.new(name: 'UpdateKeysRequest')
|
46
|
+
UpdateKeysResponse = Shapes::StructureShape.new(name: 'UpdateKeysResponse')
|
47
|
+
ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
|
48
|
+
Value = Shapes::StringShape.new(name: 'Value')
|
49
|
+
|
50
|
+
AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
51
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
52
|
+
|
53
|
+
ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
54
|
+
ConflictException.struct_class = Types::ConflictException
|
55
|
+
|
56
|
+
DeleteKeyRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
57
|
+
DeleteKeyRequest.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location: "uri", location_name: "Key"))
|
58
|
+
DeleteKeyRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "If-Match"))
|
59
|
+
DeleteKeyRequest.struct_class = Types::DeleteKeyRequest
|
60
|
+
|
61
|
+
DeleteKeyRequestListItem.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location_name: "Key"))
|
62
|
+
DeleteKeyRequestListItem.struct_class = Types::DeleteKeyRequestListItem
|
63
|
+
|
64
|
+
DeleteKeyRequestsList.member = Shapes::ShapeRef.new(shape: DeleteKeyRequestListItem)
|
65
|
+
|
66
|
+
DeleteKeyResponse.add_member(:item_count, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "ItemCount"))
|
67
|
+
DeleteKeyResponse.add_member(:total_size_in_bytes, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "TotalSizeInBytes"))
|
68
|
+
DeleteKeyResponse.add_member(:etag, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "ETag"))
|
69
|
+
DeleteKeyResponse.struct_class = Types::DeleteKeyResponse
|
70
|
+
|
71
|
+
DescribeKeyValueStoreRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
72
|
+
DescribeKeyValueStoreRequest.struct_class = Types::DescribeKeyValueStoreRequest
|
73
|
+
|
74
|
+
DescribeKeyValueStoreResponse.add_member(:item_count, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "ItemCount"))
|
75
|
+
DescribeKeyValueStoreResponse.add_member(:total_size_in_bytes, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "TotalSizeInBytes"))
|
76
|
+
DescribeKeyValueStoreResponse.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location_name: "KvsARN"))
|
77
|
+
DescribeKeyValueStoreResponse.add_member(:created, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "Created"))
|
78
|
+
DescribeKeyValueStoreResponse.add_member(:etag, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "ETag"))
|
79
|
+
DescribeKeyValueStoreResponse.add_member(:last_modified, Shapes::ShapeRef.new(shape: Timestamp, location_name: "LastModified"))
|
80
|
+
DescribeKeyValueStoreResponse.struct_class = Types::DescribeKeyValueStoreResponse
|
81
|
+
|
82
|
+
GetKeyRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
83
|
+
GetKeyRequest.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location: "uri", location_name: "Key"))
|
84
|
+
GetKeyRequest.struct_class = Types::GetKeyRequest
|
85
|
+
|
86
|
+
GetKeyResponse.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location_name: "Key"))
|
87
|
+
GetKeyResponse.add_member(:value, Shapes::ShapeRef.new(shape: Value, required: true, location_name: "Value"))
|
88
|
+
GetKeyResponse.add_member(:item_count, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "ItemCount"))
|
89
|
+
GetKeyResponse.add_member(:total_size_in_bytes, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "TotalSizeInBytes"))
|
90
|
+
GetKeyResponse.struct_class = Types::GetKeyResponse
|
91
|
+
|
92
|
+
InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
93
|
+
InternalServerException.struct_class = Types::InternalServerException
|
94
|
+
|
95
|
+
ListKeysRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
96
|
+
ListKeysRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location: "querystring", location_name: "NextToken"))
|
97
|
+
ListKeysRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: ListKeysRequestMaxResultsInteger, location: "querystring", location_name: "MaxResults"))
|
98
|
+
ListKeysRequest.struct_class = Types::ListKeysRequest
|
99
|
+
|
100
|
+
ListKeysResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
101
|
+
ListKeysResponse.add_member(:items, Shapes::ShapeRef.new(shape: ListKeysResponseList, location_name: "Items"))
|
102
|
+
ListKeysResponse.struct_class = Types::ListKeysResponse
|
103
|
+
|
104
|
+
ListKeysResponseList.member = Shapes::ShapeRef.new(shape: ListKeysResponseListItem)
|
105
|
+
|
106
|
+
ListKeysResponseListItem.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location_name: "Key"))
|
107
|
+
ListKeysResponseListItem.add_member(:value, Shapes::ShapeRef.new(shape: Value, required: true, location_name: "Value"))
|
108
|
+
ListKeysResponseListItem.struct_class = Types::ListKeysResponseListItem
|
109
|
+
|
110
|
+
PutKeyRequest.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location: "uri", location_name: "Key"))
|
111
|
+
PutKeyRequest.add_member(:value, Shapes::ShapeRef.new(shape: Value, required: true, location_name: "Value"))
|
112
|
+
PutKeyRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
113
|
+
PutKeyRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "If-Match"))
|
114
|
+
PutKeyRequest.struct_class = Types::PutKeyRequest
|
115
|
+
|
116
|
+
PutKeyRequestListItem.add_member(:key, Shapes::ShapeRef.new(shape: Key, required: true, location_name: "Key"))
|
117
|
+
PutKeyRequestListItem.add_member(:value, Shapes::ShapeRef.new(shape: Value, required: true, location_name: "Value"))
|
118
|
+
PutKeyRequestListItem.struct_class = Types::PutKeyRequestListItem
|
119
|
+
|
120
|
+
PutKeyRequestsList.member = Shapes::ShapeRef.new(shape: PutKeyRequestListItem)
|
121
|
+
|
122
|
+
PutKeyResponse.add_member(:item_count, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "ItemCount"))
|
123
|
+
PutKeyResponse.add_member(:total_size_in_bytes, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "TotalSizeInBytes"))
|
124
|
+
PutKeyResponse.add_member(:etag, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "ETag"))
|
125
|
+
PutKeyResponse.struct_class = Types::PutKeyResponse
|
126
|
+
|
127
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
128
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
129
|
+
|
130
|
+
ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
131
|
+
ServiceQuotaExceededException.struct_class = Types::ServiceQuotaExceededException
|
132
|
+
|
133
|
+
UpdateKeysRequest.add_member(:kvs_arn, Shapes::ShapeRef.new(shape: KvsARN, required: true, location: "uri", location_name: "KvsARN", metadata: {"contextParam"=>{"name"=>"KvsARN"}}))
|
134
|
+
UpdateKeysRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "If-Match"))
|
135
|
+
UpdateKeysRequest.add_member(:puts, Shapes::ShapeRef.new(shape: PutKeyRequestsList, location_name: "Puts"))
|
136
|
+
UpdateKeysRequest.add_member(:deletes, Shapes::ShapeRef.new(shape: DeleteKeyRequestsList, location_name: "Deletes"))
|
137
|
+
UpdateKeysRequest.struct_class = Types::UpdateKeysRequest
|
138
|
+
|
139
|
+
UpdateKeysResponse.add_member(:item_count, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "ItemCount"))
|
140
|
+
UpdateKeysResponse.add_member(:total_size_in_bytes, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "TotalSizeInBytes"))
|
141
|
+
UpdateKeysResponse.add_member(:etag, Shapes::ShapeRef.new(shape: Etag, required: true, location: "header", location_name: "ETag"))
|
142
|
+
UpdateKeysResponse.struct_class = Types::UpdateKeysResponse
|
143
|
+
|
144
|
+
ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
145
|
+
ValidationException.struct_class = Types::ValidationException
|
146
|
+
|
147
|
+
|
148
|
+
# @api private
|
149
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
150
|
+
|
151
|
+
api.version = "2022-07-26"
|
152
|
+
|
153
|
+
api.metadata = {
|
154
|
+
"apiVersion" => "2022-07-26",
|
155
|
+
"endpointPrefix" => "cloudfront-keyvaluestore",
|
156
|
+
"jsonVersion" => "1.1",
|
157
|
+
"protocol" => "rest-json",
|
158
|
+
"serviceFullName" => "Amazon CloudFront KeyValueStore",
|
159
|
+
"serviceId" => "CloudFront KeyValueStore",
|
160
|
+
"signatureVersion" => "v4",
|
161
|
+
"signingName" => "cloudfront-keyvaluestore",
|
162
|
+
"uid" => "cloudfront-keyvaluestore-2022-07-26",
|
163
|
+
}
|
164
|
+
|
165
|
+
api.add_operation(:delete_key, Seahorse::Model::Operation.new.tap do |o|
|
166
|
+
o.name = "DeleteKey"
|
167
|
+
o.http_method = "DELETE"
|
168
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}/keys/{Key}"
|
169
|
+
o.input = Shapes::ShapeRef.new(shape: DeleteKeyRequest)
|
170
|
+
o.output = Shapes::ShapeRef.new(shape: DeleteKeyResponse)
|
171
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
172
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
173
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
174
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
175
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
176
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
177
|
+
end)
|
178
|
+
|
179
|
+
api.add_operation(:describe_key_value_store, Seahorse::Model::Operation.new.tap do |o|
|
180
|
+
o.name = "DescribeKeyValueStore"
|
181
|
+
o.http_method = "GET"
|
182
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}"
|
183
|
+
o.input = Shapes::ShapeRef.new(shape: DescribeKeyValueStoreRequest)
|
184
|
+
o.output = Shapes::ShapeRef.new(shape: DescribeKeyValueStoreResponse)
|
185
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
186
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
187
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
188
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
189
|
+
end)
|
190
|
+
|
191
|
+
api.add_operation(:get_key, Seahorse::Model::Operation.new.tap do |o|
|
192
|
+
o.name = "GetKey"
|
193
|
+
o.http_method = "GET"
|
194
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}/keys/{Key}"
|
195
|
+
o.input = Shapes::ShapeRef.new(shape: GetKeyRequest)
|
196
|
+
o.output = Shapes::ShapeRef.new(shape: GetKeyResponse)
|
197
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
198
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
199
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
200
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
201
|
+
end)
|
202
|
+
|
203
|
+
api.add_operation(:list_keys, Seahorse::Model::Operation.new.tap do |o|
|
204
|
+
o.name = "ListKeys"
|
205
|
+
o.http_method = "GET"
|
206
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}/keys"
|
207
|
+
o.input = Shapes::ShapeRef.new(shape: ListKeysRequest)
|
208
|
+
o.output = Shapes::ShapeRef.new(shape: ListKeysResponse)
|
209
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
210
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
211
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
212
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
213
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
214
|
+
o[:pager] = Aws::Pager.new(
|
215
|
+
limit_key: "max_results",
|
216
|
+
tokens: {
|
217
|
+
"next_token" => "next_token"
|
218
|
+
}
|
219
|
+
)
|
220
|
+
end)
|
221
|
+
|
222
|
+
api.add_operation(:put_key, Seahorse::Model::Operation.new.tap do |o|
|
223
|
+
o.name = "PutKey"
|
224
|
+
o.http_method = "PUT"
|
225
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}/keys/{Key}"
|
226
|
+
o.input = Shapes::ShapeRef.new(shape: PutKeyRequest)
|
227
|
+
o.output = Shapes::ShapeRef.new(shape: PutKeyResponse)
|
228
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
229
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
230
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
231
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
232
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
233
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
234
|
+
end)
|
235
|
+
|
236
|
+
api.add_operation(:update_keys, Seahorse::Model::Operation.new.tap do |o|
|
237
|
+
o.name = "UpdateKeys"
|
238
|
+
o.http_method = "POST"
|
239
|
+
o.http_request_uri = "/key-value-stores/{KvsARN}/keys"
|
240
|
+
o.input = Shapes::ShapeRef.new(shape: UpdateKeysRequest)
|
241
|
+
o.output = Shapes::ShapeRef.new(shape: UpdateKeysResponse)
|
242
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
243
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
244
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
245
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
246
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
247
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
248
|
+
end)
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
252
|
+
end
|
File without changes
|
@@ -0,0 +1,62 @@
|
|
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
|
+
module Aws::CloudFrontKeyValueStore
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute kvs_arn
|
14
|
+
# The ARN of the Key Value Store
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute region
|
19
|
+
# The AWS region used to dispatch the request.
|
20
|
+
#
|
21
|
+
# @return [String]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
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
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:kvs_arn,
|
35
|
+
:region,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'KvsARN' => :kvs_arn,
|
45
|
+
'Region' => :region,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:kvs_arn] = options[:kvs_arn]
|
53
|
+
self[:region] = options[:region]
|
54
|
+
self[:use_fips] = options[:use_fips]
|
55
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
56
|
+
if self[:use_fips].nil?
|
57
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
58
|
+
end
|
59
|
+
self[:endpoint] = options[:endpoint]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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
|
+
module Aws::CloudFrontKeyValueStore
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
kvs_arn = parameters.kvs_arn
|
14
|
+
region = parameters.region
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, false)
|
18
|
+
if Aws::Endpoints::Matchers.set?(kvs_arn)
|
19
|
+
if (parsed_arn = Aws::Endpoints::Matchers.aws_parse_arn(kvs_arn))
|
20
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "service"), "cloudfront")
|
21
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "region"), "")
|
22
|
+
if (arn_type = Aws::Endpoints::Matchers.attr(parsed_arn, "resourceId[0]"))
|
23
|
+
if Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.string_equals?(arn_type, ""))
|
24
|
+
if Aws::Endpoints::Matchers.string_equals?(arn_type, "key-value-store")
|
25
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(parsed_arn, "partition"), "aws")
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "#{parsed_arn['partition']}")
|
29
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
30
|
+
if (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
31
|
+
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{parsed_arn['accountId']}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4a", "signingName"=>"cloudfront-keyvaluestore", "signingRegionSet"=>["*"]}]})
|
32
|
+
end
|
33
|
+
raise ArgumentError, "Provided endpoint is not a valid URL"
|
34
|
+
end
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.cloudfront-kvs.global.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4a", "signingName"=>"cloudfront-keyvaluestore", "signingRegionSet"=>["*"]}]})
|
36
|
+
end
|
37
|
+
raise ArgumentError, "Client was configured for partition `#{partition_result['name']}` but Kvs ARN has `#{parsed_arn['partition']}`"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
41
|
+
if (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "#{url['scheme']}://#{parsed_arn['accountId']}.#{url['authority']}#{url['path']}", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4a", "signingName"=>"cloudfront-keyvaluestore", "signingRegionSet"=>["*"]}]})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "Provided endpoint is not a valid URL"
|
45
|
+
end
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://#{parsed_arn['accountId']}.cloudfront-kvs.global.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4a", "signingName"=>"cloudfront-keyvaluestore", "signingRegionSet"=>["*"]}]})
|
47
|
+
end
|
48
|
+
raise ArgumentError, "CloudFront-KeyValueStore is not supported in partition `#{parsed_arn['partition']}`"
|
49
|
+
end
|
50
|
+
raise ArgumentError, "ARN resource type is invalid. Expected `key-value-store`, found: `#{arn_type}`"
|
51
|
+
end
|
52
|
+
raise ArgumentError, "No resource type found in the KVS ARN. Resource type must be `key-value-store`."
|
53
|
+
end
|
54
|
+
raise ArgumentError, "No resource type found in the KVS ARN. Resource type must be `key-value-store`."
|
55
|
+
end
|
56
|
+
raise ArgumentError, "Provided ARN must be a global resource ARN. Found: `#{parsed_arn['region']}`"
|
57
|
+
end
|
58
|
+
raise ArgumentError, "Provided ARN is not a valid CloudFront Service ARN. Found: `#{parsed_arn['service']}`"
|
59
|
+
end
|
60
|
+
raise ArgumentError, "KVS ARN must be a valid ARN"
|
61
|
+
end
|
62
|
+
raise ArgumentError, "KVS ARN must be provided to use this service"
|
63
|
+
end
|
64
|
+
raise ArgumentError, "Invalid Configuration: FIPS is not supported with CloudFront-KeyValueStore."
|
65
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,100 @@
|
|
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::CloudFrontKeyValueStore
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class DeleteKey
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
21
|
+
kvs_arn: context.params[:kvs_arn],
|
22
|
+
region: context.config.region,
|
23
|
+
use_fips: context.config.use_fips_endpoint,
|
24
|
+
endpoint: endpoint,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class DescribeKeyValueStore
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
35
|
+
kvs_arn: context.params[:kvs_arn],
|
36
|
+
region: context.config.region,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class GetKey
|
44
|
+
def self.build(context)
|
45
|
+
unless context.config.regional_endpoint
|
46
|
+
endpoint = context.config.endpoint.to_s
|
47
|
+
end
|
48
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
49
|
+
kvs_arn: context.params[:kvs_arn],
|
50
|
+
region: context.config.region,
|
51
|
+
use_fips: context.config.use_fips_endpoint,
|
52
|
+
endpoint: endpoint,
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class ListKeys
|
58
|
+
def self.build(context)
|
59
|
+
unless context.config.regional_endpoint
|
60
|
+
endpoint = context.config.endpoint.to_s
|
61
|
+
end
|
62
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
63
|
+
kvs_arn: context.params[:kvs_arn],
|
64
|
+
region: context.config.region,
|
65
|
+
use_fips: context.config.use_fips_endpoint,
|
66
|
+
endpoint: endpoint,
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
class PutKey
|
72
|
+
def self.build(context)
|
73
|
+
unless context.config.regional_endpoint
|
74
|
+
endpoint = context.config.endpoint.to_s
|
75
|
+
end
|
76
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
77
|
+
kvs_arn: context.params[:kvs_arn],
|
78
|
+
region: context.config.region,
|
79
|
+
use_fips: context.config.use_fips_endpoint,
|
80
|
+
endpoint: endpoint,
|
81
|
+
)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
class UpdateKeys
|
86
|
+
def self.build(context)
|
87
|
+
unless context.config.regional_endpoint
|
88
|
+
endpoint = context.config.endpoint.to_s
|
89
|
+
end
|
90
|
+
Aws::CloudFrontKeyValueStore::EndpointParameters.new(
|
91
|
+
kvs_arn: context.params[:kvs_arn],
|
92
|
+
region: context.config.region,
|
93
|
+
use_fips: context.config.use_fips_endpoint,
|
94
|
+
endpoint: endpoint,
|
95
|
+
)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,134 @@
|
|
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
|
+
module Aws::CloudFrontKeyValueStore
|
11
|
+
|
12
|
+
# When CloudFrontKeyValueStore returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::CloudFrontKeyValueStore::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all CloudFrontKeyValueStore errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::CloudFrontKeyValueStore::Errors::ServiceError
|
20
|
+
# # rescues all CloudFrontKeyValueStore API errors
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# ## Request Context
|
25
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
26
|
+
# information about the request that generated the error.
|
27
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
28
|
+
#
|
29
|
+
# ## Error Classes
|
30
|
+
# * {AccessDeniedException}
|
31
|
+
# * {ConflictException}
|
32
|
+
# * {InternalServerException}
|
33
|
+
# * {ResourceNotFoundException}
|
34
|
+
# * {ServiceQuotaExceededException}
|
35
|
+
# * {ValidationException}
|
36
|
+
#
|
37
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
38
|
+
# if they are not defined above.
|
39
|
+
module Errors
|
40
|
+
|
41
|
+
extend Aws::Errors::DynamicErrors
|
42
|
+
|
43
|
+
class AccessDeniedException < ServiceError
|
44
|
+
|
45
|
+
# @param [Seahorse::Client::RequestContext] context
|
46
|
+
# @param [String] message
|
47
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::AccessDeniedException] data
|
48
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
49
|
+
super(context, message, data)
|
50
|
+
end
|
51
|
+
|
52
|
+
# @return [String]
|
53
|
+
def message
|
54
|
+
@message || @data[:message]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class ConflictException < ServiceError
|
59
|
+
|
60
|
+
# @param [Seahorse::Client::RequestContext] context
|
61
|
+
# @param [String] message
|
62
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::ConflictException] data
|
63
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
64
|
+
super(context, message, data)
|
65
|
+
end
|
66
|
+
|
67
|
+
# @return [String]
|
68
|
+
def message
|
69
|
+
@message || @data[:message]
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
class InternalServerException < ServiceError
|
74
|
+
|
75
|
+
# @param [Seahorse::Client::RequestContext] context
|
76
|
+
# @param [String] message
|
77
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::InternalServerException] data
|
78
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
79
|
+
super(context, message, data)
|
80
|
+
end
|
81
|
+
|
82
|
+
# @return [String]
|
83
|
+
def message
|
84
|
+
@message || @data[:message]
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class ResourceNotFoundException < ServiceError
|
89
|
+
|
90
|
+
# @param [Seahorse::Client::RequestContext] context
|
91
|
+
# @param [String] message
|
92
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::ResourceNotFoundException] data
|
93
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
94
|
+
super(context, message, data)
|
95
|
+
end
|
96
|
+
|
97
|
+
# @return [String]
|
98
|
+
def message
|
99
|
+
@message || @data[:message]
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class ServiceQuotaExceededException < ServiceError
|
104
|
+
|
105
|
+
# @param [Seahorse::Client::RequestContext] context
|
106
|
+
# @param [String] message
|
107
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::ServiceQuotaExceededException] data
|
108
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
109
|
+
super(context, message, data)
|
110
|
+
end
|
111
|
+
|
112
|
+
# @return [String]
|
113
|
+
def message
|
114
|
+
@message || @data[:message]
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
class ValidationException < ServiceError
|
119
|
+
|
120
|
+
# @param [Seahorse::Client::RequestContext] context
|
121
|
+
# @param [String] message
|
122
|
+
# @param [Aws::CloudFrontKeyValueStore::Types::ValidationException] data
|
123
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
124
|
+
super(context, message, data)
|
125
|
+
end
|
126
|
+
|
127
|
+
# @return [String]
|
128
|
+
def message
|
129
|
+
@message || @data[:message]
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|