aws-sdk-cloudcontrolapi 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.
@@ -0,0 +1,374 @@
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::CloudControlApi
11
+
12
+ # When CloudControlApi returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::CloudControlApi::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all CloudControlApi errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::CloudControlApi::Errors::ServiceError
20
+ # # rescues all CloudControlApi 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
+ # * {AlreadyExistsException}
31
+ # * {ClientTokenConflictException}
32
+ # * {ConcurrentModificationException}
33
+ # * {ConcurrentOperationException}
34
+ # * {GeneralServiceException}
35
+ # * {HandlerFailureException}
36
+ # * {HandlerInternalFailureException}
37
+ # * {InvalidCredentialsException}
38
+ # * {InvalidRequestException}
39
+ # * {NetworkFailureException}
40
+ # * {NotStabilizedException}
41
+ # * {NotUpdatableException}
42
+ # * {PrivateTypeException}
43
+ # * {RequestTokenNotFoundException}
44
+ # * {ResourceConflictException}
45
+ # * {ResourceNotFoundException}
46
+ # * {ServiceInternalErrorException}
47
+ # * {ServiceLimitExceededException}
48
+ # * {ThrottlingException}
49
+ # * {TypeNotFoundException}
50
+ # * {UnsupportedActionException}
51
+ #
52
+ # Additionally, error classes are dynamically generated for service errors based on the error code
53
+ # if they are not defined above.
54
+ module Errors
55
+
56
+ extend Aws::Errors::DynamicErrors
57
+
58
+ class AlreadyExistsException < ServiceError
59
+
60
+ # @param [Seahorse::Client::RequestContext] context
61
+ # @param [String] message
62
+ # @param [Aws::CloudControlApi::Types::AlreadyExistsException] 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 ClientTokenConflictException < ServiceError
74
+
75
+ # @param [Seahorse::Client::RequestContext] context
76
+ # @param [String] message
77
+ # @param [Aws::CloudControlApi::Types::ClientTokenConflictException] 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 ConcurrentModificationException < ServiceError
89
+
90
+ # @param [Seahorse::Client::RequestContext] context
91
+ # @param [String] message
92
+ # @param [Aws::CloudControlApi::Types::ConcurrentModificationException] 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 ConcurrentOperationException < ServiceError
104
+
105
+ # @param [Seahorse::Client::RequestContext] context
106
+ # @param [String] message
107
+ # @param [Aws::CloudControlApi::Types::ConcurrentOperationException] 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 GeneralServiceException < ServiceError
119
+
120
+ # @param [Seahorse::Client::RequestContext] context
121
+ # @param [String] message
122
+ # @param [Aws::CloudControlApi::Types::GeneralServiceException] 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
+ class HandlerFailureException < ServiceError
134
+
135
+ # @param [Seahorse::Client::RequestContext] context
136
+ # @param [String] message
137
+ # @param [Aws::CloudControlApi::Types::HandlerFailureException] data
138
+ def initialize(context, message, data = Aws::EmptyStructure.new)
139
+ super(context, message, data)
140
+ end
141
+
142
+ # @return [String]
143
+ def message
144
+ @message || @data[:message]
145
+ end
146
+ end
147
+
148
+ class HandlerInternalFailureException < ServiceError
149
+
150
+ # @param [Seahorse::Client::RequestContext] context
151
+ # @param [String] message
152
+ # @param [Aws::CloudControlApi::Types::HandlerInternalFailureException] data
153
+ def initialize(context, message, data = Aws::EmptyStructure.new)
154
+ super(context, message, data)
155
+ end
156
+
157
+ # @return [String]
158
+ def message
159
+ @message || @data[:message]
160
+ end
161
+ end
162
+
163
+ class InvalidCredentialsException < ServiceError
164
+
165
+ # @param [Seahorse::Client::RequestContext] context
166
+ # @param [String] message
167
+ # @param [Aws::CloudControlApi::Types::InvalidCredentialsException] data
168
+ def initialize(context, message, data = Aws::EmptyStructure.new)
169
+ super(context, message, data)
170
+ end
171
+
172
+ # @return [String]
173
+ def message
174
+ @message || @data[:message]
175
+ end
176
+ end
177
+
178
+ class InvalidRequestException < ServiceError
179
+
180
+ # @param [Seahorse::Client::RequestContext] context
181
+ # @param [String] message
182
+ # @param [Aws::CloudControlApi::Types::InvalidRequestException] data
183
+ def initialize(context, message, data = Aws::EmptyStructure.new)
184
+ super(context, message, data)
185
+ end
186
+
187
+ # @return [String]
188
+ def message
189
+ @message || @data[:message]
190
+ end
191
+ end
192
+
193
+ class NetworkFailureException < ServiceError
194
+
195
+ # @param [Seahorse::Client::RequestContext] context
196
+ # @param [String] message
197
+ # @param [Aws::CloudControlApi::Types::NetworkFailureException] data
198
+ def initialize(context, message, data = Aws::EmptyStructure.new)
199
+ super(context, message, data)
200
+ end
201
+
202
+ # @return [String]
203
+ def message
204
+ @message || @data[:message]
205
+ end
206
+ end
207
+
208
+ class NotStabilizedException < ServiceError
209
+
210
+ # @param [Seahorse::Client::RequestContext] context
211
+ # @param [String] message
212
+ # @param [Aws::CloudControlApi::Types::NotStabilizedException] data
213
+ def initialize(context, message, data = Aws::EmptyStructure.new)
214
+ super(context, message, data)
215
+ end
216
+
217
+ # @return [String]
218
+ def message
219
+ @message || @data[:message]
220
+ end
221
+ end
222
+
223
+ class NotUpdatableException < ServiceError
224
+
225
+ # @param [Seahorse::Client::RequestContext] context
226
+ # @param [String] message
227
+ # @param [Aws::CloudControlApi::Types::NotUpdatableException] data
228
+ def initialize(context, message, data = Aws::EmptyStructure.new)
229
+ super(context, message, data)
230
+ end
231
+
232
+ # @return [String]
233
+ def message
234
+ @message || @data[:message]
235
+ end
236
+ end
237
+
238
+ class PrivateTypeException < ServiceError
239
+
240
+ # @param [Seahorse::Client::RequestContext] context
241
+ # @param [String] message
242
+ # @param [Aws::CloudControlApi::Types::PrivateTypeException] data
243
+ def initialize(context, message, data = Aws::EmptyStructure.new)
244
+ super(context, message, data)
245
+ end
246
+
247
+ # @return [String]
248
+ def message
249
+ @message || @data[:message]
250
+ end
251
+ end
252
+
253
+ class RequestTokenNotFoundException < ServiceError
254
+
255
+ # @param [Seahorse::Client::RequestContext] context
256
+ # @param [String] message
257
+ # @param [Aws::CloudControlApi::Types::RequestTokenNotFoundException] data
258
+ def initialize(context, message, data = Aws::EmptyStructure.new)
259
+ super(context, message, data)
260
+ end
261
+
262
+ # @return [String]
263
+ def message
264
+ @message || @data[:message]
265
+ end
266
+ end
267
+
268
+ class ResourceConflictException < ServiceError
269
+
270
+ # @param [Seahorse::Client::RequestContext] context
271
+ # @param [String] message
272
+ # @param [Aws::CloudControlApi::Types::ResourceConflictException] data
273
+ def initialize(context, message, data = Aws::EmptyStructure.new)
274
+ super(context, message, data)
275
+ end
276
+
277
+ # @return [String]
278
+ def message
279
+ @message || @data[:message]
280
+ end
281
+ end
282
+
283
+ class ResourceNotFoundException < ServiceError
284
+
285
+ # @param [Seahorse::Client::RequestContext] context
286
+ # @param [String] message
287
+ # @param [Aws::CloudControlApi::Types::ResourceNotFoundException] data
288
+ def initialize(context, message, data = Aws::EmptyStructure.new)
289
+ super(context, message, data)
290
+ end
291
+
292
+ # @return [String]
293
+ def message
294
+ @message || @data[:message]
295
+ end
296
+ end
297
+
298
+ class ServiceInternalErrorException < ServiceError
299
+
300
+ # @param [Seahorse::Client::RequestContext] context
301
+ # @param [String] message
302
+ # @param [Aws::CloudControlApi::Types::ServiceInternalErrorException] data
303
+ def initialize(context, message, data = Aws::EmptyStructure.new)
304
+ super(context, message, data)
305
+ end
306
+
307
+ # @return [String]
308
+ def message
309
+ @message || @data[:message]
310
+ end
311
+ end
312
+
313
+ class ServiceLimitExceededException < ServiceError
314
+
315
+ # @param [Seahorse::Client::RequestContext] context
316
+ # @param [String] message
317
+ # @param [Aws::CloudControlApi::Types::ServiceLimitExceededException] data
318
+ def initialize(context, message, data = Aws::EmptyStructure.new)
319
+ super(context, message, data)
320
+ end
321
+
322
+ # @return [String]
323
+ def message
324
+ @message || @data[:message]
325
+ end
326
+ end
327
+
328
+ class ThrottlingException < ServiceError
329
+
330
+ # @param [Seahorse::Client::RequestContext] context
331
+ # @param [String] message
332
+ # @param [Aws::CloudControlApi::Types::ThrottlingException] data
333
+ def initialize(context, message, data = Aws::EmptyStructure.new)
334
+ super(context, message, data)
335
+ end
336
+
337
+ # @return [String]
338
+ def message
339
+ @message || @data[:message]
340
+ end
341
+ end
342
+
343
+ class TypeNotFoundException < ServiceError
344
+
345
+ # @param [Seahorse::Client::RequestContext] context
346
+ # @param [String] message
347
+ # @param [Aws::CloudControlApi::Types::TypeNotFoundException] data
348
+ def initialize(context, message, data = Aws::EmptyStructure.new)
349
+ super(context, message, data)
350
+ end
351
+
352
+ # @return [String]
353
+ def message
354
+ @message || @data[:message]
355
+ end
356
+ end
357
+
358
+ class UnsupportedActionException < ServiceError
359
+
360
+ # @param [Seahorse::Client::RequestContext] context
361
+ # @param [String] message
362
+ # @param [Aws::CloudControlApi::Types::UnsupportedActionException] data
363
+ def initialize(context, message, data = Aws::EmptyStructure.new)
364
+ super(context, message, data)
365
+ end
366
+
367
+ # @return [String]
368
+ def message
369
+ @message || @data[:message]
370
+ end
371
+ end
372
+
373
+ end
374
+ end
@@ -0,0 +1,26 @@
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::CloudControlApi
11
+
12
+ class Resource
13
+
14
+ # @param options ({})
15
+ # @option options [Client] :client
16
+ def initialize(options = {})
17
+ @client = options[:client] || Client.new(options)
18
+ end
19
+
20
+ # @return [Client]
21
+ def client
22
+ @client
23
+ end
24
+
25
+ end
26
+ end