aws-sdk-redshiftserverless 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -0,0 +1,230 @@
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::RedshiftServerless
11
+
12
+ # When RedshiftServerless returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::RedshiftServerless::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all RedshiftServerless errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::RedshiftServerless::Errors::ServiceError
20
+ # # rescues all RedshiftServerless 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
+ # * {InsufficientCapacityException}
33
+ # * {InternalServerException}
34
+ # * {InvalidPaginationException}
35
+ # * {ResourceNotFoundException}
36
+ # * {ServiceQuotaExceededException}
37
+ # * {ThrottlingException}
38
+ # * {TooManyTagsException}
39
+ # * {ValidationException}
40
+ #
41
+ # Additionally, error classes are dynamically generated for service errors based on the error code
42
+ # if they are not defined above.
43
+ module Errors
44
+
45
+ extend Aws::Errors::DynamicErrors
46
+
47
+ class AccessDeniedException < ServiceError
48
+
49
+ # @param [Seahorse::Client::RequestContext] context
50
+ # @param [String] message
51
+ # @param [Aws::RedshiftServerless::Types::AccessDeniedException] data
52
+ def initialize(context, message, data = Aws::EmptyStructure.new)
53
+ super(context, message, data)
54
+ end
55
+
56
+ # @return [String]
57
+ def code
58
+ @code || @data[:code]
59
+ end
60
+
61
+ # @return [String]
62
+ def message
63
+ @message || @data[:message]
64
+ end
65
+ end
66
+
67
+ class ConflictException < ServiceError
68
+
69
+ # @param [Seahorse::Client::RequestContext] context
70
+ # @param [String] message
71
+ # @param [Aws::RedshiftServerless::Types::ConflictException] data
72
+ def initialize(context, message, data = Aws::EmptyStructure.new)
73
+ super(context, message, data)
74
+ end
75
+
76
+ # @return [String]
77
+ def message
78
+ @message || @data[:message]
79
+ end
80
+ end
81
+
82
+ class InsufficientCapacityException < ServiceError
83
+
84
+ # @param [Seahorse::Client::RequestContext] context
85
+ # @param [String] message
86
+ # @param [Aws::RedshiftServerless::Types::InsufficientCapacityException] data
87
+ def initialize(context, message, data = Aws::EmptyStructure.new)
88
+ super(context, message, data)
89
+ end
90
+
91
+ # @return [String]
92
+ def message
93
+ @message || @data[:message]
94
+ end
95
+
96
+ def retryable?
97
+ true
98
+ end
99
+ end
100
+
101
+ class InternalServerException < ServiceError
102
+
103
+ # @param [Seahorse::Client::RequestContext] context
104
+ # @param [String] message
105
+ # @param [Aws::RedshiftServerless::Types::InternalServerException] data
106
+ def initialize(context, message, data = Aws::EmptyStructure.new)
107
+ super(context, message, data)
108
+ end
109
+
110
+ # @return [String]
111
+ def message
112
+ @message || @data[:message]
113
+ end
114
+
115
+ def retryable?
116
+ true
117
+ end
118
+ end
119
+
120
+ class InvalidPaginationException < ServiceError
121
+
122
+ # @param [Seahorse::Client::RequestContext] context
123
+ # @param [String] message
124
+ # @param [Aws::RedshiftServerless::Types::InvalidPaginationException] data
125
+ def initialize(context, message, data = Aws::EmptyStructure.new)
126
+ super(context, message, data)
127
+ end
128
+
129
+ # @return [String]
130
+ def message
131
+ @message || @data[:message]
132
+ end
133
+ end
134
+
135
+ class ResourceNotFoundException < ServiceError
136
+
137
+ # @param [Seahorse::Client::RequestContext] context
138
+ # @param [String] message
139
+ # @param [Aws::RedshiftServerless::Types::ResourceNotFoundException] data
140
+ def initialize(context, message, data = Aws::EmptyStructure.new)
141
+ super(context, message, data)
142
+ end
143
+
144
+ # @return [String]
145
+ def message
146
+ @message || @data[:message]
147
+ end
148
+
149
+ # @return [String]
150
+ def resource_name
151
+ @data[:resource_name]
152
+ end
153
+ end
154
+
155
+ class ServiceQuotaExceededException < ServiceError
156
+
157
+ # @param [Seahorse::Client::RequestContext] context
158
+ # @param [String] message
159
+ # @param [Aws::RedshiftServerless::Types::ServiceQuotaExceededException] data
160
+ def initialize(context, message, data = Aws::EmptyStructure.new)
161
+ super(context, message, data)
162
+ end
163
+
164
+ # @return [String]
165
+ def message
166
+ @message || @data[:message]
167
+ end
168
+ end
169
+
170
+ class ThrottlingException < ServiceError
171
+
172
+ # @param [Seahorse::Client::RequestContext] context
173
+ # @param [String] message
174
+ # @param [Aws::RedshiftServerless::Types::ThrottlingException] data
175
+ def initialize(context, message, data = Aws::EmptyStructure.new)
176
+ super(context, message, data)
177
+ end
178
+
179
+ # @return [String]
180
+ def code
181
+ @code || @data[:code]
182
+ end
183
+
184
+ # @return [String]
185
+ def message
186
+ @message || @data[:message]
187
+ end
188
+
189
+ def retryable?
190
+ true
191
+ end
192
+ end
193
+
194
+ class TooManyTagsException < ServiceError
195
+
196
+ # @param [Seahorse::Client::RequestContext] context
197
+ # @param [String] message
198
+ # @param [Aws::RedshiftServerless::Types::TooManyTagsException] data
199
+ def initialize(context, message, data = Aws::EmptyStructure.new)
200
+ super(context, message, data)
201
+ end
202
+
203
+ # @return [String]
204
+ def message
205
+ @message || @data[:message]
206
+ end
207
+
208
+ # @return [String]
209
+ def resource_name
210
+ @data[:resource_name]
211
+ end
212
+ end
213
+
214
+ class ValidationException < ServiceError
215
+
216
+ # @param [Seahorse::Client::RequestContext] context
217
+ # @param [String] message
218
+ # @param [Aws::RedshiftServerless::Types::ValidationException] data
219
+ def initialize(context, message, data = Aws::EmptyStructure.new)
220
+ super(context, message, data)
221
+ end
222
+
223
+ # @return [String]
224
+ def message
225
+ @message || @data[:message]
226
+ end
227
+ end
228
+
229
+ end
230
+ 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::RedshiftServerless
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