aws-sdk-lakeformation 1.20.0 → 1.42.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,7 @@ module Aws::LakeFormation
36
36
  # * {InternalServiceException}
37
37
  # * {InvalidInputException}
38
38
  # * {OperationTimeoutException}
39
+ # * {PermissionTypeMismatchException}
39
40
  # * {ResourceNotReadyException}
40
41
  # * {ResourceNumberLimitExceededException}
41
42
  # * {StatisticsNotReadyYetException}
@@ -186,6 +187,21 @@ module Aws::LakeFormation
186
187
  end
187
188
  end
188
189
 
190
+ class PermissionTypeMismatchException < ServiceError
191
+
192
+ # @param [Seahorse::Client::RequestContext] context
193
+ # @param [String] message
194
+ # @param [Aws::LakeFormation::Types::PermissionTypeMismatchException] data
195
+ def initialize(context, message, data = Aws::EmptyStructure.new)
196
+ super(context, message, data)
197
+ end
198
+
199
+ # @return [String]
200
+ def message
201
+ @message || @data[:message]
202
+ end
203
+ end
204
+
189
205
  class ResourceNotReadyException < ServiceError
190
206
 
191
207
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,168 @@
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::LakeFormation
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::LakeFormation::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::LakeFormation::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::LakeFormation::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 :add_lf_tags_to_resource
60
+ Aws::LakeFormation::Endpoints::AddLFTagsToResource.build(context)
61
+ when :assume_decorated_role_with_saml
62
+ Aws::LakeFormation::Endpoints::AssumeDecoratedRoleWithSAML.build(context)
63
+ when :batch_grant_permissions
64
+ Aws::LakeFormation::Endpoints::BatchGrantPermissions.build(context)
65
+ when :batch_revoke_permissions
66
+ Aws::LakeFormation::Endpoints::BatchRevokePermissions.build(context)
67
+ when :cancel_transaction
68
+ Aws::LakeFormation::Endpoints::CancelTransaction.build(context)
69
+ when :commit_transaction
70
+ Aws::LakeFormation::Endpoints::CommitTransaction.build(context)
71
+ when :create_data_cells_filter
72
+ Aws::LakeFormation::Endpoints::CreateDataCellsFilter.build(context)
73
+ when :create_lf_tag
74
+ Aws::LakeFormation::Endpoints::CreateLFTag.build(context)
75
+ when :create_lake_formation_opt_in
76
+ Aws::LakeFormation::Endpoints::CreateLakeFormationOptIn.build(context)
77
+ when :delete_data_cells_filter
78
+ Aws::LakeFormation::Endpoints::DeleteDataCellsFilter.build(context)
79
+ when :delete_lf_tag
80
+ Aws::LakeFormation::Endpoints::DeleteLFTag.build(context)
81
+ when :delete_lake_formation_opt_in
82
+ Aws::LakeFormation::Endpoints::DeleteLakeFormationOptIn.build(context)
83
+ when :delete_objects_on_cancel
84
+ Aws::LakeFormation::Endpoints::DeleteObjectsOnCancel.build(context)
85
+ when :deregister_resource
86
+ Aws::LakeFormation::Endpoints::DeregisterResource.build(context)
87
+ when :describe_resource
88
+ Aws::LakeFormation::Endpoints::DescribeResource.build(context)
89
+ when :describe_transaction
90
+ Aws::LakeFormation::Endpoints::DescribeTransaction.build(context)
91
+ when :extend_transaction
92
+ Aws::LakeFormation::Endpoints::ExtendTransaction.build(context)
93
+ when :get_data_cells_filter
94
+ Aws::LakeFormation::Endpoints::GetDataCellsFilter.build(context)
95
+ when :get_data_lake_settings
96
+ Aws::LakeFormation::Endpoints::GetDataLakeSettings.build(context)
97
+ when :get_effective_permissions_for_path
98
+ Aws::LakeFormation::Endpoints::GetEffectivePermissionsForPath.build(context)
99
+ when :get_lf_tag
100
+ Aws::LakeFormation::Endpoints::GetLFTag.build(context)
101
+ when :get_query_state
102
+ Aws::LakeFormation::Endpoints::GetQueryState.build(context)
103
+ when :get_query_statistics
104
+ Aws::LakeFormation::Endpoints::GetQueryStatistics.build(context)
105
+ when :get_resource_lf_tags
106
+ Aws::LakeFormation::Endpoints::GetResourceLFTags.build(context)
107
+ when :get_table_objects
108
+ Aws::LakeFormation::Endpoints::GetTableObjects.build(context)
109
+ when :get_temporary_glue_partition_credentials
110
+ Aws::LakeFormation::Endpoints::GetTemporaryGluePartitionCredentials.build(context)
111
+ when :get_temporary_glue_table_credentials
112
+ Aws::LakeFormation::Endpoints::GetTemporaryGlueTableCredentials.build(context)
113
+ when :get_work_unit_results
114
+ Aws::LakeFormation::Endpoints::GetWorkUnitResults.build(context)
115
+ when :get_work_units
116
+ Aws::LakeFormation::Endpoints::GetWorkUnits.build(context)
117
+ when :grant_permissions
118
+ Aws::LakeFormation::Endpoints::GrantPermissions.build(context)
119
+ when :list_data_cells_filter
120
+ Aws::LakeFormation::Endpoints::ListDataCellsFilter.build(context)
121
+ when :list_lf_tags
122
+ Aws::LakeFormation::Endpoints::ListLFTags.build(context)
123
+ when :list_lake_formation_opt_ins
124
+ Aws::LakeFormation::Endpoints::ListLakeFormationOptIns.build(context)
125
+ when :list_permissions
126
+ Aws::LakeFormation::Endpoints::ListPermissions.build(context)
127
+ when :list_resources
128
+ Aws::LakeFormation::Endpoints::ListResources.build(context)
129
+ when :list_table_storage_optimizers
130
+ Aws::LakeFormation::Endpoints::ListTableStorageOptimizers.build(context)
131
+ when :list_transactions
132
+ Aws::LakeFormation::Endpoints::ListTransactions.build(context)
133
+ when :put_data_lake_settings
134
+ Aws::LakeFormation::Endpoints::PutDataLakeSettings.build(context)
135
+ when :register_resource
136
+ Aws::LakeFormation::Endpoints::RegisterResource.build(context)
137
+ when :remove_lf_tags_from_resource
138
+ Aws::LakeFormation::Endpoints::RemoveLFTagsFromResource.build(context)
139
+ when :revoke_permissions
140
+ Aws::LakeFormation::Endpoints::RevokePermissions.build(context)
141
+ when :search_databases_by_lf_tags
142
+ Aws::LakeFormation::Endpoints::SearchDatabasesByLFTags.build(context)
143
+ when :search_tables_by_lf_tags
144
+ Aws::LakeFormation::Endpoints::SearchTablesByLFTags.build(context)
145
+ when :start_query_planning
146
+ Aws::LakeFormation::Endpoints::StartQueryPlanning.build(context)
147
+ when :start_transaction
148
+ Aws::LakeFormation::Endpoints::StartTransaction.build(context)
149
+ when :update_data_cells_filter
150
+ Aws::LakeFormation::Endpoints::UpdateDataCellsFilter.build(context)
151
+ when :update_lf_tag
152
+ Aws::LakeFormation::Endpoints::UpdateLFTag.build(context)
153
+ when :update_resource
154
+ Aws::LakeFormation::Endpoints::UpdateResource.build(context)
155
+ when :update_table_objects
156
+ Aws::LakeFormation::Endpoints::UpdateTableObjects.build(context)
157
+ when :update_table_storage_optimizer
158
+ Aws::LakeFormation::Endpoints::UpdateTableStorageOptimizer.build(context)
159
+ end
160
+ end
161
+ end
162
+
163
+ def add_handlers(handlers, _config)
164
+ handlers.add(Handler, step: :build, priority: 75)
165
+ end
166
+ end
167
+ end
168
+ end