aws-sdk-ssmquicksetup 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,184 @@
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::SSMQuickSetup
12
+ # @api private
13
+ module Endpoints
14
+
15
+ class CreateConfigurationManager
16
+ def self.build(context)
17
+ unless context.config.regional_endpoint
18
+ endpoint = context.config.endpoint.to_s
19
+ end
20
+ Aws::SSMQuickSetup::EndpointParameters.new(
21
+ region: context.config.region,
22
+ use_dual_stack: context.config.use_dualstack_endpoint,
23
+ use_fips: context.config.use_fips_endpoint,
24
+ endpoint: endpoint,
25
+ )
26
+ end
27
+ end
28
+
29
+ class DeleteConfigurationManager
30
+ def self.build(context)
31
+ unless context.config.regional_endpoint
32
+ endpoint = context.config.endpoint.to_s
33
+ end
34
+ Aws::SSMQuickSetup::EndpointParameters.new(
35
+ region: context.config.region,
36
+ use_dual_stack: context.config.use_dualstack_endpoint,
37
+ use_fips: context.config.use_fips_endpoint,
38
+ endpoint: endpoint,
39
+ )
40
+ end
41
+ end
42
+
43
+ class GetConfigurationManager
44
+ def self.build(context)
45
+ unless context.config.regional_endpoint
46
+ endpoint = context.config.endpoint.to_s
47
+ end
48
+ Aws::SSMQuickSetup::EndpointParameters.new(
49
+ region: context.config.region,
50
+ use_dual_stack: context.config.use_dualstack_endpoint,
51
+ use_fips: context.config.use_fips_endpoint,
52
+ endpoint: endpoint,
53
+ )
54
+ end
55
+ end
56
+
57
+ class GetServiceSettings
58
+ def self.build(context)
59
+ unless context.config.regional_endpoint
60
+ endpoint = context.config.endpoint.to_s
61
+ end
62
+ Aws::SSMQuickSetup::EndpointParameters.new(
63
+ region: context.config.region,
64
+ use_dual_stack: context.config.use_dualstack_endpoint,
65
+ use_fips: context.config.use_fips_endpoint,
66
+ endpoint: endpoint,
67
+ )
68
+ end
69
+ end
70
+
71
+ class ListConfigurationManagers
72
+ def self.build(context)
73
+ unless context.config.regional_endpoint
74
+ endpoint = context.config.endpoint.to_s
75
+ end
76
+ Aws::SSMQuickSetup::EndpointParameters.new(
77
+ region: context.config.region,
78
+ use_dual_stack: context.config.use_dualstack_endpoint,
79
+ use_fips: context.config.use_fips_endpoint,
80
+ endpoint: endpoint,
81
+ )
82
+ end
83
+ end
84
+
85
+ class ListQuickSetupTypes
86
+ def self.build(context)
87
+ unless context.config.regional_endpoint
88
+ endpoint = context.config.endpoint.to_s
89
+ end
90
+ Aws::SSMQuickSetup::EndpointParameters.new(
91
+ region: context.config.region,
92
+ use_dual_stack: context.config.use_dualstack_endpoint,
93
+ use_fips: context.config.use_fips_endpoint,
94
+ endpoint: endpoint,
95
+ )
96
+ end
97
+ end
98
+
99
+ class ListTagsForResource
100
+ def self.build(context)
101
+ unless context.config.regional_endpoint
102
+ endpoint = context.config.endpoint.to_s
103
+ end
104
+ Aws::SSMQuickSetup::EndpointParameters.new(
105
+ region: context.config.region,
106
+ use_dual_stack: context.config.use_dualstack_endpoint,
107
+ use_fips: context.config.use_fips_endpoint,
108
+ endpoint: endpoint,
109
+ )
110
+ end
111
+ end
112
+
113
+ class TagResource
114
+ def self.build(context)
115
+ unless context.config.regional_endpoint
116
+ endpoint = context.config.endpoint.to_s
117
+ end
118
+ Aws::SSMQuickSetup::EndpointParameters.new(
119
+ region: context.config.region,
120
+ use_dual_stack: context.config.use_dualstack_endpoint,
121
+ use_fips: context.config.use_fips_endpoint,
122
+ endpoint: endpoint,
123
+ )
124
+ end
125
+ end
126
+
127
+ class UntagResource
128
+ def self.build(context)
129
+ unless context.config.regional_endpoint
130
+ endpoint = context.config.endpoint.to_s
131
+ end
132
+ Aws::SSMQuickSetup::EndpointParameters.new(
133
+ region: context.config.region,
134
+ use_dual_stack: context.config.use_dualstack_endpoint,
135
+ use_fips: context.config.use_fips_endpoint,
136
+ endpoint: endpoint,
137
+ )
138
+ end
139
+ end
140
+
141
+ class UpdateConfigurationDefinition
142
+ def self.build(context)
143
+ unless context.config.regional_endpoint
144
+ endpoint = context.config.endpoint.to_s
145
+ end
146
+ Aws::SSMQuickSetup::EndpointParameters.new(
147
+ region: context.config.region,
148
+ use_dual_stack: context.config.use_dualstack_endpoint,
149
+ use_fips: context.config.use_fips_endpoint,
150
+ endpoint: endpoint,
151
+ )
152
+ end
153
+ end
154
+
155
+ class UpdateConfigurationManager
156
+ def self.build(context)
157
+ unless context.config.regional_endpoint
158
+ endpoint = context.config.endpoint.to_s
159
+ end
160
+ Aws::SSMQuickSetup::EndpointParameters.new(
161
+ region: context.config.region,
162
+ use_dual_stack: context.config.use_dualstack_endpoint,
163
+ use_fips: context.config.use_fips_endpoint,
164
+ endpoint: endpoint,
165
+ )
166
+ end
167
+ end
168
+
169
+ class UpdateServiceSettings
170
+ def self.build(context)
171
+ unless context.config.regional_endpoint
172
+ endpoint = context.config.endpoint.to_s
173
+ end
174
+ Aws::SSMQuickSetup::EndpointParameters.new(
175
+ region: context.config.region,
176
+ use_dual_stack: context.config.use_dualstack_endpoint,
177
+ use_fips: context.config.use_fips_endpoint,
178
+ endpoint: endpoint,
179
+ )
180
+ end
181
+ end
182
+
183
+ end
184
+ end
@@ -0,0 +1,142 @@
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::SSMQuickSetup
11
+
12
+ # When SSMQuickSetup returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::SSMQuickSetup::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all SSMQuickSetup errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::SSMQuickSetup::Errors::ServiceError
20
+ # # rescues all SSMQuickSetup 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
+ # * {InternalServerException}
33
+ # * {ResourceNotFoundException}
34
+ # * {ThrottlingException}
35
+ # * {ValidationException}
36
+ #
37
+ # Additionally, error classes are dynamically generated for service errors based on the error code
38
+ # if they are not defined above.
39
+ module Errors
40
+
41
+ extend Aws::Errors::DynamicErrors
42
+
43
+ class AccessDeniedException < ServiceError
44
+
45
+ # @param [Seahorse::Client::RequestContext] context
46
+ # @param [String] message
47
+ # @param [Aws::SSMQuickSetup::Types::AccessDeniedException] data
48
+ def initialize(context, message, data = Aws::EmptyStructure.new)
49
+ super(context, message, data)
50
+ end
51
+
52
+ # @return [String]
53
+ def message
54
+ @message || @data[:message]
55
+ end
56
+ end
57
+
58
+ class ConflictException < ServiceError
59
+
60
+ # @param [Seahorse::Client::RequestContext] context
61
+ # @param [String] message
62
+ # @param [Aws::SSMQuickSetup::Types::ConflictException] 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 InternalServerException < ServiceError
74
+
75
+ # @param [Seahorse::Client::RequestContext] context
76
+ # @param [String] message
77
+ # @param [Aws::SSMQuickSetup::Types::InternalServerException] 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
+
87
+ def retryable?
88
+ true
89
+ end
90
+ end
91
+
92
+ class ResourceNotFoundException < ServiceError
93
+
94
+ # @param [Seahorse::Client::RequestContext] context
95
+ # @param [String] message
96
+ # @param [Aws::SSMQuickSetup::Types::ResourceNotFoundException] data
97
+ def initialize(context, message, data = Aws::EmptyStructure.new)
98
+ super(context, message, data)
99
+ end
100
+
101
+ # @return [String]
102
+ def message
103
+ @message || @data[:message]
104
+ end
105
+ end
106
+
107
+ class ThrottlingException < ServiceError
108
+
109
+ # @param [Seahorse::Client::RequestContext] context
110
+ # @param [String] message
111
+ # @param [Aws::SSMQuickSetup::Types::ThrottlingException] data
112
+ def initialize(context, message, data = Aws::EmptyStructure.new)
113
+ super(context, message, data)
114
+ end
115
+
116
+ # @return [String]
117
+ def message
118
+ @message || @data[:message]
119
+ end
120
+
121
+ def retryable?
122
+ true
123
+ end
124
+ end
125
+
126
+ class ValidationException < ServiceError
127
+
128
+ # @param [Seahorse::Client::RequestContext] context
129
+ # @param [String] message
130
+ # @param [Aws::SSMQuickSetup::Types::ValidationException] data
131
+ def initialize(context, message, data = Aws::EmptyStructure.new)
132
+ super(context, message, data)
133
+ end
134
+
135
+ # @return [String]
136
+ def message
137
+ @message || @data[:message]
138
+ end
139
+ end
140
+
141
+ end
142
+ end
@@ -0,0 +1,94 @@
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::SSMQuickSetup
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::SSMQuickSetup::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::SSMQuickSetup::EndpointParameters`'
22
+ ) do |cfg|
23
+ Aws::SSMQuickSetup::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_configuration_manager
62
+ Aws::SSMQuickSetup::Endpoints::CreateConfigurationManager.build(context)
63
+ when :delete_configuration_manager
64
+ Aws::SSMQuickSetup::Endpoints::DeleteConfigurationManager.build(context)
65
+ when :get_configuration_manager
66
+ Aws::SSMQuickSetup::Endpoints::GetConfigurationManager.build(context)
67
+ when :get_service_settings
68
+ Aws::SSMQuickSetup::Endpoints::GetServiceSettings.build(context)
69
+ when :list_configuration_managers
70
+ Aws::SSMQuickSetup::Endpoints::ListConfigurationManagers.build(context)
71
+ when :list_quick_setup_types
72
+ Aws::SSMQuickSetup::Endpoints::ListQuickSetupTypes.build(context)
73
+ when :list_tags_for_resource
74
+ Aws::SSMQuickSetup::Endpoints::ListTagsForResource.build(context)
75
+ when :tag_resource
76
+ Aws::SSMQuickSetup::Endpoints::TagResource.build(context)
77
+ when :untag_resource
78
+ Aws::SSMQuickSetup::Endpoints::UntagResource.build(context)
79
+ when :update_configuration_definition
80
+ Aws::SSMQuickSetup::Endpoints::UpdateConfigurationDefinition.build(context)
81
+ when :update_configuration_manager
82
+ Aws::SSMQuickSetup::Endpoints::UpdateConfigurationManager.build(context)
83
+ when :update_service_settings
84
+ Aws::SSMQuickSetup::Endpoints::UpdateServiceSettings.build(context)
85
+ end
86
+ end
87
+ end
88
+
89
+ def add_handlers(handlers, _config)
90
+ handlers.add(Handler, step: :build, priority: 75)
91
+ end
92
+ end
93
+ end
94
+ 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::SSMQuickSetup
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