aws-sdk-cleanrooms 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,200 @@
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::CleanRooms
11
+
12
+ # When CleanRooms returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::CleanRooms::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all CleanRooms errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::CleanRooms::Errors::ServiceError
20
+ # # rescues all CleanRooms 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
+ # * {ServiceQuotaExceededException}
35
+ # * {ThrottlingException}
36
+ # * {ValidationException}
37
+ #
38
+ # Additionally, error classes are dynamically generated for service errors based on the error code
39
+ # if they are not defined above.
40
+ module Errors
41
+
42
+ extend Aws::Errors::DynamicErrors
43
+
44
+ class AccessDeniedException < ServiceError
45
+
46
+ # @param [Seahorse::Client::RequestContext] context
47
+ # @param [String] message
48
+ # @param [Aws::CleanRooms::Types::AccessDeniedException] data
49
+ def initialize(context, message, data = Aws::EmptyStructure.new)
50
+ super(context, message, data)
51
+ end
52
+
53
+ # @return [String]
54
+ def message
55
+ @message || @data[:message]
56
+ end
57
+
58
+ # @return [String]
59
+ def reason
60
+ @data[:reason]
61
+ end
62
+ end
63
+
64
+ class ConflictException < ServiceError
65
+
66
+ # @param [Seahorse::Client::RequestContext] context
67
+ # @param [String] message
68
+ # @param [Aws::CleanRooms::Types::ConflictException] data
69
+ def initialize(context, message, data = Aws::EmptyStructure.new)
70
+ super(context, message, data)
71
+ end
72
+
73
+ # @return [String]
74
+ def message
75
+ @message || @data[:message]
76
+ end
77
+
78
+ # @return [String]
79
+ def resource_id
80
+ @data[:resource_id]
81
+ end
82
+
83
+ # @return [String]
84
+ def resource_type
85
+ @data[:resource_type]
86
+ end
87
+
88
+ # @return [String]
89
+ def reason
90
+ @data[:reason]
91
+ end
92
+ end
93
+
94
+ class InternalServerException < ServiceError
95
+
96
+ # @param [Seahorse::Client::RequestContext] context
97
+ # @param [String] message
98
+ # @param [Aws::CleanRooms::Types::InternalServerException] data
99
+ def initialize(context, message, data = Aws::EmptyStructure.new)
100
+ super(context, message, data)
101
+ end
102
+
103
+ # @return [String]
104
+ def message
105
+ @message || @data[:message]
106
+ end
107
+ end
108
+
109
+ class ResourceNotFoundException < ServiceError
110
+
111
+ # @param [Seahorse::Client::RequestContext] context
112
+ # @param [String] message
113
+ # @param [Aws::CleanRooms::Types::ResourceNotFoundException] data
114
+ def initialize(context, message, data = Aws::EmptyStructure.new)
115
+ super(context, message, data)
116
+ end
117
+
118
+ # @return [String]
119
+ def message
120
+ @message || @data[:message]
121
+ end
122
+
123
+ # @return [String]
124
+ def resource_id
125
+ @data[:resource_id]
126
+ end
127
+
128
+ # @return [String]
129
+ def resource_type
130
+ @data[:resource_type]
131
+ end
132
+ end
133
+
134
+ class ServiceQuotaExceededException < ServiceError
135
+
136
+ # @param [Seahorse::Client::RequestContext] context
137
+ # @param [String] message
138
+ # @param [Aws::CleanRooms::Types::ServiceQuotaExceededException] data
139
+ def initialize(context, message, data = Aws::EmptyStructure.new)
140
+ super(context, message, data)
141
+ end
142
+
143
+ # @return [String]
144
+ def message
145
+ @message || @data[:message]
146
+ end
147
+
148
+ # @return [String]
149
+ def quota_name
150
+ @data[:quota_name]
151
+ end
152
+
153
+ # @return [String]
154
+ def quota_value
155
+ @data[:quota_value]
156
+ end
157
+ end
158
+
159
+ class ThrottlingException < ServiceError
160
+
161
+ # @param [Seahorse::Client::RequestContext] context
162
+ # @param [String] message
163
+ # @param [Aws::CleanRooms::Types::ThrottlingException] 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 ValidationException < ServiceError
175
+
176
+ # @param [Seahorse::Client::RequestContext] context
177
+ # @param [String] message
178
+ # @param [Aws::CleanRooms::Types::ValidationException] 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
+
188
+ # @return [String]
189
+ def reason
190
+ @data[:reason]
191
+ end
192
+
193
+ # @return [String]
194
+ def field_list
195
+ @data[:field_list]
196
+ end
197
+ end
198
+
199
+ end
200
+ end
@@ -0,0 +1,136 @@
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::CleanRooms
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::CleanRooms::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::CleanRooms::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::CleanRooms::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 :batch_get_schema
60
+ Aws::CleanRooms::Endpoints::BatchGetSchema.build(context)
61
+ when :create_collaboration
62
+ Aws::CleanRooms::Endpoints::CreateCollaboration.build(context)
63
+ when :create_configured_table
64
+ Aws::CleanRooms::Endpoints::CreateConfiguredTable.build(context)
65
+ when :create_configured_table_analysis_rule
66
+ Aws::CleanRooms::Endpoints::CreateConfiguredTableAnalysisRule.build(context)
67
+ when :create_configured_table_association
68
+ Aws::CleanRooms::Endpoints::CreateConfiguredTableAssociation.build(context)
69
+ when :create_membership
70
+ Aws::CleanRooms::Endpoints::CreateMembership.build(context)
71
+ when :delete_collaboration
72
+ Aws::CleanRooms::Endpoints::DeleteCollaboration.build(context)
73
+ when :delete_configured_table
74
+ Aws::CleanRooms::Endpoints::DeleteConfiguredTable.build(context)
75
+ when :delete_configured_table_analysis_rule
76
+ Aws::CleanRooms::Endpoints::DeleteConfiguredTableAnalysisRule.build(context)
77
+ when :delete_configured_table_association
78
+ Aws::CleanRooms::Endpoints::DeleteConfiguredTableAssociation.build(context)
79
+ when :delete_member
80
+ Aws::CleanRooms::Endpoints::DeleteMember.build(context)
81
+ when :delete_membership
82
+ Aws::CleanRooms::Endpoints::DeleteMembership.build(context)
83
+ when :get_collaboration
84
+ Aws::CleanRooms::Endpoints::GetCollaboration.build(context)
85
+ when :get_configured_table
86
+ Aws::CleanRooms::Endpoints::GetConfiguredTable.build(context)
87
+ when :get_configured_table_analysis_rule
88
+ Aws::CleanRooms::Endpoints::GetConfiguredTableAnalysisRule.build(context)
89
+ when :get_configured_table_association
90
+ Aws::CleanRooms::Endpoints::GetConfiguredTableAssociation.build(context)
91
+ when :get_membership
92
+ Aws::CleanRooms::Endpoints::GetMembership.build(context)
93
+ when :get_protected_query
94
+ Aws::CleanRooms::Endpoints::GetProtectedQuery.build(context)
95
+ when :get_schema
96
+ Aws::CleanRooms::Endpoints::GetSchema.build(context)
97
+ when :get_schema_analysis_rule
98
+ Aws::CleanRooms::Endpoints::GetSchemaAnalysisRule.build(context)
99
+ when :list_collaborations
100
+ Aws::CleanRooms::Endpoints::ListCollaborations.build(context)
101
+ when :list_configured_table_associations
102
+ Aws::CleanRooms::Endpoints::ListConfiguredTableAssociations.build(context)
103
+ when :list_configured_tables
104
+ Aws::CleanRooms::Endpoints::ListConfiguredTables.build(context)
105
+ when :list_members
106
+ Aws::CleanRooms::Endpoints::ListMembers.build(context)
107
+ when :list_memberships
108
+ Aws::CleanRooms::Endpoints::ListMemberships.build(context)
109
+ when :list_protected_queries
110
+ Aws::CleanRooms::Endpoints::ListProtectedQueries.build(context)
111
+ when :list_schemas
112
+ Aws::CleanRooms::Endpoints::ListSchemas.build(context)
113
+ when :start_protected_query
114
+ Aws::CleanRooms::Endpoints::StartProtectedQuery.build(context)
115
+ when :update_collaboration
116
+ Aws::CleanRooms::Endpoints::UpdateCollaboration.build(context)
117
+ when :update_configured_table
118
+ Aws::CleanRooms::Endpoints::UpdateConfiguredTable.build(context)
119
+ when :update_configured_table_analysis_rule
120
+ Aws::CleanRooms::Endpoints::UpdateConfiguredTableAnalysisRule.build(context)
121
+ when :update_configured_table_association
122
+ Aws::CleanRooms::Endpoints::UpdateConfiguredTableAssociation.build(context)
123
+ when :update_membership
124
+ Aws::CleanRooms::Endpoints::UpdateMembership.build(context)
125
+ when :update_protected_query
126
+ Aws::CleanRooms::Endpoints::UpdateProtectedQuery.build(context)
127
+ end
128
+ end
129
+ end
130
+
131
+ def add_handlers(handlers, _config)
132
+ handlers.add(Handler, step: :build, priority: 75)
133
+ end
134
+ end
135
+ end
136
+ 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::CleanRooms
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