aws-sdk-codeconnections 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-codeconnections/client.rb +1687 -0
- data/lib/aws-sdk-codeconnections/client_api.rb +941 -0
- data/lib/aws-sdk-codeconnections/customizations.rb +0 -0
- data/lib/aws-sdk-codeconnections/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-codeconnections/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-codeconnections/endpoints.rb +394 -0
- data/lib/aws-sdk-codeconnections/errors.rb +310 -0
- data/lib/aws-sdk-codeconnections/plugins/endpoints.rb +124 -0
- data/lib/aws-sdk-codeconnections/resource.rb +26 -0
- data/lib/aws-sdk-codeconnections/types.rb +1856 -0
- data/lib/aws-sdk-codeconnections.rb +57 -0
- data/sig/client.rbs +435 -0
- data/sig/errors.rbs +67 -0
- data/sig/resource.rbs +80 -0
- data/sig/types.rbs +553 -0
- data/sig/waiters.rbs +13 -0
- metadata +99 -0
@@ -0,0 +1,310 @@
|
|
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::CodeConnections
|
11
|
+
|
12
|
+
# When CodeConnections returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::CodeConnections::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all CodeConnections errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::CodeConnections::Errors::ServiceError
|
20
|
+
# # rescues all CodeConnections 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
|
+
# * {ConcurrentModificationException}
|
32
|
+
# * {ConditionalCheckFailedException}
|
33
|
+
# * {ConflictException}
|
34
|
+
# * {InternalServerException}
|
35
|
+
# * {InvalidInputException}
|
36
|
+
# * {LimitExceededException}
|
37
|
+
# * {ResourceAlreadyExistsException}
|
38
|
+
# * {ResourceNotFoundException}
|
39
|
+
# * {ResourceUnavailableException}
|
40
|
+
# * {RetryLatestCommitFailedException}
|
41
|
+
# * {SyncBlockerDoesNotExistException}
|
42
|
+
# * {SyncConfigurationStillExistsException}
|
43
|
+
# * {ThrottlingException}
|
44
|
+
# * {UnsupportedOperationException}
|
45
|
+
# * {UnsupportedProviderTypeException}
|
46
|
+
# * {UpdateOutOfSyncException}
|
47
|
+
#
|
48
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
49
|
+
# if they are not defined above.
|
50
|
+
module Errors
|
51
|
+
|
52
|
+
extend Aws::Errors::DynamicErrors
|
53
|
+
|
54
|
+
class AccessDeniedException < ServiceError
|
55
|
+
|
56
|
+
# @param [Seahorse::Client::RequestContext] context
|
57
|
+
# @param [String] message
|
58
|
+
# @param [Aws::CodeConnections::Types::AccessDeniedException] data
|
59
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
60
|
+
super(context, message, data)
|
61
|
+
end
|
62
|
+
|
63
|
+
# @return [String]
|
64
|
+
def message
|
65
|
+
@message || @data[:message]
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class ConcurrentModificationException < ServiceError
|
70
|
+
|
71
|
+
# @param [Seahorse::Client::RequestContext] context
|
72
|
+
# @param [String] message
|
73
|
+
# @param [Aws::CodeConnections::Types::ConcurrentModificationException] data
|
74
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
75
|
+
super(context, message, data)
|
76
|
+
end
|
77
|
+
|
78
|
+
# @return [String]
|
79
|
+
def message
|
80
|
+
@message || @data[:message]
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class ConditionalCheckFailedException < ServiceError
|
85
|
+
|
86
|
+
# @param [Seahorse::Client::RequestContext] context
|
87
|
+
# @param [String] message
|
88
|
+
# @param [Aws::CodeConnections::Types::ConditionalCheckFailedException] data
|
89
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
90
|
+
super(context, message, data)
|
91
|
+
end
|
92
|
+
|
93
|
+
# @return [String]
|
94
|
+
def message
|
95
|
+
@message || @data[:message]
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
class ConflictException < ServiceError
|
100
|
+
|
101
|
+
# @param [Seahorse::Client::RequestContext] context
|
102
|
+
# @param [String] message
|
103
|
+
# @param [Aws::CodeConnections::Types::ConflictException] data
|
104
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
105
|
+
super(context, message, data)
|
106
|
+
end
|
107
|
+
|
108
|
+
# @return [String]
|
109
|
+
def message
|
110
|
+
@message || @data[:message]
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class InternalServerException < ServiceError
|
115
|
+
|
116
|
+
# @param [Seahorse::Client::RequestContext] context
|
117
|
+
# @param [String] message
|
118
|
+
# @param [Aws::CodeConnections::Types::InternalServerException] data
|
119
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
120
|
+
super(context, message, data)
|
121
|
+
end
|
122
|
+
|
123
|
+
# @return [String]
|
124
|
+
def message
|
125
|
+
@message || @data[:message]
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class InvalidInputException < ServiceError
|
130
|
+
|
131
|
+
# @param [Seahorse::Client::RequestContext] context
|
132
|
+
# @param [String] message
|
133
|
+
# @param [Aws::CodeConnections::Types::InvalidInputException] data
|
134
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
135
|
+
super(context, message, data)
|
136
|
+
end
|
137
|
+
|
138
|
+
# @return [String]
|
139
|
+
def message
|
140
|
+
@message || @data[:message]
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
class LimitExceededException < ServiceError
|
145
|
+
|
146
|
+
# @param [Seahorse::Client::RequestContext] context
|
147
|
+
# @param [String] message
|
148
|
+
# @param [Aws::CodeConnections::Types::LimitExceededException] data
|
149
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
150
|
+
super(context, message, data)
|
151
|
+
end
|
152
|
+
|
153
|
+
# @return [String]
|
154
|
+
def message
|
155
|
+
@message || @data[:message]
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
class ResourceAlreadyExistsException < ServiceError
|
160
|
+
|
161
|
+
# @param [Seahorse::Client::RequestContext] context
|
162
|
+
# @param [String] message
|
163
|
+
# @param [Aws::CodeConnections::Types::ResourceAlreadyExistsException] data
|
164
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
165
|
+
super(context, message, data)
|
166
|
+
end
|
167
|
+
|
168
|
+
# @return [String]
|
169
|
+
def message
|
170
|
+
@message || @data[:message]
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
class ResourceNotFoundException < ServiceError
|
175
|
+
|
176
|
+
# @param [Seahorse::Client::RequestContext] context
|
177
|
+
# @param [String] message
|
178
|
+
# @param [Aws::CodeConnections::Types::ResourceNotFoundException] data
|
179
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
180
|
+
super(context, message, data)
|
181
|
+
end
|
182
|
+
|
183
|
+
# @return [String]
|
184
|
+
def message
|
185
|
+
@message || @data[:message]
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
class ResourceUnavailableException < ServiceError
|
190
|
+
|
191
|
+
# @param [Seahorse::Client::RequestContext] context
|
192
|
+
# @param [String] message
|
193
|
+
# @param [Aws::CodeConnections::Types::ResourceUnavailableException] data
|
194
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
195
|
+
super(context, message, data)
|
196
|
+
end
|
197
|
+
|
198
|
+
# @return [String]
|
199
|
+
def message
|
200
|
+
@message || @data[:message]
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
class RetryLatestCommitFailedException < ServiceError
|
205
|
+
|
206
|
+
# @param [Seahorse::Client::RequestContext] context
|
207
|
+
# @param [String] message
|
208
|
+
# @param [Aws::CodeConnections::Types::RetryLatestCommitFailedException] data
|
209
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
210
|
+
super(context, message, data)
|
211
|
+
end
|
212
|
+
|
213
|
+
# @return [String]
|
214
|
+
def message
|
215
|
+
@message || @data[:message]
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
class SyncBlockerDoesNotExistException < ServiceError
|
220
|
+
|
221
|
+
# @param [Seahorse::Client::RequestContext] context
|
222
|
+
# @param [String] message
|
223
|
+
# @param [Aws::CodeConnections::Types::SyncBlockerDoesNotExistException] data
|
224
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
225
|
+
super(context, message, data)
|
226
|
+
end
|
227
|
+
|
228
|
+
# @return [String]
|
229
|
+
def message
|
230
|
+
@message || @data[:message]
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
class SyncConfigurationStillExistsException < ServiceError
|
235
|
+
|
236
|
+
# @param [Seahorse::Client::RequestContext] context
|
237
|
+
# @param [String] message
|
238
|
+
# @param [Aws::CodeConnections::Types::SyncConfigurationStillExistsException] data
|
239
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
240
|
+
super(context, message, data)
|
241
|
+
end
|
242
|
+
|
243
|
+
# @return [String]
|
244
|
+
def message
|
245
|
+
@message || @data[:message]
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
class ThrottlingException < ServiceError
|
250
|
+
|
251
|
+
# @param [Seahorse::Client::RequestContext] context
|
252
|
+
# @param [String] message
|
253
|
+
# @param [Aws::CodeConnections::Types::ThrottlingException] data
|
254
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
255
|
+
super(context, message, data)
|
256
|
+
end
|
257
|
+
|
258
|
+
# @return [String]
|
259
|
+
def message
|
260
|
+
@message || @data[:message]
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class UnsupportedOperationException < ServiceError
|
265
|
+
|
266
|
+
# @param [Seahorse::Client::RequestContext] context
|
267
|
+
# @param [String] message
|
268
|
+
# @param [Aws::CodeConnections::Types::UnsupportedOperationException] data
|
269
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
270
|
+
super(context, message, data)
|
271
|
+
end
|
272
|
+
|
273
|
+
# @return [String]
|
274
|
+
def message
|
275
|
+
@message || @data[:message]
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
class UnsupportedProviderTypeException < ServiceError
|
280
|
+
|
281
|
+
# @param [Seahorse::Client::RequestContext] context
|
282
|
+
# @param [String] message
|
283
|
+
# @param [Aws::CodeConnections::Types::UnsupportedProviderTypeException] data
|
284
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
285
|
+
super(context, message, data)
|
286
|
+
end
|
287
|
+
|
288
|
+
# @return [String]
|
289
|
+
def message
|
290
|
+
@message || @data[:message]
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
class UpdateOutOfSyncException < ServiceError
|
295
|
+
|
296
|
+
# @param [Seahorse::Client::RequestContext] context
|
297
|
+
# @param [String] message
|
298
|
+
# @param [Aws::CodeConnections::Types::UpdateOutOfSyncException] data
|
299
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
300
|
+
super(context, message, data)
|
301
|
+
end
|
302
|
+
|
303
|
+
# @return [String]
|
304
|
+
def message
|
305
|
+
@message || @data[:message]
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
end
|
@@ -0,0 +1,124 @@
|
|
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::CodeConnections
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::CodeConnections::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::CodeConnections::EndpointParameters`'
|
22
|
+
) do |cfg|
|
23
|
+
Aws::CodeConnections::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 :create_connection
|
62
|
+
Aws::CodeConnections::Endpoints::CreateConnection.build(context)
|
63
|
+
when :create_host
|
64
|
+
Aws::CodeConnections::Endpoints::CreateHost.build(context)
|
65
|
+
when :create_repository_link
|
66
|
+
Aws::CodeConnections::Endpoints::CreateRepositoryLink.build(context)
|
67
|
+
when :create_sync_configuration
|
68
|
+
Aws::CodeConnections::Endpoints::CreateSyncConfiguration.build(context)
|
69
|
+
when :delete_connection
|
70
|
+
Aws::CodeConnections::Endpoints::DeleteConnection.build(context)
|
71
|
+
when :delete_host
|
72
|
+
Aws::CodeConnections::Endpoints::DeleteHost.build(context)
|
73
|
+
when :delete_repository_link
|
74
|
+
Aws::CodeConnections::Endpoints::DeleteRepositoryLink.build(context)
|
75
|
+
when :delete_sync_configuration
|
76
|
+
Aws::CodeConnections::Endpoints::DeleteSyncConfiguration.build(context)
|
77
|
+
when :get_connection
|
78
|
+
Aws::CodeConnections::Endpoints::GetConnection.build(context)
|
79
|
+
when :get_host
|
80
|
+
Aws::CodeConnections::Endpoints::GetHost.build(context)
|
81
|
+
when :get_repository_link
|
82
|
+
Aws::CodeConnections::Endpoints::GetRepositoryLink.build(context)
|
83
|
+
when :get_repository_sync_status
|
84
|
+
Aws::CodeConnections::Endpoints::GetRepositorySyncStatus.build(context)
|
85
|
+
when :get_resource_sync_status
|
86
|
+
Aws::CodeConnections::Endpoints::GetResourceSyncStatus.build(context)
|
87
|
+
when :get_sync_blocker_summary
|
88
|
+
Aws::CodeConnections::Endpoints::GetSyncBlockerSummary.build(context)
|
89
|
+
when :get_sync_configuration
|
90
|
+
Aws::CodeConnections::Endpoints::GetSyncConfiguration.build(context)
|
91
|
+
when :list_connections
|
92
|
+
Aws::CodeConnections::Endpoints::ListConnections.build(context)
|
93
|
+
when :list_hosts
|
94
|
+
Aws::CodeConnections::Endpoints::ListHosts.build(context)
|
95
|
+
when :list_repository_links
|
96
|
+
Aws::CodeConnections::Endpoints::ListRepositoryLinks.build(context)
|
97
|
+
when :list_repository_sync_definitions
|
98
|
+
Aws::CodeConnections::Endpoints::ListRepositorySyncDefinitions.build(context)
|
99
|
+
when :list_sync_configurations
|
100
|
+
Aws::CodeConnections::Endpoints::ListSyncConfigurations.build(context)
|
101
|
+
when :list_tags_for_resource
|
102
|
+
Aws::CodeConnections::Endpoints::ListTagsForResource.build(context)
|
103
|
+
when :tag_resource
|
104
|
+
Aws::CodeConnections::Endpoints::TagResource.build(context)
|
105
|
+
when :untag_resource
|
106
|
+
Aws::CodeConnections::Endpoints::UntagResource.build(context)
|
107
|
+
when :update_host
|
108
|
+
Aws::CodeConnections::Endpoints::UpdateHost.build(context)
|
109
|
+
when :update_repository_link
|
110
|
+
Aws::CodeConnections::Endpoints::UpdateRepositoryLink.build(context)
|
111
|
+
when :update_sync_blocker
|
112
|
+
Aws::CodeConnections::Endpoints::UpdateSyncBlocker.build(context)
|
113
|
+
when :update_sync_configuration
|
114
|
+
Aws::CodeConnections::Endpoints::UpdateSyncConfiguration.build(context)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def add_handlers(handlers, _config)
|
120
|
+
handlers.add(Handler, step: :build, priority: 75)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
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::CodeConnections
|
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
|