aws-sdk-qapps 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-qapps/client.rb +2443 -0
- data/lib/aws-sdk-qapps/client_api.rb +991 -0
- data/lib/aws-sdk-qapps/customizations.rb +0 -0
- data/lib/aws-sdk-qapps/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-qapps/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-qapps/endpoints.rb +338 -0
- data/lib/aws-sdk-qapps/errors.rb +264 -0
- data/lib/aws-sdk-qapps/plugins/endpoints.rb +116 -0
- data/lib/aws-sdk-qapps/resource.rb +26 -0
- data/lib/aws-sdk-qapps/types.rb +2136 -0
- data/lib/aws-sdk-qapps/waiters.rb +15 -0
- data/lib/aws-sdk-qapps.rb +58 -0
- data/sig/client.rbs +625 -0
- data/sig/errors.rbs +57 -0
- data/sig/resource.rbs +80 -0
- data/sig/types.rbs +622 -0
- data/sig/waiters.rbs +13 -0
- metadata +100 -0
@@ -0,0 +1,264 @@
|
|
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::QApps
|
11
|
+
|
12
|
+
# When QApps returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::QApps::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all QApps errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::QApps::Errors::ServiceError
|
20
|
+
# # rescues all QApps 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
|
+
# * {ContentTooLargeException}
|
33
|
+
# * {InternalServerException}
|
34
|
+
# * {ResourceNotFoundException}
|
35
|
+
# * {ServiceQuotaExceededException}
|
36
|
+
# * {ThrottlingException}
|
37
|
+
# * {UnauthorizedException}
|
38
|
+
# * {ValidationException}
|
39
|
+
#
|
40
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
41
|
+
# if they are not defined above.
|
42
|
+
module Errors
|
43
|
+
|
44
|
+
extend Aws::Errors::DynamicErrors
|
45
|
+
|
46
|
+
class AccessDeniedException < ServiceError
|
47
|
+
|
48
|
+
# @param [Seahorse::Client::RequestContext] context
|
49
|
+
# @param [String] message
|
50
|
+
# @param [Aws::QApps::Types::AccessDeniedException] data
|
51
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
52
|
+
super(context, message, data)
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [String]
|
56
|
+
def message
|
57
|
+
@message || @data[:message]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class ConflictException < ServiceError
|
62
|
+
|
63
|
+
# @param [Seahorse::Client::RequestContext] context
|
64
|
+
# @param [String] message
|
65
|
+
# @param [Aws::QApps::Types::ConflictException] data
|
66
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
67
|
+
super(context, message, data)
|
68
|
+
end
|
69
|
+
|
70
|
+
# @return [String]
|
71
|
+
def message
|
72
|
+
@message || @data[:message]
|
73
|
+
end
|
74
|
+
|
75
|
+
# @return [String]
|
76
|
+
def resource_id
|
77
|
+
@data[:resource_id]
|
78
|
+
end
|
79
|
+
|
80
|
+
# @return [String]
|
81
|
+
def resource_type
|
82
|
+
@data[:resource_type]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class ContentTooLargeException < ServiceError
|
87
|
+
|
88
|
+
# @param [Seahorse::Client::RequestContext] context
|
89
|
+
# @param [String] message
|
90
|
+
# @param [Aws::QApps::Types::ContentTooLargeException] data
|
91
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
92
|
+
super(context, message, data)
|
93
|
+
end
|
94
|
+
|
95
|
+
# @return [String]
|
96
|
+
def message
|
97
|
+
@message || @data[:message]
|
98
|
+
end
|
99
|
+
|
100
|
+
# @return [String]
|
101
|
+
def resource_id
|
102
|
+
@data[:resource_id]
|
103
|
+
end
|
104
|
+
|
105
|
+
# @return [String]
|
106
|
+
def resource_type
|
107
|
+
@data[:resource_type]
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class InternalServerException < ServiceError
|
112
|
+
|
113
|
+
# @param [Seahorse::Client::RequestContext] context
|
114
|
+
# @param [String] message
|
115
|
+
# @param [Aws::QApps::Types::InternalServerException] data
|
116
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
117
|
+
super(context, message, data)
|
118
|
+
end
|
119
|
+
|
120
|
+
# @return [String]
|
121
|
+
def message
|
122
|
+
@message || @data[:message]
|
123
|
+
end
|
124
|
+
|
125
|
+
# @return [String]
|
126
|
+
def retry_after_seconds
|
127
|
+
@data[:retry_after_seconds]
|
128
|
+
end
|
129
|
+
|
130
|
+
def retryable?
|
131
|
+
true
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
class ResourceNotFoundException < ServiceError
|
136
|
+
|
137
|
+
# @param [Seahorse::Client::RequestContext] context
|
138
|
+
# @param [String] message
|
139
|
+
# @param [Aws::QApps::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_id
|
151
|
+
@data[:resource_id]
|
152
|
+
end
|
153
|
+
|
154
|
+
# @return [String]
|
155
|
+
def resource_type
|
156
|
+
@data[:resource_type]
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
class ServiceQuotaExceededException < ServiceError
|
161
|
+
|
162
|
+
# @param [Seahorse::Client::RequestContext] context
|
163
|
+
# @param [String] message
|
164
|
+
# @param [Aws::QApps::Types::ServiceQuotaExceededException] data
|
165
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
166
|
+
super(context, message, data)
|
167
|
+
end
|
168
|
+
|
169
|
+
# @return [String]
|
170
|
+
def message
|
171
|
+
@message || @data[:message]
|
172
|
+
end
|
173
|
+
|
174
|
+
# @return [String]
|
175
|
+
def resource_id
|
176
|
+
@data[:resource_id]
|
177
|
+
end
|
178
|
+
|
179
|
+
# @return [String]
|
180
|
+
def resource_type
|
181
|
+
@data[:resource_type]
|
182
|
+
end
|
183
|
+
|
184
|
+
# @return [String]
|
185
|
+
def service_code
|
186
|
+
@data[:service_code]
|
187
|
+
end
|
188
|
+
|
189
|
+
# @return [String]
|
190
|
+
def quota_code
|
191
|
+
@data[:quota_code]
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
class ThrottlingException < ServiceError
|
196
|
+
|
197
|
+
# @param [Seahorse::Client::RequestContext] context
|
198
|
+
# @param [String] message
|
199
|
+
# @param [Aws::QApps::Types::ThrottlingException] data
|
200
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
201
|
+
super(context, message, data)
|
202
|
+
end
|
203
|
+
|
204
|
+
# @return [String]
|
205
|
+
def message
|
206
|
+
@message || @data[:message]
|
207
|
+
end
|
208
|
+
|
209
|
+
# @return [String]
|
210
|
+
def service_code
|
211
|
+
@data[:service_code]
|
212
|
+
end
|
213
|
+
|
214
|
+
# @return [String]
|
215
|
+
def quota_code
|
216
|
+
@data[:quota_code]
|
217
|
+
end
|
218
|
+
|
219
|
+
# @return [String]
|
220
|
+
def retry_after_seconds
|
221
|
+
@data[:retry_after_seconds]
|
222
|
+
end
|
223
|
+
|
224
|
+
def retryable?
|
225
|
+
true
|
226
|
+
end
|
227
|
+
|
228
|
+
def throttling?
|
229
|
+
true
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
class UnauthorizedException < ServiceError
|
234
|
+
|
235
|
+
# @param [Seahorse::Client::RequestContext] context
|
236
|
+
# @param [String] message
|
237
|
+
# @param [Aws::QApps::Types::UnauthorizedException] data
|
238
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
239
|
+
super(context, message, data)
|
240
|
+
end
|
241
|
+
|
242
|
+
# @return [String]
|
243
|
+
def message
|
244
|
+
@message || @data[:message]
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
class ValidationException < ServiceError
|
249
|
+
|
250
|
+
# @param [Seahorse::Client::RequestContext] context
|
251
|
+
# @param [String] message
|
252
|
+
# @param [Aws::QApps::Types::ValidationException] data
|
253
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
254
|
+
super(context, message, data)
|
255
|
+
end
|
256
|
+
|
257
|
+
# @return [String]
|
258
|
+
def message
|
259
|
+
@message || @data[:message]
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
end
|
@@ -0,0 +1,116 @@
|
|
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::QApps
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::QApps::EndpointProvider',
|
17
|
+
rbs_type: 'untyped',
|
18
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
19
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
20
|
+
'where `parameters` is a Struct similar to '\
|
21
|
+
'`Aws::QApps::EndpointParameters`'
|
22
|
+
) do |cfg|
|
23
|
+
Aws::QApps::EndpointProvider.new
|
24
|
+
end
|
25
|
+
|
26
|
+
# @api private
|
27
|
+
class Handler < Seahorse::Client::Handler
|
28
|
+
def call(context)
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
|
36
|
+
context[:endpoint_params] = params
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
38
|
+
end
|
39
|
+
|
40
|
+
context[:auth_scheme] =
|
41
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
42
|
+
|
43
|
+
@handler.call(context)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def apply_endpoint_headers(context, headers)
|
49
|
+
headers.each do |key, values|
|
50
|
+
value = values
|
51
|
+
.compact
|
52
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
53
|
+
.join(',')
|
54
|
+
|
55
|
+
context.http_request.headers[key] = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def parameters_for_operation(context)
|
60
|
+
case context.operation_name
|
61
|
+
when :associate_library_item_review
|
62
|
+
Aws::QApps::Endpoints::AssociateLibraryItemReview.build(context)
|
63
|
+
when :associate_q_app_with_user
|
64
|
+
Aws::QApps::Endpoints::AssociateQAppWithUser.build(context)
|
65
|
+
when :create_library_item
|
66
|
+
Aws::QApps::Endpoints::CreateLibraryItem.build(context)
|
67
|
+
when :create_q_app
|
68
|
+
Aws::QApps::Endpoints::CreateQApp.build(context)
|
69
|
+
when :delete_library_item
|
70
|
+
Aws::QApps::Endpoints::DeleteLibraryItem.build(context)
|
71
|
+
when :delete_q_app
|
72
|
+
Aws::QApps::Endpoints::DeleteQApp.build(context)
|
73
|
+
when :disassociate_library_item_review
|
74
|
+
Aws::QApps::Endpoints::DisassociateLibraryItemReview.build(context)
|
75
|
+
when :disassociate_q_app_from_user
|
76
|
+
Aws::QApps::Endpoints::DisassociateQAppFromUser.build(context)
|
77
|
+
when :get_library_item
|
78
|
+
Aws::QApps::Endpoints::GetLibraryItem.build(context)
|
79
|
+
when :get_q_app
|
80
|
+
Aws::QApps::Endpoints::GetQApp.build(context)
|
81
|
+
when :get_q_app_session
|
82
|
+
Aws::QApps::Endpoints::GetQAppSession.build(context)
|
83
|
+
when :import_document
|
84
|
+
Aws::QApps::Endpoints::ImportDocument.build(context)
|
85
|
+
when :list_library_items
|
86
|
+
Aws::QApps::Endpoints::ListLibraryItems.build(context)
|
87
|
+
when :list_q_apps
|
88
|
+
Aws::QApps::Endpoints::ListQApps.build(context)
|
89
|
+
when :list_tags_for_resource
|
90
|
+
Aws::QApps::Endpoints::ListTagsForResource.build(context)
|
91
|
+
when :predict_q_app
|
92
|
+
Aws::QApps::Endpoints::PredictQApp.build(context)
|
93
|
+
when :start_q_app_session
|
94
|
+
Aws::QApps::Endpoints::StartQAppSession.build(context)
|
95
|
+
when :stop_q_app_session
|
96
|
+
Aws::QApps::Endpoints::StopQAppSession.build(context)
|
97
|
+
when :tag_resource
|
98
|
+
Aws::QApps::Endpoints::TagResource.build(context)
|
99
|
+
when :untag_resource
|
100
|
+
Aws::QApps::Endpoints::UntagResource.build(context)
|
101
|
+
when :update_library_item
|
102
|
+
Aws::QApps::Endpoints::UpdateLibraryItem.build(context)
|
103
|
+
when :update_q_app
|
104
|
+
Aws::QApps::Endpoints::UpdateQApp.build(context)
|
105
|
+
when :update_q_app_session
|
106
|
+
Aws::QApps::Endpoints::UpdateQAppSession.build(context)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def add_handlers(handlers, _config)
|
112
|
+
handlers.add(Handler, step: :build, priority: 75)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
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::QApps
|
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
|