aws-sdk-osis 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,211 @@
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::OSIS
12
+ module Endpoints
13
+
14
+ class CreatePipeline
15
+ def self.build(context)
16
+ unless context.config.regional_endpoint
17
+ endpoint = context.config.endpoint.to_s
18
+ end
19
+ Aws::OSIS::EndpointParameters.new(
20
+ region: context.config.region,
21
+ use_dual_stack: context.config.use_dualstack_endpoint,
22
+ use_fips: context.config.use_fips_endpoint,
23
+ endpoint: endpoint,
24
+ )
25
+ end
26
+ end
27
+
28
+ class DeletePipeline
29
+ def self.build(context)
30
+ unless context.config.regional_endpoint
31
+ endpoint = context.config.endpoint.to_s
32
+ end
33
+ Aws::OSIS::EndpointParameters.new(
34
+ region: context.config.region,
35
+ use_dual_stack: context.config.use_dualstack_endpoint,
36
+ use_fips: context.config.use_fips_endpoint,
37
+ endpoint: endpoint,
38
+ )
39
+ end
40
+ end
41
+
42
+ class GetPipeline
43
+ def self.build(context)
44
+ unless context.config.regional_endpoint
45
+ endpoint = context.config.endpoint.to_s
46
+ end
47
+ Aws::OSIS::EndpointParameters.new(
48
+ region: context.config.region,
49
+ use_dual_stack: context.config.use_dualstack_endpoint,
50
+ use_fips: context.config.use_fips_endpoint,
51
+ endpoint: endpoint,
52
+ )
53
+ end
54
+ end
55
+
56
+ class GetPipelineBlueprint
57
+ def self.build(context)
58
+ unless context.config.regional_endpoint
59
+ endpoint = context.config.endpoint.to_s
60
+ end
61
+ Aws::OSIS::EndpointParameters.new(
62
+ region: context.config.region,
63
+ use_dual_stack: context.config.use_dualstack_endpoint,
64
+ use_fips: context.config.use_fips_endpoint,
65
+ endpoint: endpoint,
66
+ )
67
+ end
68
+ end
69
+
70
+ class GetPipelineChangeProgress
71
+ def self.build(context)
72
+ unless context.config.regional_endpoint
73
+ endpoint = context.config.endpoint.to_s
74
+ end
75
+ Aws::OSIS::EndpointParameters.new(
76
+ region: context.config.region,
77
+ use_dual_stack: context.config.use_dualstack_endpoint,
78
+ use_fips: context.config.use_fips_endpoint,
79
+ endpoint: endpoint,
80
+ )
81
+ end
82
+ end
83
+
84
+ class ListPipelineBlueprints
85
+ def self.build(context)
86
+ unless context.config.regional_endpoint
87
+ endpoint = context.config.endpoint.to_s
88
+ end
89
+ Aws::OSIS::EndpointParameters.new(
90
+ region: context.config.region,
91
+ use_dual_stack: context.config.use_dualstack_endpoint,
92
+ use_fips: context.config.use_fips_endpoint,
93
+ endpoint: endpoint,
94
+ )
95
+ end
96
+ end
97
+
98
+ class ListPipelines
99
+ def self.build(context)
100
+ unless context.config.regional_endpoint
101
+ endpoint = context.config.endpoint.to_s
102
+ end
103
+ Aws::OSIS::EndpointParameters.new(
104
+ region: context.config.region,
105
+ use_dual_stack: context.config.use_dualstack_endpoint,
106
+ use_fips: context.config.use_fips_endpoint,
107
+ endpoint: endpoint,
108
+ )
109
+ end
110
+ end
111
+
112
+ class ListTagsForResource
113
+ def self.build(context)
114
+ unless context.config.regional_endpoint
115
+ endpoint = context.config.endpoint.to_s
116
+ end
117
+ Aws::OSIS::EndpointParameters.new(
118
+ region: context.config.region,
119
+ use_dual_stack: context.config.use_dualstack_endpoint,
120
+ use_fips: context.config.use_fips_endpoint,
121
+ endpoint: endpoint,
122
+ )
123
+ end
124
+ end
125
+
126
+ class StartPipeline
127
+ def self.build(context)
128
+ unless context.config.regional_endpoint
129
+ endpoint = context.config.endpoint.to_s
130
+ end
131
+ Aws::OSIS::EndpointParameters.new(
132
+ region: context.config.region,
133
+ use_dual_stack: context.config.use_dualstack_endpoint,
134
+ use_fips: context.config.use_fips_endpoint,
135
+ endpoint: endpoint,
136
+ )
137
+ end
138
+ end
139
+
140
+ class StopPipeline
141
+ def self.build(context)
142
+ unless context.config.regional_endpoint
143
+ endpoint = context.config.endpoint.to_s
144
+ end
145
+ Aws::OSIS::EndpointParameters.new(
146
+ region: context.config.region,
147
+ use_dual_stack: context.config.use_dualstack_endpoint,
148
+ use_fips: context.config.use_fips_endpoint,
149
+ endpoint: endpoint,
150
+ )
151
+ end
152
+ end
153
+
154
+ class TagResource
155
+ def self.build(context)
156
+ unless context.config.regional_endpoint
157
+ endpoint = context.config.endpoint.to_s
158
+ end
159
+ Aws::OSIS::EndpointParameters.new(
160
+ region: context.config.region,
161
+ use_dual_stack: context.config.use_dualstack_endpoint,
162
+ use_fips: context.config.use_fips_endpoint,
163
+ endpoint: endpoint,
164
+ )
165
+ end
166
+ end
167
+
168
+ class UntagResource
169
+ def self.build(context)
170
+ unless context.config.regional_endpoint
171
+ endpoint = context.config.endpoint.to_s
172
+ end
173
+ Aws::OSIS::EndpointParameters.new(
174
+ region: context.config.region,
175
+ use_dual_stack: context.config.use_dualstack_endpoint,
176
+ use_fips: context.config.use_fips_endpoint,
177
+ endpoint: endpoint,
178
+ )
179
+ end
180
+ end
181
+
182
+ class UpdatePipeline
183
+ def self.build(context)
184
+ unless context.config.regional_endpoint
185
+ endpoint = context.config.endpoint.to_s
186
+ end
187
+ Aws::OSIS::EndpointParameters.new(
188
+ region: context.config.region,
189
+ use_dual_stack: context.config.use_dualstack_endpoint,
190
+ use_fips: context.config.use_fips_endpoint,
191
+ endpoint: endpoint,
192
+ )
193
+ end
194
+ end
195
+
196
+ class ValidatePipeline
197
+ def self.build(context)
198
+ unless context.config.regional_endpoint
199
+ endpoint = context.config.endpoint.to_s
200
+ end
201
+ Aws::OSIS::EndpointParameters.new(
202
+ region: context.config.region,
203
+ use_dual_stack: context.config.use_dualstack_endpoint,
204
+ use_fips: context.config.use_fips_endpoint,
205
+ endpoint: endpoint,
206
+ )
207
+ end
208
+ end
209
+
210
+ end
211
+ end
@@ -0,0 +1,126 @@
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::OSIS
11
+
12
+ # When OSIS returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::OSIS::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all OSIS errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::OSIS::Errors::ServiceError
20
+ # # rescues all OSIS 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
+ # * {InternalException}
33
+ # * {InvalidPaginationTokenException}
34
+ # * {LimitExceededException}
35
+ # * {ResourceAlreadyExistsException}
36
+ # * {ResourceNotFoundException}
37
+ # * {ValidationException}
38
+ #
39
+ # Additionally, error classes are dynamically generated for service errors based on the error code
40
+ # if they are not defined above.
41
+ module Errors
42
+
43
+ extend Aws::Errors::DynamicErrors
44
+
45
+ class AccessDeniedException < ServiceError
46
+
47
+ # @param [Seahorse::Client::RequestContext] context
48
+ # @param [String] message
49
+ # @param [Aws::OSIS::Types::AccessDeniedException] data
50
+ def initialize(context, message, data = Aws::EmptyStructure.new)
51
+ super(context, message, data)
52
+ end
53
+ end
54
+
55
+ class ConflictException < ServiceError
56
+
57
+ # @param [Seahorse::Client::RequestContext] context
58
+ # @param [String] message
59
+ # @param [Aws::OSIS::Types::ConflictException] data
60
+ def initialize(context, message, data = Aws::EmptyStructure.new)
61
+ super(context, message, data)
62
+ end
63
+ end
64
+
65
+ class InternalException < ServiceError
66
+
67
+ # @param [Seahorse::Client::RequestContext] context
68
+ # @param [String] message
69
+ # @param [Aws::OSIS::Types::InternalException] data
70
+ def initialize(context, message, data = Aws::EmptyStructure.new)
71
+ super(context, message, data)
72
+ end
73
+ end
74
+
75
+ class InvalidPaginationTokenException < ServiceError
76
+
77
+ # @param [Seahorse::Client::RequestContext] context
78
+ # @param [String] message
79
+ # @param [Aws::OSIS::Types::InvalidPaginationTokenException] data
80
+ def initialize(context, message, data = Aws::EmptyStructure.new)
81
+ super(context, message, data)
82
+ end
83
+ end
84
+
85
+ class LimitExceededException < ServiceError
86
+
87
+ # @param [Seahorse::Client::RequestContext] context
88
+ # @param [String] message
89
+ # @param [Aws::OSIS::Types::LimitExceededException] data
90
+ def initialize(context, message, data = Aws::EmptyStructure.new)
91
+ super(context, message, data)
92
+ end
93
+ end
94
+
95
+ class ResourceAlreadyExistsException < ServiceError
96
+
97
+ # @param [Seahorse::Client::RequestContext] context
98
+ # @param [String] message
99
+ # @param [Aws::OSIS::Types::ResourceAlreadyExistsException] data
100
+ def initialize(context, message, data = Aws::EmptyStructure.new)
101
+ super(context, message, data)
102
+ end
103
+ end
104
+
105
+ class ResourceNotFoundException < ServiceError
106
+
107
+ # @param [Seahorse::Client::RequestContext] context
108
+ # @param [String] message
109
+ # @param [Aws::OSIS::Types::ResourceNotFoundException] data
110
+ def initialize(context, message, data = Aws::EmptyStructure.new)
111
+ super(context, message, data)
112
+ end
113
+ end
114
+
115
+ class ValidationException < ServiceError
116
+
117
+ # @param [Seahorse::Client::RequestContext] context
118
+ # @param [String] message
119
+ # @param [Aws::OSIS::Types::ValidationException] data
120
+ def initialize(context, message, data = Aws::EmptyStructure.new)
121
+ super(context, message, data)
122
+ end
123
+ end
124
+
125
+ end
126
+ end
@@ -0,0 +1,96 @@
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::OSIS
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::OSIS::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::OSIS::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::OSIS::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
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
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :create_pipeline
60
+ Aws::OSIS::Endpoints::CreatePipeline.build(context)
61
+ when :delete_pipeline
62
+ Aws::OSIS::Endpoints::DeletePipeline.build(context)
63
+ when :get_pipeline
64
+ Aws::OSIS::Endpoints::GetPipeline.build(context)
65
+ when :get_pipeline_blueprint
66
+ Aws::OSIS::Endpoints::GetPipelineBlueprint.build(context)
67
+ when :get_pipeline_change_progress
68
+ Aws::OSIS::Endpoints::GetPipelineChangeProgress.build(context)
69
+ when :list_pipeline_blueprints
70
+ Aws::OSIS::Endpoints::ListPipelineBlueprints.build(context)
71
+ when :list_pipelines
72
+ Aws::OSIS::Endpoints::ListPipelines.build(context)
73
+ when :list_tags_for_resource
74
+ Aws::OSIS::Endpoints::ListTagsForResource.build(context)
75
+ when :start_pipeline
76
+ Aws::OSIS::Endpoints::StartPipeline.build(context)
77
+ when :stop_pipeline
78
+ Aws::OSIS::Endpoints::StopPipeline.build(context)
79
+ when :tag_resource
80
+ Aws::OSIS::Endpoints::TagResource.build(context)
81
+ when :untag_resource
82
+ Aws::OSIS::Endpoints::UntagResource.build(context)
83
+ when :update_pipeline
84
+ Aws::OSIS::Endpoints::UpdatePipeline.build(context)
85
+ when :validate_pipeline
86
+ Aws::OSIS::Endpoints::ValidatePipeline.build(context)
87
+ end
88
+ end
89
+ end
90
+
91
+ def add_handlers(handlers, _config)
92
+ handlers.add(Handler, step: :build, priority: 75)
93
+ end
94
+ end
95
+ end
96
+ 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::OSIS
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