feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
add_project(aws-cpp-sdk-lakeformation "C++ SDK for the AWS lakeformation service" aws-cpp-sdk-core)
file(GLOB AWS_LAKEFORMATION_HEADERS
"include/aws/lakeformation/*.h"
)
file(GLOB AWS_LAKEFORMATION_MODEL_HEADERS
"include/aws/lakeformation/model/*.h"
)
file(GLOB AWS_LAKEFORMATION_SOURCE
"source/*.cpp"
)
file(GLOB AWS_LAKEFORMATION_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB LAKEFORMATION_UNIFIED_HEADERS
${AWS_LAKEFORMATION_HEADERS}
${AWS_LAKEFORMATION_MODEL_HEADERS}
)
file(GLOB LAKEFORMATION_UNITY_SRC
${AWS_LAKEFORMATION_SOURCE}
${AWS_LAKEFORMATION_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("LAKEFORMATION" LAKEFORMATION_UNITY_SRC)
endif()
file(GLOB LAKEFORMATION_SRC
${LAKEFORMATION_UNIFIED_HEADERS}
${LAKEFORMATION_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\lakeformation" FILES ${AWS_LAKEFORMATION_HEADERS})
source_group("Header Files\\aws\\lakeformation\\model" FILES ${AWS_LAKEFORMATION_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_LAKEFORMATION_SOURCE})
source_group("Source Files\\model" FILES ${AWS_LAKEFORMATION_MODEL_SOURCE})
endif(MSVC)
endif()
set(LAKEFORMATION_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${LAKEFORMATION_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAKEFORMATION_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_LAKEFORMATION_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/lakeformation)
install (FILES ${AWS_LAKEFORMATION_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/lakeformation/model)
do_packaging()

View File

@@ -0,0 +1,637 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/lakeformation/model/BatchGrantPermissionsResult.h>
#include <aws/lakeformation/model/BatchRevokePermissionsResult.h>
#include <aws/lakeformation/model/DeregisterResourceResult.h>
#include <aws/lakeformation/model/DescribeResourceResult.h>
#include <aws/lakeformation/model/GetDataLakeSettingsResult.h>
#include <aws/lakeformation/model/GetEffectivePermissionsForPathResult.h>
#include <aws/lakeformation/model/GrantPermissionsResult.h>
#include <aws/lakeformation/model/ListPermissionsResult.h>
#include <aws/lakeformation/model/ListResourcesResult.h>
#include <aws/lakeformation/model/PutDataLakeSettingsResult.h>
#include <aws/lakeformation/model/RegisterResourceResult.h>
#include <aws/lakeformation/model/RevokePermissionsResult.h>
#include <aws/lakeformation/model/UpdateResourceResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace LakeFormation
{
namespace Model
{
class BatchGrantPermissionsRequest;
class BatchRevokePermissionsRequest;
class DeregisterResourceRequest;
class DescribeResourceRequest;
class GetDataLakeSettingsRequest;
class GetEffectivePermissionsForPathRequest;
class GrantPermissionsRequest;
class ListPermissionsRequest;
class ListResourcesRequest;
class PutDataLakeSettingsRequest;
class RegisterResourceRequest;
class RevokePermissionsRequest;
class UpdateResourceRequest;
typedef Aws::Utils::Outcome<BatchGrantPermissionsResult, LakeFormationError> BatchGrantPermissionsOutcome;
typedef Aws::Utils::Outcome<BatchRevokePermissionsResult, LakeFormationError> BatchRevokePermissionsOutcome;
typedef Aws::Utils::Outcome<DeregisterResourceResult, LakeFormationError> DeregisterResourceOutcome;
typedef Aws::Utils::Outcome<DescribeResourceResult, LakeFormationError> DescribeResourceOutcome;
typedef Aws::Utils::Outcome<GetDataLakeSettingsResult, LakeFormationError> GetDataLakeSettingsOutcome;
typedef Aws::Utils::Outcome<GetEffectivePermissionsForPathResult, LakeFormationError> GetEffectivePermissionsForPathOutcome;
typedef Aws::Utils::Outcome<GrantPermissionsResult, LakeFormationError> GrantPermissionsOutcome;
typedef Aws::Utils::Outcome<ListPermissionsResult, LakeFormationError> ListPermissionsOutcome;
typedef Aws::Utils::Outcome<ListResourcesResult, LakeFormationError> ListResourcesOutcome;
typedef Aws::Utils::Outcome<PutDataLakeSettingsResult, LakeFormationError> PutDataLakeSettingsOutcome;
typedef Aws::Utils::Outcome<RegisterResourceResult, LakeFormationError> RegisterResourceOutcome;
typedef Aws::Utils::Outcome<RevokePermissionsResult, LakeFormationError> RevokePermissionsOutcome;
typedef Aws::Utils::Outcome<UpdateResourceResult, LakeFormationError> UpdateResourceOutcome;
typedef std::future<BatchGrantPermissionsOutcome> BatchGrantPermissionsOutcomeCallable;
typedef std::future<BatchRevokePermissionsOutcome> BatchRevokePermissionsOutcomeCallable;
typedef std::future<DeregisterResourceOutcome> DeregisterResourceOutcomeCallable;
typedef std::future<DescribeResourceOutcome> DescribeResourceOutcomeCallable;
typedef std::future<GetDataLakeSettingsOutcome> GetDataLakeSettingsOutcomeCallable;
typedef std::future<GetEffectivePermissionsForPathOutcome> GetEffectivePermissionsForPathOutcomeCallable;
typedef std::future<GrantPermissionsOutcome> GrantPermissionsOutcomeCallable;
typedef std::future<ListPermissionsOutcome> ListPermissionsOutcomeCallable;
typedef std::future<ListResourcesOutcome> ListResourcesOutcomeCallable;
typedef std::future<PutDataLakeSettingsOutcome> PutDataLakeSettingsOutcomeCallable;
typedef std::future<RegisterResourceOutcome> RegisterResourceOutcomeCallable;
typedef std::future<RevokePermissionsOutcome> RevokePermissionsOutcomeCallable;
typedef std::future<UpdateResourceOutcome> UpdateResourceOutcomeCallable;
} // namespace Model
class LakeFormationClient;
typedef std::function<void(const LakeFormationClient*, const Model::BatchGrantPermissionsRequest&, const Model::BatchGrantPermissionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BatchGrantPermissionsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::BatchRevokePermissionsRequest&, const Model::BatchRevokePermissionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BatchRevokePermissionsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::DeregisterResourceRequest&, const Model::DeregisterResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeregisterResourceResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::DescribeResourceRequest&, const Model::DescribeResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeResourceResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::GetDataLakeSettingsRequest&, const Model::GetDataLakeSettingsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetDataLakeSettingsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::GetEffectivePermissionsForPathRequest&, const Model::GetEffectivePermissionsForPathOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetEffectivePermissionsForPathResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::GrantPermissionsRequest&, const Model::GrantPermissionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GrantPermissionsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::ListPermissionsRequest&, const Model::ListPermissionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPermissionsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::ListResourcesRequest&, const Model::ListResourcesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListResourcesResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::PutDataLakeSettingsRequest&, const Model::PutDataLakeSettingsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutDataLakeSettingsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::RegisterResourceRequest&, const Model::RegisterResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RegisterResourceResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::RevokePermissionsRequest&, const Model::RevokePermissionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RevokePermissionsResponseReceivedHandler;
typedef std::function<void(const LakeFormationClient*, const Model::UpdateResourceRequest&, const Model::UpdateResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateResourceResponseReceivedHandler;
/**
* <fullname>AWS Lake Formation</fullname> <p>Defines the public endpoint for the
* AWS Lake Formation service.</p>
*/
class AWS_LAKEFORMATION_API LakeFormationClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
LakeFormationClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
LakeFormationClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
LakeFormationClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~LakeFormationClient();
/**
* <p>Batch operation to grant permissions to the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchGrantPermissions">AWS
* API Reference</a></p>
*/
virtual Model::BatchGrantPermissionsOutcome BatchGrantPermissions(const Model::BatchGrantPermissionsRequest& request) const;
/**
* <p>Batch operation to grant permissions to the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchGrantPermissions">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::BatchGrantPermissionsOutcomeCallable BatchGrantPermissionsCallable(const Model::BatchGrantPermissionsRequest& request) const;
/**
* <p>Batch operation to grant permissions to the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchGrantPermissions">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void BatchGrantPermissionsAsync(const Model::BatchGrantPermissionsRequest& request, const BatchGrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Batch operation to revoke permissions from the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchRevokePermissions">AWS
* API Reference</a></p>
*/
virtual Model::BatchRevokePermissionsOutcome BatchRevokePermissions(const Model::BatchRevokePermissionsRequest& request) const;
/**
* <p>Batch operation to revoke permissions from the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchRevokePermissions">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::BatchRevokePermissionsOutcomeCallable BatchRevokePermissionsCallable(const Model::BatchRevokePermissionsRequest& request) const;
/**
* <p>Batch operation to revoke permissions from the principal.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchRevokePermissions">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void BatchRevokePermissionsAsync(const Model::BatchRevokePermissionsRequest& request, const BatchRevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deregisters the resource as managed by the Data Catalog.</p> <p>When you
* deregister a path, Lake Formation removes the path from the inline policy
* attached to your service-linked role.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DeregisterResource">AWS
* API Reference</a></p>
*/
virtual Model::DeregisterResourceOutcome DeregisterResource(const Model::DeregisterResourceRequest& request) const;
/**
* <p>Deregisters the resource as managed by the Data Catalog.</p> <p>When you
* deregister a path, Lake Formation removes the path from the inline policy
* attached to your service-linked role.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DeregisterResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeregisterResourceOutcomeCallable DeregisterResourceCallable(const Model::DeregisterResourceRequest& request) const;
/**
* <p>Deregisters the resource as managed by the Data Catalog.</p> <p>When you
* deregister a path, Lake Formation removes the path from the inline policy
* attached to your service-linked role.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DeregisterResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeregisterResourceAsync(const Model::DeregisterResourceRequest& request, const DeregisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves the current data access role for the given resource registered in
* AWS Lake Formation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DescribeResource">AWS
* API Reference</a></p>
*/
virtual Model::DescribeResourceOutcome DescribeResource(const Model::DescribeResourceRequest& request) const;
/**
* <p>Retrieves the current data access role for the given resource registered in
* AWS Lake Formation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DescribeResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeResourceOutcomeCallable DescribeResourceCallable(const Model::DescribeResourceRequest& request) const;
/**
* <p>Retrieves the current data access role for the given resource registered in
* AWS Lake Formation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DescribeResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeResourceAsync(const Model::DescribeResourceRequest& request, const DescribeResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves the list of the data lake administrators of a Lake
* Formation-managed data lake. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetDataLakeSettings">AWS
* API Reference</a></p>
*/
virtual Model::GetDataLakeSettingsOutcome GetDataLakeSettings(const Model::GetDataLakeSettingsRequest& request) const;
/**
* <p>Retrieves the list of the data lake administrators of a Lake
* Formation-managed data lake. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetDataLakeSettings">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetDataLakeSettingsOutcomeCallable GetDataLakeSettingsCallable(const Model::GetDataLakeSettingsRequest& request) const;
/**
* <p>Retrieves the list of the data lake administrators of a Lake
* Formation-managed data lake. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetDataLakeSettings">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetDataLakeSettingsAsync(const Model::GetDataLakeSettingsRequest& request, const GetDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns the Lake Formation permissions for a specified table or database
* resource located at a path in Amazon S3.
* <code>GetEffectivePermissionsForPath</code> will not return databases and tables
* if the catalog is encrypted.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetEffectivePermissionsForPath">AWS
* API Reference</a></p>
*/
virtual Model::GetEffectivePermissionsForPathOutcome GetEffectivePermissionsForPath(const Model::GetEffectivePermissionsForPathRequest& request) const;
/**
* <p>Returns the Lake Formation permissions for a specified table or database
* resource located at a path in Amazon S3.
* <code>GetEffectivePermissionsForPath</code> will not return databases and tables
* if the catalog is encrypted.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetEffectivePermissionsForPath">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetEffectivePermissionsForPathOutcomeCallable GetEffectivePermissionsForPathCallable(const Model::GetEffectivePermissionsForPathRequest& request) const;
/**
* <p>Returns the Lake Formation permissions for a specified table or database
* resource located at a path in Amazon S3.
* <code>GetEffectivePermissionsForPath</code> will not return databases and tables
* if the catalog is encrypted.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetEffectivePermissionsForPath">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetEffectivePermissionsForPathAsync(const Model::GetEffectivePermissionsForPathRequest& request, const GetEffectivePermissionsForPathResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Grants permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p> <p>For
* information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GrantPermissions">AWS
* API Reference</a></p>
*/
virtual Model::GrantPermissionsOutcome GrantPermissions(const Model::GrantPermissionsRequest& request) const;
/**
* <p>Grants permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p> <p>For
* information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GrantPermissions">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GrantPermissionsOutcomeCallable GrantPermissionsCallable(const Model::GrantPermissionsRequest& request) const;
/**
* <p>Grants permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p> <p>For
* information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GrantPermissions">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GrantPermissionsAsync(const Model::GrantPermissionsRequest& request, const GrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Returns a list of the principal permissions on the resource, filtered by the
* permissions of the caller. For example, if you are granted an ALTER permission,
* you are able to see only the principal permissions for ALTER.</p> <p>This
* operation returns only those permissions that have been explicitly granted.</p>
* <p>For information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListPermissions">AWS
* API Reference</a></p>
*/
virtual Model::ListPermissionsOutcome ListPermissions(const Model::ListPermissionsRequest& request) const;
/**
* <p>Returns a list of the principal permissions on the resource, filtered by the
* permissions of the caller. For example, if you are granted an ALTER permission,
* you are able to see only the principal permissions for ALTER.</p> <p>This
* operation returns only those permissions that have been explicitly granted.</p>
* <p>For information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListPermissions">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListPermissionsOutcomeCallable ListPermissionsCallable(const Model::ListPermissionsRequest& request) const;
/**
* <p>Returns a list of the principal permissions on the resource, filtered by the
* permissions of the caller. For example, if you are granted an ALTER permission,
* you are able to see only the principal permissions for ALTER.</p> <p>This
* operation returns only those permissions that have been explicitly granted.</p>
* <p>For information about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListPermissions">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListPermissionsAsync(const Model::ListPermissionsRequest& request, const ListPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the resources registered to be managed by the Data
* Catalog.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListResources">AWS
* API Reference</a></p>
*/
virtual Model::ListResourcesOutcome ListResources(const Model::ListResourcesRequest& request) const;
/**
* <p>Lists the resources registered to be managed by the Data
* Catalog.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListResources">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListResourcesOutcomeCallable ListResourcesCallable(const Model::ListResourcesRequest& request) const;
/**
* <p>Lists the resources registered to be managed by the Data
* Catalog.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListResources">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListResourcesAsync(const Model::ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Sets the list of data lake administrators who have admin privileges on all
* resources managed by Lake Formation. For more information on admin privileges,
* see <a
* href="https://docs.aws.amazon.com/lake-formation/latest/dg/lake-formation-permissions.html">Granting
* Lake Formation Permissions</a>.</p> <p>This API replaces the current list of
* data lake admins with the new list being passed. To add an admin, fetch the
* current list and add the new admin to that list and pass that list in this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PutDataLakeSettings">AWS
* API Reference</a></p>
*/
virtual Model::PutDataLakeSettingsOutcome PutDataLakeSettings(const Model::PutDataLakeSettingsRequest& request) const;
/**
* <p>Sets the list of data lake administrators who have admin privileges on all
* resources managed by Lake Formation. For more information on admin privileges,
* see <a
* href="https://docs.aws.amazon.com/lake-formation/latest/dg/lake-formation-permissions.html">Granting
* Lake Formation Permissions</a>.</p> <p>This API replaces the current list of
* data lake admins with the new list being passed. To add an admin, fetch the
* current list and add the new admin to that list and pass that list in this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PutDataLakeSettings">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::PutDataLakeSettingsOutcomeCallable PutDataLakeSettingsCallable(const Model::PutDataLakeSettingsRequest& request) const;
/**
* <p>Sets the list of data lake administrators who have admin privileges on all
* resources managed by Lake Formation. For more information on admin privileges,
* see <a
* href="https://docs.aws.amazon.com/lake-formation/latest/dg/lake-formation-permissions.html">Granting
* Lake Formation Permissions</a>.</p> <p>This API replaces the current list of
* data lake admins with the new list being passed. To add an admin, fetch the
* current list and add the new admin to that list and pass that list in this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PutDataLakeSettings">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void PutDataLakeSettingsAsync(const Model::PutDataLakeSettingsRequest& request, const PutDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Registers the resource as managed by the Data Catalog.</p> <p>To add or
* update data, Lake Formation needs read/write access to the chosen Amazon S3
* path. Choose a role that you know has permission to do this, or choose the
* AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register
* the first Amazon S3 path, the service-linked role and a new inline policy are
* created on your behalf. Lake Formation adds the first path to the inline policy
* and attaches it to the service-linked role. When you register subsequent paths,
* Lake Formation adds the path to the existing policy.</p> <p>The following
* request registers a new location and gives AWS Lake Formation permission to use
* the service-linked role to access that location.</p> <p> <code>ResourceArn =
* arn:aws:s3:::my-bucket UseServiceLinkedRole = true</code> </p> <p>If
* <code>UseServiceLinkedRole</code> is not set to true, you must provide or set
* the <code>RoleArn</code>:</p> <p>
* <code>arn:aws:iam::12345:role/my-data-access-role</code> </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RegisterResource">AWS
* API Reference</a></p>
*/
virtual Model::RegisterResourceOutcome RegisterResource(const Model::RegisterResourceRequest& request) const;
/**
* <p>Registers the resource as managed by the Data Catalog.</p> <p>To add or
* update data, Lake Formation needs read/write access to the chosen Amazon S3
* path. Choose a role that you know has permission to do this, or choose the
* AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register
* the first Amazon S3 path, the service-linked role and a new inline policy are
* created on your behalf. Lake Formation adds the first path to the inline policy
* and attaches it to the service-linked role. When you register subsequent paths,
* Lake Formation adds the path to the existing policy.</p> <p>The following
* request registers a new location and gives AWS Lake Formation permission to use
* the service-linked role to access that location.</p> <p> <code>ResourceArn =
* arn:aws:s3:::my-bucket UseServiceLinkedRole = true</code> </p> <p>If
* <code>UseServiceLinkedRole</code> is not set to true, you must provide or set
* the <code>RoleArn</code>:</p> <p>
* <code>arn:aws:iam::12345:role/my-data-access-role</code> </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RegisterResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::RegisterResourceOutcomeCallable RegisterResourceCallable(const Model::RegisterResourceRequest& request) const;
/**
* <p>Registers the resource as managed by the Data Catalog.</p> <p>To add or
* update data, Lake Formation needs read/write access to the chosen Amazon S3
* path. Choose a role that you know has permission to do this, or choose the
* AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register
* the first Amazon S3 path, the service-linked role and a new inline policy are
* created on your behalf. Lake Formation adds the first path to the inline policy
* and attaches it to the service-linked role. When you register subsequent paths,
* Lake Formation adds the path to the existing policy.</p> <p>The following
* request registers a new location and gives AWS Lake Formation permission to use
* the service-linked role to access that location.</p> <p> <code>ResourceArn =
* arn:aws:s3:::my-bucket UseServiceLinkedRole = true</code> </p> <p>If
* <code>UseServiceLinkedRole</code> is not set to true, you must provide or set
* the <code>RoleArn</code>:</p> <p>
* <code>arn:aws:iam::12345:role/my-data-access-role</code> </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RegisterResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void RegisterResourceAsync(const Model::RegisterResourceRequest& request, const RegisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Revokes permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RevokePermissions">AWS
* API Reference</a></p>
*/
virtual Model::RevokePermissionsOutcome RevokePermissions(const Model::RevokePermissionsRequest& request) const;
/**
* <p>Revokes permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RevokePermissions">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::RevokePermissionsOutcomeCallable RevokePermissionsCallable(const Model::RevokePermissionsRequest& request) const;
/**
* <p>Revokes permissions to the principal to access metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RevokePermissions">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void RevokePermissionsAsync(const Model::RevokePermissionsRequest& request, const RevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Updates the data access role used for vending access to the given
* (registered) resource in AWS Lake Formation. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/UpdateResource">AWS
* API Reference</a></p>
*/
virtual Model::UpdateResourceOutcome UpdateResource(const Model::UpdateResourceRequest& request) const;
/**
* <p>Updates the data access role used for vending access to the given
* (registered) resource in AWS Lake Formation. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/UpdateResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateResourceOutcomeCallable UpdateResourceCallable(const Model::UpdateResourceRequest& request) const;
/**
* <p>Updates the data access role used for vending access to the given
* (registered) resource in AWS Lake Formation. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/UpdateResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateResourceAsync(const Model::UpdateResourceRequest& request, const UpdateResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void BatchGrantPermissionsAsyncHelper(const Model::BatchGrantPermissionsRequest& request, const BatchGrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void BatchRevokePermissionsAsyncHelper(const Model::BatchRevokePermissionsRequest& request, const BatchRevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeregisterResourceAsyncHelper(const Model::DeregisterResourceRequest& request, const DeregisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeResourceAsyncHelper(const Model::DescribeResourceRequest& request, const DescribeResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetDataLakeSettingsAsyncHelper(const Model::GetDataLakeSettingsRequest& request, const GetDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetEffectivePermissionsForPathAsyncHelper(const Model::GetEffectivePermissionsForPathRequest& request, const GetEffectivePermissionsForPathResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GrantPermissionsAsyncHelper(const Model::GrantPermissionsRequest& request, const GrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListPermissionsAsyncHelper(const Model::ListPermissionsRequest& request, const ListPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListResourcesAsyncHelper(const Model::ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void PutDataLakeSettingsAsyncHelper(const Model::PutDataLakeSettingsRequest& request, const PutDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void RegisterResourceAsyncHelper(const Model::RegisterResourceRequest& request, const RegisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void RevokePermissionsAsyncHelper(const Model::RevokePermissionsRequest& request, const RevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UpdateResourceAsyncHelper(const Model::UpdateResourceRequest& request, const UpdateResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace LakeFormationEndpoint
{
AWS_LAKEFORMATION_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace LakeFormationEndpoint
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_LAKEFORMATION_API LakeFormationErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
namespace LakeFormation
{
enum class LakeFormationErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
ALREADY_EXISTS= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
CONCURRENT_MODIFICATION,
ENTITY_NOT_FOUND,
INTERNAL_SERVICE,
INVALID_INPUT,
OPERATION_TIMEOUT
};
class AWS_LAKEFORMATION_API LakeFormationError : public Aws::Client::AWSError<LakeFormationErrors>
{
public:
LakeFormationError() {}
LakeFormationError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<LakeFormationErrors>(rhs) {}
LakeFormationError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<LakeFormationErrors>(rhs) {}
LakeFormationError(const Aws::Client::AWSError<LakeFormationErrors>& rhs) : Aws::Client::AWSError<LakeFormationErrors>(rhs) {}
LakeFormationError(Aws::Client::AWSError<LakeFormationErrors>&& rhs) : Aws::Client::AWSError<LakeFormationErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace LakeFormationErrorMapper
{
AWS_LAKEFORMATION_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace LakeFormation
{
class AWS_LAKEFORMATION_API LakeFormationRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~LakeFormationRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2017-03-31"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_LAKEFORMATION_EXPORTS
#define AWS_LAKEFORMATION_API __declspec(dllexport)
#else
#define AWS_LAKEFORMATION_API __declspec(dllimport)
#endif /* AWS_LAKEFORMATION_EXPORTS */
#else
#define AWS_LAKEFORMATION_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_LAKEFORMATION_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,163 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/BatchPermissionsRequestEntry.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API BatchGrantPermissionsRequest : public LakeFormationRequest
{
public:
BatchGrantPermissionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "BatchGrantPermissions"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchGrantPermissionsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchGrantPermissionsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchGrantPermissionsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline const Aws::Vector<BatchPermissionsRequestEntry>& GetEntries() const{ return m_entries; }
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline bool EntriesHasBeenSet() const { return m_entriesHasBeenSet; }
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline void SetEntries(const Aws::Vector<BatchPermissionsRequestEntry>& value) { m_entriesHasBeenSet = true; m_entries = value; }
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline void SetEntries(Aws::Vector<BatchPermissionsRequestEntry>&& value) { m_entriesHasBeenSet = true; m_entries = std::move(value); }
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline BatchGrantPermissionsRequest& WithEntries(const Aws::Vector<BatchPermissionsRequestEntry>& value) { SetEntries(value); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline BatchGrantPermissionsRequest& WithEntries(Aws::Vector<BatchPermissionsRequestEntry>&& value) { SetEntries(std::move(value)); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline BatchGrantPermissionsRequest& AddEntries(const BatchPermissionsRequestEntry& value) { m_entriesHasBeenSet = true; m_entries.push_back(value); return *this; }
/**
* <p>A list of up to 20 entries for resource permissions to be granted by batch
* operation to the principal.</p>
*/
inline BatchGrantPermissionsRequest& AddEntries(BatchPermissionsRequestEntry&& value) { m_entriesHasBeenSet = true; m_entries.push_back(std::move(value)); return *this; }
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::Vector<BatchPermissionsRequestEntry> m_entries;
bool m_entriesHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/BatchPermissionsFailureEntry.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API BatchGrantPermissionsResult
{
public:
BatchGrantPermissionsResult();
BatchGrantPermissionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
BatchGrantPermissionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline const Aws::Vector<BatchPermissionsFailureEntry>& GetFailures() const{ return m_failures; }
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline void SetFailures(const Aws::Vector<BatchPermissionsFailureEntry>& value) { m_failures = value; }
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline void SetFailures(Aws::Vector<BatchPermissionsFailureEntry>&& value) { m_failures = std::move(value); }
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline BatchGrantPermissionsResult& WithFailures(const Aws::Vector<BatchPermissionsFailureEntry>& value) { SetFailures(value); return *this;}
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline BatchGrantPermissionsResult& WithFailures(Aws::Vector<BatchPermissionsFailureEntry>&& value) { SetFailures(std::move(value)); return *this;}
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline BatchGrantPermissionsResult& AddFailures(const BatchPermissionsFailureEntry& value) { m_failures.push_back(value); return *this; }
/**
* <p>A list of failures to grant permissions to the resources.</p>
*/
inline BatchGrantPermissionsResult& AddFailures(BatchPermissionsFailureEntry&& value) { m_failures.push_back(std::move(value)); return *this; }
private:
Aws::Vector<BatchPermissionsFailureEntry> m_failures;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,114 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/BatchPermissionsRequestEntry.h>
#include <aws/lakeformation/model/ErrorDetail.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A list of failures when performing a batch grant or batch revoke
* operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchPermissionsFailureEntry">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API BatchPermissionsFailureEntry
{
public:
BatchPermissionsFailureEntry();
BatchPermissionsFailureEntry(Aws::Utils::Json::JsonView jsonValue);
BatchPermissionsFailureEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline const BatchPermissionsRequestEntry& GetRequestEntry() const{ return m_requestEntry; }
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline bool RequestEntryHasBeenSet() const { return m_requestEntryHasBeenSet; }
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline void SetRequestEntry(const BatchPermissionsRequestEntry& value) { m_requestEntryHasBeenSet = true; m_requestEntry = value; }
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline void SetRequestEntry(BatchPermissionsRequestEntry&& value) { m_requestEntryHasBeenSet = true; m_requestEntry = std::move(value); }
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline BatchPermissionsFailureEntry& WithRequestEntry(const BatchPermissionsRequestEntry& value) { SetRequestEntry(value); return *this;}
/**
* <p>An identifier for an entry of the batch request.</p>
*/
inline BatchPermissionsFailureEntry& WithRequestEntry(BatchPermissionsRequestEntry&& value) { SetRequestEntry(std::move(value)); return *this;}
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline const ErrorDetail& GetError() const{ return m_error; }
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline void SetError(const ErrorDetail& value) { m_errorHasBeenSet = true; m_error = value; }
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline void SetError(ErrorDetail&& value) { m_errorHasBeenSet = true; m_error = std::move(value); }
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline BatchPermissionsFailureEntry& WithError(const ErrorDetail& value) { SetError(value); return *this;}
/**
* <p>An error message that applies to the failure of the entry.</p>
*/
inline BatchPermissionsFailureEntry& WithError(ErrorDetail&& value) { SetError(std::move(value)); return *this;}
private:
BatchPermissionsRequestEntry m_requestEntry;
bool m_requestEntryHasBeenSet;
ErrorDetail m_error;
bool m_errorHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,249 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/Resource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/Permission.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A permission to a resource granted by batch operation to the
* principal.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchPermissionsRequestEntry">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API BatchPermissionsRequestEntry
{
public:
BatchPermissionsRequestEntry();
BatchPermissionsRequestEntry(Aws::Utils::Json::JsonView jsonValue);
BatchPermissionsRequestEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline BatchPermissionsRequestEntry& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline BatchPermissionsRequestEntry& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* <p>A unique identifier for the batch permissions request entry.</p>
*/
inline BatchPermissionsRequestEntry& WithId(const char* value) { SetId(value); return *this;}
/**
* <p>The principal to be granted a permission.</p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>The principal to be granted a permission.</p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>The principal to be granted a permission.</p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>The principal to be granted a permission.</p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>The principal to be granted a permission.</p>
*/
inline BatchPermissionsRequestEntry& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>The principal to be granted a permission.</p>
*/
inline BatchPermissionsRequestEntry& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline const Resource& GetResource() const{ return m_resource; }
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline BatchPermissionsRequestEntry& WithResource(const Resource& value) { SetResource(value); return *this;}
/**
* <p>The resource to which the principal is to be granted a permission.</p>
*/
inline BatchPermissionsRequestEntry& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
/**
* <p>The permissions to be granted.</p>
*/
inline const Aws::Vector<Permission>& GetPermissions() const{ return m_permissions; }
/**
* <p>The permissions to be granted.</p>
*/
inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
/**
* <p>The permissions to be granted.</p>
*/
inline void SetPermissions(const Aws::Vector<Permission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
/**
* <p>The permissions to be granted.</p>
*/
inline void SetPermissions(Aws::Vector<Permission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
/**
* <p>The permissions to be granted.</p>
*/
inline BatchPermissionsRequestEntry& WithPermissions(const Aws::Vector<Permission>& value) { SetPermissions(value); return *this;}
/**
* <p>The permissions to be granted.</p>
*/
inline BatchPermissionsRequestEntry& WithPermissions(Aws::Vector<Permission>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>The permissions to be granted.</p>
*/
inline BatchPermissionsRequestEntry& AddPermissions(const Permission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
/**
* <p>The permissions to be granted.</p>
*/
inline BatchPermissionsRequestEntry& AddPermissions(Permission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline const Aws::Vector<Permission>& GetPermissionsWithGrantOption() const{ return m_permissionsWithGrantOption; }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline bool PermissionsWithGrantOptionHasBeenSet() const { return m_permissionsWithGrantOptionHasBeenSet; }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline void SetPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = value; }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline void SetPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = std::move(value); }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline BatchPermissionsRequestEntry& WithPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { SetPermissionsWithGrantOption(value); return *this;}
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline BatchPermissionsRequestEntry& WithPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { SetPermissionsWithGrantOption(std::move(value)); return *this;}
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline BatchPermissionsRequestEntry& AddPermissionsWithGrantOption(const Permission& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(value); return *this; }
/**
* <p>Indicates if the option to pass permissions is granted.</p>
*/
inline BatchPermissionsRequestEntry& AddPermissionsWithGrantOption(Permission&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(std::move(value)); return *this; }
private:
Aws::String m_id;
bool m_idHasBeenSet;
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
Resource m_resource;
bool m_resourceHasBeenSet;
Aws::Vector<Permission> m_permissions;
bool m_permissionsHasBeenSet;
Aws::Vector<Permission> m_permissionsWithGrantOption;
bool m_permissionsWithGrantOptionHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,163 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/BatchPermissionsRequestEntry.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API BatchRevokePermissionsRequest : public LakeFormationRequest
{
public:
BatchRevokePermissionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "BatchRevokePermissions"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchRevokePermissionsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchRevokePermissionsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline BatchRevokePermissionsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline const Aws::Vector<BatchPermissionsRequestEntry>& GetEntries() const{ return m_entries; }
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline bool EntriesHasBeenSet() const { return m_entriesHasBeenSet; }
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline void SetEntries(const Aws::Vector<BatchPermissionsRequestEntry>& value) { m_entriesHasBeenSet = true; m_entries = value; }
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline void SetEntries(Aws::Vector<BatchPermissionsRequestEntry>&& value) { m_entriesHasBeenSet = true; m_entries = std::move(value); }
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline BatchRevokePermissionsRequest& WithEntries(const Aws::Vector<BatchPermissionsRequestEntry>& value) { SetEntries(value); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline BatchRevokePermissionsRequest& WithEntries(Aws::Vector<BatchPermissionsRequestEntry>&& value) { SetEntries(std::move(value)); return *this;}
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline BatchRevokePermissionsRequest& AddEntries(const BatchPermissionsRequestEntry& value) { m_entriesHasBeenSet = true; m_entries.push_back(value); return *this; }
/**
* <p>A list of up to 20 entries for resource permissions to be revoked by batch
* operation to the principal.</p>
*/
inline BatchRevokePermissionsRequest& AddEntries(BatchPermissionsRequestEntry&& value) { m_entriesHasBeenSet = true; m_entries.push_back(std::move(value)); return *this; }
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::Vector<BatchPermissionsRequestEntry> m_entries;
bool m_entriesHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/BatchPermissionsFailureEntry.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API BatchRevokePermissionsResult
{
public:
BatchRevokePermissionsResult();
BatchRevokePermissionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
BatchRevokePermissionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline const Aws::Vector<BatchPermissionsFailureEntry>& GetFailures() const{ return m_failures; }
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline void SetFailures(const Aws::Vector<BatchPermissionsFailureEntry>& value) { m_failures = value; }
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline void SetFailures(Aws::Vector<BatchPermissionsFailureEntry>&& value) { m_failures = std::move(value); }
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline BatchRevokePermissionsResult& WithFailures(const Aws::Vector<BatchPermissionsFailureEntry>& value) { SetFailures(value); return *this;}
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline BatchRevokePermissionsResult& WithFailures(Aws::Vector<BatchPermissionsFailureEntry>&& value) { SetFailures(std::move(value)); return *this;}
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline BatchRevokePermissionsResult& AddFailures(const BatchPermissionsFailureEntry& value) { m_failures.push_back(value); return *this; }
/**
* <p>A list of failures to revoke permissions to the resources.</p>
*/
inline BatchRevokePermissionsResult& AddFailures(BatchPermissionsFailureEntry&& value) { m_failures.push_back(std::move(value)); return *this; }
private:
Aws::Vector<BatchPermissionsFailureEntry> m_failures;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for the catalog object.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/CatalogResource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API CatalogResource
{
public:
CatalogResource();
CatalogResource(Aws::Utils::Json::JsonView jsonValue);
CatalogResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,95 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A wildcard object, consisting of an optional list of excluded column names or
* indexes.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ColumnWildcard">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API ColumnWildcard
{
public:
ColumnWildcard();
ColumnWildcard(Aws::Utils::Json::JsonView jsonValue);
ColumnWildcard& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline const Aws::Vector<Aws::String>& GetExcludedColumnNames() const{ return m_excludedColumnNames; }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline bool ExcludedColumnNamesHasBeenSet() const { return m_excludedColumnNamesHasBeenSet; }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline void SetExcludedColumnNames(const Aws::Vector<Aws::String>& value) { m_excludedColumnNamesHasBeenSet = true; m_excludedColumnNames = value; }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline void SetExcludedColumnNames(Aws::Vector<Aws::String>&& value) { m_excludedColumnNamesHasBeenSet = true; m_excludedColumnNames = std::move(value); }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline ColumnWildcard& WithExcludedColumnNames(const Aws::Vector<Aws::String>& value) { SetExcludedColumnNames(value); return *this;}
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline ColumnWildcard& WithExcludedColumnNames(Aws::Vector<Aws::String>&& value) { SetExcludedColumnNames(std::move(value)); return *this;}
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline ColumnWildcard& AddExcludedColumnNames(const Aws::String& value) { m_excludedColumnNamesHasBeenSet = true; m_excludedColumnNames.push_back(value); return *this; }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline ColumnWildcard& AddExcludedColumnNames(Aws::String&& value) { m_excludedColumnNamesHasBeenSet = true; m_excludedColumnNames.push_back(std::move(value)); return *this; }
/**
* <p>Excludes column names. Any column with this name will be excluded.</p>
*/
inline ColumnWildcard& AddExcludedColumnNames(const char* value) { m_excludedColumnNamesHasBeenSet = true; m_excludedColumnNames.push_back(value); return *this; }
private:
Aws::Vector<Aws::String> m_excludedColumnNames;
bool m_excludedColumnNamesHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
enum class ComparisonOperator
{
NOT_SET,
EQ,
NE,
LE,
LT,
GE,
GT,
CONTAINS,
NOT_CONTAINS,
BEGINS_WITH,
IN,
BETWEEN
};
namespace ComparisonOperatorMapper
{
AWS_LAKEFORMATION_API ComparisonOperator GetComparisonOperatorForName(const Aws::String& name);
AWS_LAKEFORMATION_API Aws::String GetNameForComparisonOperator(ComparisonOperator value);
} // namespace ComparisonOperatorMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>The AWS Lake Formation principal. Supported principals are IAM users or IAM
* roles.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DataLakePrincipal">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API DataLakePrincipal
{
public:
DataLakePrincipal();
DataLakePrincipal(Aws::Utils::Json::JsonView jsonValue);
DataLakePrincipal& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline const Aws::String& GetDataLakePrincipalIdentifier() const{ return m_dataLakePrincipalIdentifier; }
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline bool DataLakePrincipalIdentifierHasBeenSet() const { return m_dataLakePrincipalIdentifierHasBeenSet; }
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline void SetDataLakePrincipalIdentifier(const Aws::String& value) { m_dataLakePrincipalIdentifierHasBeenSet = true; m_dataLakePrincipalIdentifier = value; }
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline void SetDataLakePrincipalIdentifier(Aws::String&& value) { m_dataLakePrincipalIdentifierHasBeenSet = true; m_dataLakePrincipalIdentifier = std::move(value); }
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline void SetDataLakePrincipalIdentifier(const char* value) { m_dataLakePrincipalIdentifierHasBeenSet = true; m_dataLakePrincipalIdentifier.assign(value); }
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline DataLakePrincipal& WithDataLakePrincipalIdentifier(const Aws::String& value) { SetDataLakePrincipalIdentifier(value); return *this;}
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline DataLakePrincipal& WithDataLakePrincipalIdentifier(Aws::String&& value) { SetDataLakePrincipalIdentifier(std::move(value)); return *this;}
/**
* <p>An identifier for the AWS Lake Formation principal.</p>
*/
inline DataLakePrincipal& WithDataLakePrincipalIdentifier(const char* value) { SetDataLakePrincipalIdentifier(value); return *this;}
private:
Aws::String m_dataLakePrincipalIdentifier;
bool m_dataLakePrincipalIdentifierHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
enum class DataLakeResourceType
{
NOT_SET,
CATALOG,
DATABASE,
TABLE,
DATA_LOCATION
};
namespace DataLakeResourceTypeMapper
{
AWS_LAKEFORMATION_API DataLakeResourceType GetDataLakeResourceTypeForName(const Aws::String& name);
AWS_LAKEFORMATION_API Aws::String GetNameForDataLakeResourceType(DataLakeResourceType value);
} // namespace DataLakeResourceTypeMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,291 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/PrincipalPermissions.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators and lists of principal permission entries for
* default create database and default create table permissions.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DataLakeSettings">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API DataLakeSettings
{
public:
DataLakeSettings();
DataLakeSettings(Aws::Utils::Json::JsonView jsonValue);
DataLakeSettings& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline const Aws::Vector<DataLakePrincipal>& GetDataLakeAdmins() const{ return m_dataLakeAdmins; }
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline bool DataLakeAdminsHasBeenSet() const { return m_dataLakeAdminsHasBeenSet; }
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline void SetDataLakeAdmins(const Aws::Vector<DataLakePrincipal>& value) { m_dataLakeAdminsHasBeenSet = true; m_dataLakeAdmins = value; }
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline void SetDataLakeAdmins(Aws::Vector<DataLakePrincipal>&& value) { m_dataLakeAdminsHasBeenSet = true; m_dataLakeAdmins = std::move(value); }
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline DataLakeSettings& WithDataLakeAdmins(const Aws::Vector<DataLakePrincipal>& value) { SetDataLakeAdmins(value); return *this;}
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline DataLakeSettings& WithDataLakeAdmins(Aws::Vector<DataLakePrincipal>&& value) { SetDataLakeAdmins(std::move(value)); return *this;}
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline DataLakeSettings& AddDataLakeAdmins(const DataLakePrincipal& value) { m_dataLakeAdminsHasBeenSet = true; m_dataLakeAdmins.push_back(value); return *this; }
/**
* <p>A list of AWS Lake Formation principals. Supported principals are IAM users
* or IAM roles.</p>
*/
inline DataLakeSettings& AddDataLakeAdmins(DataLakePrincipal&& value) { m_dataLakeAdminsHasBeenSet = true; m_dataLakeAdmins.push_back(std::move(value)); return *this; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline const Aws::Vector<PrincipalPermissions>& GetCreateDatabaseDefaultPermissions() const{ return m_createDatabaseDefaultPermissions; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline bool CreateDatabaseDefaultPermissionsHasBeenSet() const { return m_createDatabaseDefaultPermissionsHasBeenSet; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline void SetCreateDatabaseDefaultPermissions(const Aws::Vector<PrincipalPermissions>& value) { m_createDatabaseDefaultPermissionsHasBeenSet = true; m_createDatabaseDefaultPermissions = value; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline void SetCreateDatabaseDefaultPermissions(Aws::Vector<PrincipalPermissions>&& value) { m_createDatabaseDefaultPermissionsHasBeenSet = true; m_createDatabaseDefaultPermissions = std::move(value); }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline DataLakeSettings& WithCreateDatabaseDefaultPermissions(const Aws::Vector<PrincipalPermissions>& value) { SetCreateDatabaseDefaultPermissions(value); return *this;}
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline DataLakeSettings& WithCreateDatabaseDefaultPermissions(Aws::Vector<PrincipalPermissions>&& value) { SetCreateDatabaseDefaultPermissions(std::move(value)); return *this;}
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline DataLakeSettings& AddCreateDatabaseDefaultPermissions(const PrincipalPermissions& value) { m_createDatabaseDefaultPermissionsHasBeenSet = true; m_createDatabaseDefaultPermissions.push_back(value); return *this; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create database permissions.</p>
*/
inline DataLakeSettings& AddCreateDatabaseDefaultPermissions(PrincipalPermissions&& value) { m_createDatabaseDefaultPermissionsHasBeenSet = true; m_createDatabaseDefaultPermissions.push_back(std::move(value)); return *this; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline const Aws::Vector<PrincipalPermissions>& GetCreateTableDefaultPermissions() const{ return m_createTableDefaultPermissions; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline bool CreateTableDefaultPermissionsHasBeenSet() const { return m_createTableDefaultPermissionsHasBeenSet; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline void SetCreateTableDefaultPermissions(const Aws::Vector<PrincipalPermissions>& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions = value; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline void SetCreateTableDefaultPermissions(Aws::Vector<PrincipalPermissions>&& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions = std::move(value); }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline DataLakeSettings& WithCreateTableDefaultPermissions(const Aws::Vector<PrincipalPermissions>& value) { SetCreateTableDefaultPermissions(value); return *this;}
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline DataLakeSettings& WithCreateTableDefaultPermissions(Aws::Vector<PrincipalPermissions>&& value) { SetCreateTableDefaultPermissions(std::move(value)); return *this;}
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline DataLakeSettings& AddCreateTableDefaultPermissions(const PrincipalPermissions& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions.push_back(value); return *this; }
/**
* <p>A structure representing a list of up to three principal permissions entries
* for default create table permissions.</p>
*/
inline DataLakeSettings& AddCreateTableDefaultPermissions(PrincipalPermissions&& value) { m_createTableDefaultPermissionsHasBeenSet = true; m_createTableDefaultPermissions.push_back(std::move(value)); return *this; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline const Aws::Vector<Aws::String>& GetTrustedResourceOwners() const{ return m_trustedResourceOwners; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline bool TrustedResourceOwnersHasBeenSet() const { return m_trustedResourceOwnersHasBeenSet; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline void SetTrustedResourceOwners(const Aws::Vector<Aws::String>& value) { m_trustedResourceOwnersHasBeenSet = true; m_trustedResourceOwners = value; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline void SetTrustedResourceOwners(Aws::Vector<Aws::String>&& value) { m_trustedResourceOwnersHasBeenSet = true; m_trustedResourceOwners = std::move(value); }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline DataLakeSettings& WithTrustedResourceOwners(const Aws::Vector<Aws::String>& value) { SetTrustedResourceOwners(value); return *this;}
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline DataLakeSettings& WithTrustedResourceOwners(Aws::Vector<Aws::String>&& value) { SetTrustedResourceOwners(std::move(value)); return *this;}
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline DataLakeSettings& AddTrustedResourceOwners(const Aws::String& value) { m_trustedResourceOwnersHasBeenSet = true; m_trustedResourceOwners.push_back(value); return *this; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline DataLakeSettings& AddTrustedResourceOwners(Aws::String&& value) { m_trustedResourceOwnersHasBeenSet = true; m_trustedResourceOwners.push_back(std::move(value)); return *this; }
/**
* <p>A list of the resource-owning account IDs that the caller's account can use
* to share their user access details (user ARNs). The user ARNs can be logged in
* the resource owner's AWS CloudTrail log.</p> <p>You may want to specify this
* property when you are in a high-trust boundary, such as the same team or
* company. </p>
*/
inline DataLakeSettings& AddTrustedResourceOwners(const char* value) { m_trustedResourceOwnersHasBeenSet = true; m_trustedResourceOwners.push_back(value); return *this; }
private:
Aws::Vector<DataLakePrincipal> m_dataLakeAdmins;
bool m_dataLakeAdminsHasBeenSet;
Aws::Vector<PrincipalPermissions> m_createDatabaseDefaultPermissions;
bool m_createDatabaseDefaultPermissionsHasBeenSet;
Aws::Vector<PrincipalPermissions> m_createTableDefaultPermissions;
bool m_createTableDefaultPermissionsHasBeenSet;
Aws::Vector<Aws::String> m_trustedResourceOwners;
bool m_trustedResourceOwnersHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,149 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for a data location object where permissions are granted or
* revoked. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DataLocationResource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API DataLocationResource
{
public:
DataLocationResource();
DataLocationResource(Aws::Utils::Json::JsonView jsonValue);
DataLocationResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline DataLocationResource& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline DataLocationResource& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog where the location is registered with AWS
* Lake Formation. By default, it is the account ID of the caller.</p>
*/
inline DataLocationResource& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline DataLocationResource& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline DataLocationResource& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies the data location
* resource.</p>
*/
inline DataLocationResource& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,140 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for the database object.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DatabaseResource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API DatabaseResource
{
public:
DatabaseResource();
DatabaseResource(Aws::Utils::Json::JsonView jsonValue);
DatabaseResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline DatabaseResource& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline DatabaseResource& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline DatabaseResource& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline DatabaseResource& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline DatabaseResource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the database resource. Unique to the Data Catalog.</p>
*/
inline DatabaseResource& WithName(const char* value) { SetName(value); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API DeregisterResourceRequest : public LakeFormationRequest
{
public:
DeregisterResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DeregisterResource"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline DeregisterResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline DeregisterResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to
* deregister.</p>
*/
inline DeregisterResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API DeregisterResourceResult
{
public:
DeregisterResourceResult();
DeregisterResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DeregisterResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,85 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API DescribeResourceRequest : public LakeFormationRequest
{
public:
DescribeResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeResource"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The resource ARN.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The resource ARN.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The resource ARN.</p>
*/
inline DescribeResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The resource ARN.</p>
*/
inline DescribeResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The resource ARN.</p>
*/
inline DescribeResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/ResourceInfo.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API DescribeResourceResult
{
public:
DescribeResourceResult();
DescribeResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A structure containing information about an AWS Lake Formation resource.</p>
*/
inline const ResourceInfo& GetResourceInfo() const{ return m_resourceInfo; }
/**
* <p>A structure containing information about an AWS Lake Formation resource.</p>
*/
inline void SetResourceInfo(const ResourceInfo& value) { m_resourceInfo = value; }
/**
* <p>A structure containing information about an AWS Lake Formation resource.</p>
*/
inline void SetResourceInfo(ResourceInfo&& value) { m_resourceInfo = std::move(value); }
/**
* <p>A structure containing information about an AWS Lake Formation resource.</p>
*/
inline DescribeResourceResult& WithResourceInfo(const ResourceInfo& value) { SetResourceInfo(value); return *this;}
/**
* <p>A structure containing information about an AWS Lake Formation resource.</p>
*/
inline DescribeResourceResult& WithResourceInfo(ResourceInfo&& value) { SetResourceInfo(std::move(value)); return *this;}
private:
ResourceInfo m_resourceInfo;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure containing the additional details to be returned in the
* <code>AdditionalDetails</code> attribute of
* <code>PrincipalResourcePermissions</code>.</p> <p>If a catalog resource is
* shared through AWS Resource Access Manager (AWS RAM), then there will exist a
* corresponding RAM share resource ARN.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DetailsMap">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API DetailsMap
{
public:
DetailsMap();
DetailsMap(Aws::Utils::Json::JsonView jsonValue);
DetailsMap& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline const Aws::Vector<Aws::String>& GetResourceShare() const{ return m_resourceShare; }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline bool ResourceShareHasBeenSet() const { return m_resourceShareHasBeenSet; }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline void SetResourceShare(const Aws::Vector<Aws::String>& value) { m_resourceShareHasBeenSet = true; m_resourceShare = value; }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline void SetResourceShare(Aws::Vector<Aws::String>&& value) { m_resourceShareHasBeenSet = true; m_resourceShare = std::move(value); }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline DetailsMap& WithResourceShare(const Aws::Vector<Aws::String>& value) { SetResourceShare(value); return *this;}
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline DetailsMap& WithResourceShare(Aws::Vector<Aws::String>&& value) { SetResourceShare(std::move(value)); return *this;}
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline DetailsMap& AddResourceShare(const Aws::String& value) { m_resourceShareHasBeenSet = true; m_resourceShare.push_back(value); return *this; }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline DetailsMap& AddResourceShare(Aws::String&& value) { m_resourceShareHasBeenSet = true; m_resourceShare.push_back(std::move(value)); return *this; }
/**
* <p>A share resource ARN for a catalog resource shared through AWS Resource
* Access Manager (AWS RAM).</p>
*/
inline DetailsMap& AddResourceShare(const char* value) { m_resourceShareHasBeenSet = true; m_resourceShare.push_back(value); return *this; }
private:
Aws::Vector<Aws::String> m_resourceShare;
bool m_resourceShareHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>Contains details about an error.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ErrorDetail">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API ErrorDetail
{
public:
ErrorDetail();
ErrorDetail(Aws::Utils::Json::JsonView jsonValue);
ErrorDetail& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The code associated with this error.</p>
*/
inline const Aws::String& GetErrorCode() const{ return m_errorCode; }
/**
* <p>The code associated with this error.</p>
*/
inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
/**
* <p>The code associated with this error.</p>
*/
inline void SetErrorCode(const Aws::String& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
/**
* <p>The code associated with this error.</p>
*/
inline void SetErrorCode(Aws::String&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); }
/**
* <p>The code associated with this error.</p>
*/
inline void SetErrorCode(const char* value) { m_errorCodeHasBeenSet = true; m_errorCode.assign(value); }
/**
* <p>The code associated with this error.</p>
*/
inline ErrorDetail& WithErrorCode(const Aws::String& value) { SetErrorCode(value); return *this;}
/**
* <p>The code associated with this error.</p>
*/
inline ErrorDetail& WithErrorCode(Aws::String&& value) { SetErrorCode(std::move(value)); return *this;}
/**
* <p>The code associated with this error.</p>
*/
inline ErrorDetail& WithErrorCode(const char* value) { SetErrorCode(value); return *this;}
/**
* <p>A message describing the error.</p>
*/
inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; }
/**
* <p>A message describing the error.</p>
*/
inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
/**
* <p>A message describing the error.</p>
*/
inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; }
/**
* <p>A message describing the error.</p>
*/
inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); }
/**
* <p>A message describing the error.</p>
*/
inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); }
/**
* <p>A message describing the error.</p>
*/
inline ErrorDetail& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;}
/**
* <p>A message describing the error.</p>
*/
inline ErrorDetail& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;}
/**
* <p>A message describing the error.</p>
*/
inline ErrorDetail& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;}
private:
Aws::String m_errorCode;
bool m_errorCodeHasBeenSet;
Aws::String m_errorMessage;
bool m_errorMessageHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
enum class FieldNameString
{
NOT_SET,
RESOURCE_ARN,
ROLE_ARN,
LAST_MODIFIED
};
namespace FieldNameStringMapper
{
AWS_LAKEFORMATION_API FieldNameString GetFieldNameStringForName(const Aws::String& name);
AWS_LAKEFORMATION_API Aws::String GetNameForFieldNameString(FieldNameString value);
} // namespace FieldNameStringMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,165 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/FieldNameString.h>
#include <aws/lakeformation/model/ComparisonOperator.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>This structure describes the filtering of columns in a table based on a
* filter condition.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/FilterCondition">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API FilterCondition
{
public:
FilterCondition();
FilterCondition(Aws::Utils::Json::JsonView jsonValue);
FilterCondition& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The field to filter in the filter condition.</p>
*/
inline const FieldNameString& GetField() const{ return m_field; }
/**
* <p>The field to filter in the filter condition.</p>
*/
inline bool FieldHasBeenSet() const { return m_fieldHasBeenSet; }
/**
* <p>The field to filter in the filter condition.</p>
*/
inline void SetField(const FieldNameString& value) { m_fieldHasBeenSet = true; m_field = value; }
/**
* <p>The field to filter in the filter condition.</p>
*/
inline void SetField(FieldNameString&& value) { m_fieldHasBeenSet = true; m_field = std::move(value); }
/**
* <p>The field to filter in the filter condition.</p>
*/
inline FilterCondition& WithField(const FieldNameString& value) { SetField(value); return *this;}
/**
* <p>The field to filter in the filter condition.</p>
*/
inline FilterCondition& WithField(FieldNameString&& value) { SetField(std::move(value)); return *this;}
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline const ComparisonOperator& GetComparisonOperator() const{ return m_comparisonOperator; }
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline void SetComparisonOperator(const ComparisonOperator& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline void SetComparisonOperator(ComparisonOperator&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); }
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline FilterCondition& WithComparisonOperator(const ComparisonOperator& value) { SetComparisonOperator(value); return *this;}
/**
* <p>The comparison operator used in the filter condition.</p>
*/
inline FilterCondition& WithComparisonOperator(ComparisonOperator&& value) { SetComparisonOperator(std::move(value)); return *this;}
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline const Aws::Vector<Aws::String>& GetStringValueList() const{ return m_stringValueList; }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline bool StringValueListHasBeenSet() const { return m_stringValueListHasBeenSet; }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline void SetStringValueList(const Aws::Vector<Aws::String>& value) { m_stringValueListHasBeenSet = true; m_stringValueList = value; }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline void SetStringValueList(Aws::Vector<Aws::String>&& value) { m_stringValueListHasBeenSet = true; m_stringValueList = std::move(value); }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline FilterCondition& WithStringValueList(const Aws::Vector<Aws::String>& value) { SetStringValueList(value); return *this;}
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline FilterCondition& WithStringValueList(Aws::Vector<Aws::String>&& value) { SetStringValueList(std::move(value)); return *this;}
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline FilterCondition& AddStringValueList(const Aws::String& value) { m_stringValueListHasBeenSet = true; m_stringValueList.push_back(value); return *this; }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline FilterCondition& AddStringValueList(Aws::String&& value) { m_stringValueListHasBeenSet = true; m_stringValueList.push_back(std::move(value)); return *this; }
/**
* <p>A string with values used in evaluating the filter condition.</p>
*/
inline FilterCondition& AddStringValueList(const char* value) { m_stringValueListHasBeenSet = true; m_stringValueList.push_back(value); return *this; }
private:
FieldNameString m_field;
bool m_fieldHasBeenSet;
ComparisonOperator m_comparisonOperator;
bool m_comparisonOperatorHasBeenSet;
Aws::Vector<Aws::String> m_stringValueList;
bool m_stringValueListHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,109 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API GetDataLakeSettingsRequest : public LakeFormationRequest
{
public:
GetDataLakeSettingsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetDataLakeSettings"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetDataLakeSettingsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetDataLakeSettingsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetDataLakeSettingsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/DataLakeSettings.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API GetDataLakeSettingsResult
{
public:
GetDataLakeSettingsResult();
GetDataLakeSettingsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetDataLakeSettingsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline const DataLakeSettings& GetDataLakeSettings() const{ return m_dataLakeSettings; }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline void SetDataLakeSettings(const DataLakeSettings& value) { m_dataLakeSettings = value; }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline void SetDataLakeSettings(DataLakeSettings&& value) { m_dataLakeSettings = std::move(value); }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline GetDataLakeSettingsResult& WithDataLakeSettings(const DataLakeSettings& value) { SetDataLakeSettings(value); return *this;}
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline GetDataLakeSettingsResult& WithDataLakeSettings(DataLakeSettings&& value) { SetDataLakeSettings(std::move(value)); return *this;}
private:
DataLakeSettings m_dataLakeSettings;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,237 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API GetEffectivePermissionsForPathRequest : public LakeFormationRequest
{
public:
GetEffectivePermissionsForPathRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetEffectivePermissionsForPath"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetEffectivePermissionsForPathRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetEffectivePermissionsForPathRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GetEffectivePermissionsForPathRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource for which you want to get
* permissions.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return.</p>
*/
inline GetEffectivePermissionsForPathRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,131 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/PrincipalResourcePermissions.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API GetEffectivePermissionsForPathResult
{
public:
GetEffectivePermissionsForPathResult();
GetEffectivePermissionsForPathResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetEffectivePermissionsForPathResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline const Aws::Vector<PrincipalResourcePermissions>& GetPermissions() const{ return m_permissions; }
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline void SetPermissions(const Aws::Vector<PrincipalResourcePermissions>& value) { m_permissions = value; }
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline void SetPermissions(Aws::Vector<PrincipalResourcePermissions>&& value) { m_permissions = std::move(value); }
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline GetEffectivePermissionsForPathResult& WithPermissions(const Aws::Vector<PrincipalResourcePermissions>& value) { SetPermissions(value); return *this;}
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline GetEffectivePermissionsForPathResult& WithPermissions(Aws::Vector<PrincipalResourcePermissions>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline GetEffectivePermissionsForPathResult& AddPermissions(const PrincipalResourcePermissions& value) { m_permissions.push_back(value); return *this; }
/**
* <p>A list of the permissions for the specified table or database resource
* located at the path in Amazon S3.</p>
*/
inline GetEffectivePermissionsForPathResult& AddPermissions(PrincipalResourcePermissions&& value) { m_permissions.push_back(std::move(value)); return *this; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline GetEffectivePermissionsForPathResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<PrincipalResourcePermissions> m_permissions;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,347 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/Resource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/Permission.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API GrantPermissionsRequest : public LakeFormationRequest
{
public:
GrantPermissionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GrantPermissions"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GrantPermissionsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GrantPermissionsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline GrantPermissionsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline GrantPermissionsRequest& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>The principal to be granted the permissions on the resource. Supported
* principals are IAM users or IAM roles, and they are defined by their principal
* type and their ARN.</p> <p>Note that if you define a resource with a particular
* ARN, then later delete, and recreate a resource with that same ARN, the resource
* maintains the permissions already granted. </p>
*/
inline GrantPermissionsRequest& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline const Resource& GetResource() const{ return m_resource; }
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline GrantPermissionsRequest& WithResource(const Resource& value) { SetResource(value); return *this;}
/**
* <p>The resource to which permissions are to be granted. Resources in AWS Lake
* Formation are the Data Catalog, databases, and tables.</p>
*/
inline GrantPermissionsRequest& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline const Aws::Vector<Permission>& GetPermissions() const{ return m_permissions; }
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline void SetPermissions(const Aws::Vector<Permission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline void SetPermissions(Aws::Vector<Permission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline GrantPermissionsRequest& WithPermissions(const Aws::Vector<Permission>& value) { SetPermissions(value); return *this;}
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline GrantPermissionsRequest& WithPermissions(Aws::Vector<Permission>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline GrantPermissionsRequest& AddPermissions(const Permission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
/**
* <p>The permissions granted to the principal on the resource. AWS Lake Formation
* defines privileges to grant and revoke access to metadata in the Data Catalog
* and data organized in underlying data storage such as Amazon S3. AWS Lake
* Formation requires that each principal be authorized to perform a specific task
* on AWS Lake Formation resources. </p>
*/
inline GrantPermissionsRequest& AddPermissions(Permission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline const Aws::Vector<Permission>& GetPermissionsWithGrantOption() const{ return m_permissionsWithGrantOption; }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline bool PermissionsWithGrantOptionHasBeenSet() const { return m_permissionsWithGrantOptionHasBeenSet; }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline void SetPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = value; }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline void SetPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = std::move(value); }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline GrantPermissionsRequest& WithPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { SetPermissionsWithGrantOption(value); return *this;}
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline GrantPermissionsRequest& WithPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { SetPermissionsWithGrantOption(std::move(value)); return *this;}
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline GrantPermissionsRequest& AddPermissionsWithGrantOption(const Permission& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(value); return *this; }
/**
* <p>Indicates a list of the granted permissions that the principal may pass to
* other users. These permissions may only be a subset of the permissions granted
* in the <code>Privileges</code>.</p>
*/
inline GrantPermissionsRequest& AddPermissionsWithGrantOption(Permission&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(std::move(value)); return *this; }
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
Resource m_resource;
bool m_resourceHasBeenSet;
Aws::Vector<Permission> m_permissions;
bool m_permissionsHasBeenSet;
Aws::Vector<Permission> m_permissionsWithGrantOption;
bool m_permissionsWithGrantOptionHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API GrantPermissionsResult
{
public:
GrantPermissionsResult();
GrantPermissionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GrantPermissionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,308 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/DataLakeResourceType.h>
#include <aws/lakeformation/model/Resource.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API ListPermissionsRequest : public LakeFormationRequest
{
public:
ListPermissionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListPermissions"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline ListPermissionsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline ListPermissionsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline ListPermissionsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline ListPermissionsRequest& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>Specifies a principal to filter the permissions returned.</p>
*/
inline ListPermissionsRequest& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline const DataLakeResourceType& GetResourceType() const{ return m_resourceType; }
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline void SetResourceType(const DataLakeResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline void SetResourceType(DataLakeResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline ListPermissionsRequest& WithResourceType(const DataLakeResourceType& value) { SetResourceType(value); return *this;}
/**
* <p>Specifies a resource type to filter the permissions returned.</p>
*/
inline ListPermissionsRequest& WithResourceType(DataLakeResourceType&& value) { SetResourceType(std::move(value)); return *this;}
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline const Resource& GetResource() const{ return m_resource; }
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline ListPermissionsRequest& WithResource(const Resource& value) { SetResource(value); return *this;}
/**
* <p>A resource where you will get a list of the principal permissions.</p>
* <p>This operation does not support getting privileges on a table with columns.
* Instead, call this operation on the table, and the operation returns the table
* and the table w columns.</p>
*/
inline ListPermissionsRequest& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return.</p>
*/
inline ListPermissionsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
DataLakeResourceType m_resourceType;
bool m_resourceTypeHasBeenSet;
Resource m_resource;
bool m_resourceHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,131 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/PrincipalResourcePermissions.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API ListPermissionsResult
{
public:
ListPermissionsResult();
ListPermissionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListPermissionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline const Aws::Vector<PrincipalResourcePermissions>& GetPrincipalResourcePermissions() const{ return m_principalResourcePermissions; }
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline void SetPrincipalResourcePermissions(const Aws::Vector<PrincipalResourcePermissions>& value) { m_principalResourcePermissions = value; }
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline void SetPrincipalResourcePermissions(Aws::Vector<PrincipalResourcePermissions>&& value) { m_principalResourcePermissions = std::move(value); }
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline ListPermissionsResult& WithPrincipalResourcePermissions(const Aws::Vector<PrincipalResourcePermissions>& value) { SetPrincipalResourcePermissions(value); return *this;}
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline ListPermissionsResult& WithPrincipalResourcePermissions(Aws::Vector<PrincipalResourcePermissions>&& value) { SetPrincipalResourcePermissions(std::move(value)); return *this;}
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline ListPermissionsResult& AddPrincipalResourcePermissions(const PrincipalResourcePermissions& value) { m_principalResourcePermissions.push_back(value); return *this; }
/**
* <p>A list of principals and their permissions on the resource for the specified
* principal and resource types.</p>
*/
inline ListPermissionsResult& AddPrincipalResourcePermissions(PrincipalResourcePermissions&& value) { m_principalResourcePermissions.push_back(std::move(value)); return *this; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve this
* list.</p>
*/
inline ListPermissionsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<PrincipalResourcePermissions> m_principalResourcePermissions;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,171 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/FilterCondition.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API ListResourcesRequest : public LakeFormationRequest
{
public:
ListResourcesRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListResources"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline const Aws::Vector<FilterCondition>& GetFilterConditionList() const{ return m_filterConditionList; }
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline bool FilterConditionListHasBeenSet() const { return m_filterConditionListHasBeenSet; }
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline void SetFilterConditionList(const Aws::Vector<FilterCondition>& value) { m_filterConditionListHasBeenSet = true; m_filterConditionList = value; }
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline void SetFilterConditionList(Aws::Vector<FilterCondition>&& value) { m_filterConditionListHasBeenSet = true; m_filterConditionList = std::move(value); }
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline ListResourcesRequest& WithFilterConditionList(const Aws::Vector<FilterCondition>& value) { SetFilterConditionList(value); return *this;}
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline ListResourcesRequest& WithFilterConditionList(Aws::Vector<FilterCondition>&& value) { SetFilterConditionList(std::move(value)); return *this;}
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline ListResourcesRequest& AddFilterConditionList(const FilterCondition& value) { m_filterConditionListHasBeenSet = true; m_filterConditionList.push_back(value); return *this; }
/**
* <p>Any applicable row-level and/or column-level filtering conditions for the
* resources.</p>
*/
inline ListResourcesRequest& AddFilterConditionList(FilterCondition&& value) { m_filterConditionListHasBeenSet = true; m_filterConditionList.push_back(std::move(value)); return *this; }
/**
* <p>The maximum number of resource results.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of resource results.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of resource results.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of resource results.</p>
*/
inline ListResourcesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<FilterCondition> m_filterConditionList;
bool m_filterConditionListHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/ResourceInfo.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API ListResourcesResult
{
public:
ListResourcesResult();
ListResourcesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListResourcesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A summary of the data lake resources.</p>
*/
inline const Aws::Vector<ResourceInfo>& GetResourceInfoList() const{ return m_resourceInfoList; }
/**
* <p>A summary of the data lake resources.</p>
*/
inline void SetResourceInfoList(const Aws::Vector<ResourceInfo>& value) { m_resourceInfoList = value; }
/**
* <p>A summary of the data lake resources.</p>
*/
inline void SetResourceInfoList(Aws::Vector<ResourceInfo>&& value) { m_resourceInfoList = std::move(value); }
/**
* <p>A summary of the data lake resources.</p>
*/
inline ListResourcesResult& WithResourceInfoList(const Aws::Vector<ResourceInfo>& value) { SetResourceInfoList(value); return *this;}
/**
* <p>A summary of the data lake resources.</p>
*/
inline ListResourcesResult& WithResourceInfoList(Aws::Vector<ResourceInfo>&& value) { SetResourceInfoList(std::move(value)); return *this;}
/**
* <p>A summary of the data lake resources.</p>
*/
inline ListResourcesResult& AddResourceInfoList(const ResourceInfo& value) { m_resourceInfoList.push_back(value); return *this; }
/**
* <p>A summary of the data lake resources.</p>
*/
inline ListResourcesResult& AddResourceInfoList(ResourceInfo&& value) { m_resourceInfoList.push_back(std::move(value)); return *this; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A continuation token, if this is not the first call to retrieve these
* resources.</p>
*/
inline ListResourcesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<ResourceInfo> m_resourceInfoList;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,39 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
enum class Permission
{
NOT_SET,
ALL,
SELECT,
ALTER,
DROP,
DELETE_,
INSERT,
DESCRIBE,
CREATE_DATABASE,
CREATE_TABLE,
DATA_LOCATION_ACCESS
};
namespace PermissionMapper
{
AWS_LAKEFORMATION_API Permission GetPermissionForName(const Aws::String& name);
AWS_LAKEFORMATION_API Aws::String GetNameForPermission(Permission value);
} // namespace PermissionMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/Permission.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>Permissions granted to a principal.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PrincipalPermissions">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API PrincipalPermissions
{
public:
PrincipalPermissions();
PrincipalPermissions(Aws::Utils::Json::JsonView jsonValue);
PrincipalPermissions& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The principal who is granted permissions.</p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>The principal who is granted permissions.</p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>The principal who is granted permissions.</p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>The principal who is granted permissions.</p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>The principal who is granted permissions.</p>
*/
inline PrincipalPermissions& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>The principal who is granted permissions.</p>
*/
inline PrincipalPermissions& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline const Aws::Vector<Permission>& GetPermissions() const{ return m_permissions; }
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline void SetPermissions(const Aws::Vector<Permission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline void SetPermissions(Aws::Vector<Permission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline PrincipalPermissions& WithPermissions(const Aws::Vector<Permission>& value) { SetPermissions(value); return *this;}
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline PrincipalPermissions& WithPermissions(Aws::Vector<Permission>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline PrincipalPermissions& AddPermissions(const Permission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
/**
* <p>The permissions that are granted to the principal.</p>
*/
inline PrincipalPermissions& AddPermissions(Permission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
private:
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
Aws::Vector<Permission> m_permissions;
bool m_permissionsHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,259 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/Resource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/DetailsMap.h>
#include <aws/lakeformation/model/Permission.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>The permissions granted or revoked on a resource.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PrincipalResourcePermissions">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API PrincipalResourcePermissions
{
public:
PrincipalResourcePermissions();
PrincipalResourcePermissions(Aws::Utils::Json::JsonView jsonValue);
PrincipalResourcePermissions& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline PrincipalResourcePermissions& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>The Data Lake principal to be granted or revoked permissions.</p>
*/
inline PrincipalResourcePermissions& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline const Resource& GetResource() const{ return m_resource; }
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline PrincipalResourcePermissions& WithResource(const Resource& value) { SetResource(value); return *this;}
/**
* <p>The resource where permissions are to be granted or revoked.</p>
*/
inline PrincipalResourcePermissions& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline const Aws::Vector<Permission>& GetPermissions() const{ return m_permissions; }
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline void SetPermissions(const Aws::Vector<Permission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline void SetPermissions(Aws::Vector<Permission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline PrincipalResourcePermissions& WithPermissions(const Aws::Vector<Permission>& value) { SetPermissions(value); return *this;}
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline PrincipalResourcePermissions& WithPermissions(Aws::Vector<Permission>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline PrincipalResourcePermissions& AddPermissions(const Permission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
/**
* <p>The permissions to be granted or revoked on the resource.</p>
*/
inline PrincipalResourcePermissions& AddPermissions(Permission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline const Aws::Vector<Permission>& GetPermissionsWithGrantOption() const{ return m_permissionsWithGrantOption; }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline bool PermissionsWithGrantOptionHasBeenSet() const { return m_permissionsWithGrantOptionHasBeenSet; }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline void SetPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = value; }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline void SetPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = std::move(value); }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline PrincipalResourcePermissions& WithPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { SetPermissionsWithGrantOption(value); return *this;}
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline PrincipalResourcePermissions& WithPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { SetPermissionsWithGrantOption(std::move(value)); return *this;}
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline PrincipalResourcePermissions& AddPermissionsWithGrantOption(const Permission& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(value); return *this; }
/**
* <p>Indicates whether to grant the ability to grant permissions (as a subset of
* permissions granted).</p>
*/
inline PrincipalResourcePermissions& AddPermissionsWithGrantOption(Permission&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(std::move(value)); return *this; }
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline const DetailsMap& GetAdditionalDetails() const{ return m_additionalDetails; }
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline bool AdditionalDetailsHasBeenSet() const { return m_additionalDetailsHasBeenSet; }
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline void SetAdditionalDetails(const DetailsMap& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails = value; }
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline void SetAdditionalDetails(DetailsMap&& value) { m_additionalDetailsHasBeenSet = true; m_additionalDetails = std::move(value); }
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline PrincipalResourcePermissions& WithAdditionalDetails(const DetailsMap& value) { SetAdditionalDetails(value); return *this;}
/**
* <p>This attribute can be used to return any additional details of
* <code>PrincipalResourcePermissions</code>. Currently returns only as a RAM share
* resource ARN.</p>
*/
inline PrincipalResourcePermissions& WithAdditionalDetails(DetailsMap&& value) { SetAdditionalDetails(std::move(value)); return *this;}
private:
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
Resource m_resource;
bool m_resourceHasBeenSet;
Aws::Vector<Permission> m_permissions;
bool m_permissionsHasBeenSet;
Aws::Vector<Permission> m_permissionsWithGrantOption;
bool m_permissionsWithGrantOptionHasBeenSet;
DetailsMap m_additionalDetails;
bool m_additionalDetailsHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,150 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/DataLakeSettings.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API PutDataLakeSettingsRequest : public LakeFormationRequest
{
public:
PutDataLakeSettingsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "PutDataLakeSettings"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline PutDataLakeSettingsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline PutDataLakeSettingsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline PutDataLakeSettingsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline const DataLakeSettings& GetDataLakeSettings() const{ return m_dataLakeSettings; }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline bool DataLakeSettingsHasBeenSet() const { return m_dataLakeSettingsHasBeenSet; }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline void SetDataLakeSettings(const DataLakeSettings& value) { m_dataLakeSettingsHasBeenSet = true; m_dataLakeSettings = value; }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline void SetDataLakeSettings(DataLakeSettings&& value) { m_dataLakeSettingsHasBeenSet = true; m_dataLakeSettings = std::move(value); }
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline PutDataLakeSettingsRequest& WithDataLakeSettings(const DataLakeSettings& value) { SetDataLakeSettings(value); return *this;}
/**
* <p>A structure representing a list of AWS Lake Formation principals designated
* as data lake administrators.</p>
*/
inline PutDataLakeSettingsRequest& WithDataLakeSettings(DataLakeSettings&& value) { SetDataLakeSettings(std::move(value)); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
DataLakeSettings m_dataLakeSettings;
bool m_dataLakeSettingsHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API PutDataLakeSettingsResult
{
public:
PutDataLakeSettingsResult();
PutDataLakeSettingsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
PutDataLakeSettingsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,173 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API RegisterResourceRequest : public LakeFormationRequest
{
public:
RegisterResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "RegisterResource"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline RegisterResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline RegisterResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource that you want to register.</p>
*/
inline RegisterResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
/**
* <p>Designates an AWS Identity and Access Management (IAM) service-linked role by
* registering this role with the Data Catalog. A service-linked role is a unique
* type of IAM role that is linked directly to Lake Formation.</p> <p>For more
* information, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/service-linked-roles.html">Using
* Service-Linked Roles for Lake Formation</a>.</p>
*/
inline bool GetUseServiceLinkedRole() const{ return m_useServiceLinkedRole; }
/**
* <p>Designates an AWS Identity and Access Management (IAM) service-linked role by
* registering this role with the Data Catalog. A service-linked role is a unique
* type of IAM role that is linked directly to Lake Formation.</p> <p>For more
* information, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/service-linked-roles.html">Using
* Service-Linked Roles for Lake Formation</a>.</p>
*/
inline bool UseServiceLinkedRoleHasBeenSet() const { return m_useServiceLinkedRoleHasBeenSet; }
/**
* <p>Designates an AWS Identity and Access Management (IAM) service-linked role by
* registering this role with the Data Catalog. A service-linked role is a unique
* type of IAM role that is linked directly to Lake Formation.</p> <p>For more
* information, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/service-linked-roles.html">Using
* Service-Linked Roles for Lake Formation</a>.</p>
*/
inline void SetUseServiceLinkedRole(bool value) { m_useServiceLinkedRoleHasBeenSet = true; m_useServiceLinkedRole = value; }
/**
* <p>Designates an AWS Identity and Access Management (IAM) service-linked role by
* registering this role with the Data Catalog. A service-linked role is a unique
* type of IAM role that is linked directly to Lake Formation.</p> <p>For more
* information, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/service-linked-roles.html">Using
* Service-Linked Roles for Lake Formation</a>.</p>
*/
inline RegisterResourceRequest& WithUseServiceLinkedRole(bool value) { SetUseServiceLinkedRole(value); return *this;}
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline RegisterResourceRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline RegisterResourceRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
/**
* <p>The identifier for the role that registers the resource.</p>
*/
inline RegisterResourceRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
bool m_useServiceLinkedRole;
bool m_useServiceLinkedRoleHasBeenSet;
Aws::String m_roleArn;
bool m_roleArnHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API RegisterResourceResult
{
public:
RegisterResourceResult();
RegisterResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
RegisterResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,272 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/model/CatalogResource.h>
#include <aws/lakeformation/model/DatabaseResource.h>
#include <aws/lakeformation/model/TableResource.h>
#include <aws/lakeformation/model/TableWithColumnsResource.h>
#include <aws/lakeformation/model/DataLocationResource.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for the resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/Resource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API Resource
{
public:
Resource();
Resource(Aws::Utils::Json::JsonView jsonValue);
Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const CatalogResource& GetCatalog() const{ return m_catalog; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogHasBeenSet() const { return m_catalogHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalog(const CatalogResource& value) { m_catalogHasBeenSet = true; m_catalog = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalog(CatalogResource&& value) { m_catalogHasBeenSet = true; m_catalog = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline Resource& WithCatalog(const CatalogResource& value) { SetCatalog(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline Resource& WithCatalog(CatalogResource&& value) { SetCatalog(std::move(value)); return *this;}
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline const DatabaseResource& GetDatabase() const{ return m_database; }
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline bool DatabaseHasBeenSet() const { return m_databaseHasBeenSet; }
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline void SetDatabase(const DatabaseResource& value) { m_databaseHasBeenSet = true; m_database = value; }
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline void SetDatabase(DatabaseResource&& value) { m_databaseHasBeenSet = true; m_database = std::move(value); }
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline Resource& WithDatabase(const DatabaseResource& value) { SetDatabase(value); return *this;}
/**
* <p>The database for the resource. Unique to the Data Catalog. A database is a
* set of associated table definitions organized into a logical group. You can
* Grant and Revoke database permissions to a principal. </p>
*/
inline Resource& WithDatabase(DatabaseResource&& value) { SetDatabase(std::move(value)); return *this;}
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline const TableResource& GetTable() const{ return m_table; }
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline bool TableHasBeenSet() const { return m_tableHasBeenSet; }
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline void SetTable(const TableResource& value) { m_tableHasBeenSet = true; m_table = value; }
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline void SetTable(TableResource&& value) { m_tableHasBeenSet = true; m_table = std::move(value); }
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline Resource& WithTable(const TableResource& value) { SetTable(value); return *this;}
/**
* <p>The table for the resource. A table is a metadata definition that represents
* your data. You can Grant and Revoke table privileges to a principal. </p>
*/
inline Resource& WithTable(TableResource&& value) { SetTable(std::move(value)); return *this;}
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline const TableWithColumnsResource& GetTableWithColumns() const{ return m_tableWithColumns; }
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline bool TableWithColumnsHasBeenSet() const { return m_tableWithColumnsHasBeenSet; }
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline void SetTableWithColumns(const TableWithColumnsResource& value) { m_tableWithColumnsHasBeenSet = true; m_tableWithColumns = value; }
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline void SetTableWithColumns(TableWithColumnsResource&& value) { m_tableWithColumnsHasBeenSet = true; m_tableWithColumns = std::move(value); }
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline Resource& WithTableWithColumns(const TableWithColumnsResource& value) { SetTableWithColumns(value); return *this;}
/**
* <p>The table with columns for the resource. A principal with permissions to this
* resource can select metadata from the columns of a table in the Data Catalog and
* the underlying data in Amazon S3.</p>
*/
inline Resource& WithTableWithColumns(TableWithColumnsResource&& value) { SetTableWithColumns(std::move(value)); return *this;}
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline const DataLocationResource& GetDataLocation() const{ return m_dataLocation; }
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline bool DataLocationHasBeenSet() const { return m_dataLocationHasBeenSet; }
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline void SetDataLocation(const DataLocationResource& value) { m_dataLocationHasBeenSet = true; m_dataLocation = value; }
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline void SetDataLocation(DataLocationResource&& value) { m_dataLocationHasBeenSet = true; m_dataLocation = std::move(value); }
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline Resource& WithDataLocation(const DataLocationResource& value) { SetDataLocation(value); return *this;}
/**
* <p>The location of an Amazon S3 path where permissions are granted or revoked.
* </p>
*/
inline Resource& WithDataLocation(DataLocationResource&& value) { SetDataLocation(std::move(value)); return *this;}
private:
CatalogResource m_catalog;
bool m_catalogHasBeenSet;
DatabaseResource m_database;
bool m_databaseHasBeenSet;
TableResource m_table;
bool m_tableHasBeenSet;
TableWithColumnsResource m_tableWithColumns;
bool m_tableWithColumnsHasBeenSet;
DataLocationResource m_dataLocation;
bool m_dataLocationHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,168 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure containing information about an AWS Lake Formation
* resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ResourceInfo">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API ResourceInfo
{
public:
ResourceInfo();
ResourceInfo(Aws::Utils::Json::JsonView jsonValue);
ResourceInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ResourceInfo& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ResourceInfo& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ResourceInfo& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
/**
* <p>The IAM role that registered a resource.</p>
*/
inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
/**
* <p>The IAM role that registered a resource.</p>
*/
inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
/**
* <p>The IAM role that registered a resource.</p>
*/
inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
/**
* <p>The IAM role that registered a resource.</p>
*/
inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
/**
* <p>The IAM role that registered a resource.</p>
*/
inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
/**
* <p>The IAM role that registered a resource.</p>
*/
inline ResourceInfo& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
/**
* <p>The IAM role that registered a resource.</p>
*/
inline ResourceInfo& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
/**
* <p>The IAM role that registered a resource.</p>
*/
inline ResourceInfo& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
/**
* <p>The date and time the resource was last modified.</p>
*/
inline const Aws::Utils::DateTime& GetLastModified() const{ return m_lastModified; }
/**
* <p>The date and time the resource was last modified.</p>
*/
inline bool LastModifiedHasBeenSet() const { return m_lastModifiedHasBeenSet; }
/**
* <p>The date and time the resource was last modified.</p>
*/
inline void SetLastModified(const Aws::Utils::DateTime& value) { m_lastModifiedHasBeenSet = true; m_lastModified = value; }
/**
* <p>The date and time the resource was last modified.</p>
*/
inline void SetLastModified(Aws::Utils::DateTime&& value) { m_lastModifiedHasBeenSet = true; m_lastModified = std::move(value); }
/**
* <p>The date and time the resource was last modified.</p>
*/
inline ResourceInfo& WithLastModified(const Aws::Utils::DateTime& value) { SetLastModified(value); return *this;}
/**
* <p>The date and time the resource was last modified.</p>
*/
inline ResourceInfo& WithLastModified(Aws::Utils::DateTime&& value) { SetLastModified(std::move(value)); return *this;}
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
Aws::String m_roleArn;
bool m_roleArnHasBeenSet;
Aws::Utils::DateTime m_lastModified;
bool m_lastModifiedHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,301 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/lakeformation/model/Resource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/Permission.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API RevokePermissionsRequest : public LakeFormationRequest
{
public:
RevokePermissionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "RevokePermissions"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline RevokePermissionsRequest& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline RevokePermissionsRequest& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, the account ID. The Data
* Catalog is the persistent metadata store. It contains database definitions,
* table definitions, and other control information to manage your AWS Lake
* Formation environment. </p>
*/
inline RevokePermissionsRequest& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline const DataLakePrincipal& GetPrincipal() const{ return m_principal; }
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline void SetPrincipal(const DataLakePrincipal& value) { m_principalHasBeenSet = true; m_principal = value; }
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline void SetPrincipal(DataLakePrincipal&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline RevokePermissionsRequest& WithPrincipal(const DataLakePrincipal& value) { SetPrincipal(value); return *this;}
/**
* <p>The principal to be revoked permissions on the resource.</p>
*/
inline RevokePermissionsRequest& WithPrincipal(DataLakePrincipal&& value) { SetPrincipal(std::move(value)); return *this;}
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline const Resource& GetResource() const{ return m_resource; }
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline RevokePermissionsRequest& WithResource(const Resource& value) { SetResource(value); return *this;}
/**
* <p>The resource to which permissions are to be revoked.</p>
*/
inline RevokePermissionsRequest& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline const Aws::Vector<Permission>& GetPermissions() const{ return m_permissions; }
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline bool PermissionsHasBeenSet() const { return m_permissionsHasBeenSet; }
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline void SetPermissions(const Aws::Vector<Permission>& value) { m_permissionsHasBeenSet = true; m_permissions = value; }
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline void SetPermissions(Aws::Vector<Permission>&& value) { m_permissionsHasBeenSet = true; m_permissions = std::move(value); }
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline RevokePermissionsRequest& WithPermissions(const Aws::Vector<Permission>& value) { SetPermissions(value); return *this;}
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline RevokePermissionsRequest& WithPermissions(Aws::Vector<Permission>&& value) { SetPermissions(std::move(value)); return *this;}
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline RevokePermissionsRequest& AddPermissions(const Permission& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(value); return *this; }
/**
* <p>The permissions revoked to the principal on the resource. For information
* about permissions, see <a
* href="https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html">Security
* and Access Control to Metadata and Data</a>.</p>
*/
inline RevokePermissionsRequest& AddPermissions(Permission&& value) { m_permissionsHasBeenSet = true; m_permissions.push_back(std::move(value)); return *this; }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline const Aws::Vector<Permission>& GetPermissionsWithGrantOption() const{ return m_permissionsWithGrantOption; }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline bool PermissionsWithGrantOptionHasBeenSet() const { return m_permissionsWithGrantOptionHasBeenSet; }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline void SetPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = value; }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline void SetPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption = std::move(value); }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline RevokePermissionsRequest& WithPermissionsWithGrantOption(const Aws::Vector<Permission>& value) { SetPermissionsWithGrantOption(value); return *this;}
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline RevokePermissionsRequest& WithPermissionsWithGrantOption(Aws::Vector<Permission>&& value) { SetPermissionsWithGrantOption(std::move(value)); return *this;}
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline RevokePermissionsRequest& AddPermissionsWithGrantOption(const Permission& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(value); return *this; }
/**
* <p>Indicates a list of permissions for which to revoke the grant option allowing
* the principal to pass permissions to other principals.</p>
*/
inline RevokePermissionsRequest& AddPermissionsWithGrantOption(Permission&& value) { m_permissionsWithGrantOptionHasBeenSet = true; m_permissionsWithGrantOption.push_back(std::move(value)); return *this; }
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
DataLakePrincipal m_principal;
bool m_principalHasBeenSet;
Resource m_resource;
bool m_resourceHasBeenSet;
Aws::Vector<Permission> m_permissions;
bool m_permissionsHasBeenSet;
Aws::Vector<Permission> m_permissionsWithGrantOption;
bool m_permissionsWithGrantOptionHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API RevokePermissionsResult
{
public:
RevokePermissionsResult();
RevokePermissionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
RevokePermissionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,249 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/lakeformation/model/TableWildcard.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for the table object. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/TableResource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API TableResource
{
public:
TableResource();
TableResource(Aws::Utils::Json::JsonView jsonValue);
TableResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableResource& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableResource& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableResource& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline const Aws::String& GetDatabaseName() const{ return m_databaseName; }
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; }
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); }
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); }
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline TableResource& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;}
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline TableResource& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;}
/**
* <p>The name of the database for the table. Unique to a Data Catalog. A database
* is a set of associated table definitions organized into a logical group. You can
* Grant and Revoke database privileges to a principal. </p>
*/
inline TableResource& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;}
/**
* <p>The name of the table.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the table.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the table.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the table.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the table.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the table.</p>
*/
inline TableResource& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the table.</p>
*/
inline TableResource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the table.</p>
*/
inline TableResource& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline const TableWildcard& GetTableWildcard() const{ return m_tableWildcard; }
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline bool TableWildcardHasBeenSet() const { return m_tableWildcardHasBeenSet; }
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline void SetTableWildcard(const TableWildcard& value) { m_tableWildcardHasBeenSet = true; m_tableWildcard = value; }
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline void SetTableWildcard(TableWildcard&& value) { m_tableWildcardHasBeenSet = true; m_tableWildcard = std::move(value); }
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline TableResource& WithTableWildcard(const TableWildcard& value) { SetTableWildcard(value); return *this;}
/**
* <p>A wildcard object representing every table under a database.</p> <p>At least
* one of <code>TableResource$Name</code> or
* <code>TableResource$TableWildcard</code> is required.</p>
*/
inline TableResource& WithTableWildcard(TableWildcard&& value) { SetTableWildcard(std::move(value)); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::String m_databaseName;
bool m_databaseNameHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
TableWildcard m_tableWildcard;
bool m_tableWildcardHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A wildcard object representing every table under a database.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/TableWildcard">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API TableWildcard
{
public:
TableWildcard();
TableWildcard(Aws::Utils::Json::JsonView jsonValue);
TableWildcard& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,327 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lakeformation/model/ColumnWildcard.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
/**
* <p>A structure for a table with columns object. This object is only used when
* granting a SELECT permission.</p> <p>This object must take a value for at least
* one of <code>ColumnsNames</code>, <code>ColumnsIndexes</code>, or
* <code>ColumnsWildcard</code>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/TableWithColumnsResource">AWS
* API Reference</a></p>
*/
class AWS_LAKEFORMATION_API TableWithColumnsResource
{
public:
TableWithColumnsResource();
TableWithColumnsResource(Aws::Utils::Json::JsonView jsonValue);
TableWithColumnsResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline const Aws::String& GetCatalogId() const{ return m_catalogId; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline bool CatalogIdHasBeenSet() const { return m_catalogIdHasBeenSet; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const Aws::String& value) { m_catalogIdHasBeenSet = true; m_catalogId = value; }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(Aws::String&& value) { m_catalogIdHasBeenSet = true; m_catalogId = std::move(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline void SetCatalogId(const char* value) { m_catalogIdHasBeenSet = true; m_catalogId.assign(value); }
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableWithColumnsResource& WithCatalogId(const Aws::String& value) { SetCatalogId(value); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableWithColumnsResource& WithCatalogId(Aws::String&& value) { SetCatalogId(std::move(value)); return *this;}
/**
* <p>The identifier for the Data Catalog. By default, it is the account ID of the
* caller.</p>
*/
inline TableWithColumnsResource& WithCatalogId(const char* value) { SetCatalogId(value); return *this;}
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline const Aws::String& GetDatabaseName() const{ return m_databaseName; }
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline bool DatabaseNameHasBeenSet() const { return m_databaseNameHasBeenSet; }
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline void SetDatabaseName(const Aws::String& value) { m_databaseNameHasBeenSet = true; m_databaseName = value; }
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline void SetDatabaseName(Aws::String&& value) { m_databaseNameHasBeenSet = true; m_databaseName = std::move(value); }
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline void SetDatabaseName(const char* value) { m_databaseNameHasBeenSet = true; m_databaseName.assign(value); }
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithDatabaseName(const Aws::String& value) { SetDatabaseName(value); return *this;}
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithDatabaseName(Aws::String&& value) { SetDatabaseName(std::move(value)); return *this;}
/**
* <p>The name of the database for the table with columns resource. Unique to the
* Data Catalog. A database is a set of associated table definitions organized into
* a logical group. You can Grant and Revoke database privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithDatabaseName(const char* value) { SetDatabaseName(value); return *this;}
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the table resource. A table is a metadata definition that
* represents your data. You can Grant and Revoke table privileges to a principal.
* </p>
*/
inline TableWithColumnsResource& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline const Aws::Vector<Aws::String>& GetColumnNames() const{ return m_columnNames; }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline bool ColumnNamesHasBeenSet() const { return m_columnNamesHasBeenSet; }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline void SetColumnNames(const Aws::Vector<Aws::String>& value) { m_columnNamesHasBeenSet = true; m_columnNames = value; }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline void SetColumnNames(Aws::Vector<Aws::String>&& value) { m_columnNamesHasBeenSet = true; m_columnNames = std::move(value); }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& WithColumnNames(const Aws::Vector<Aws::String>& value) { SetColumnNames(value); return *this;}
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& WithColumnNames(Aws::Vector<Aws::String>&& value) { SetColumnNames(std::move(value)); return *this;}
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& AddColumnNames(const Aws::String& value) { m_columnNamesHasBeenSet = true; m_columnNames.push_back(value); return *this; }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& AddColumnNames(Aws::String&& value) { m_columnNamesHasBeenSet = true; m_columnNames.push_back(std::move(value)); return *this; }
/**
* <p>The list of column names for the table. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& AddColumnNames(const char* value) { m_columnNamesHasBeenSet = true; m_columnNames.push_back(value); return *this; }
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline const ColumnWildcard& GetColumnWildcard() const{ return m_columnWildcard; }
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline bool ColumnWildcardHasBeenSet() const { return m_columnWildcardHasBeenSet; }
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline void SetColumnWildcard(const ColumnWildcard& value) { m_columnWildcardHasBeenSet = true; m_columnWildcard = value; }
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline void SetColumnWildcard(ColumnWildcard&& value) { m_columnWildcardHasBeenSet = true; m_columnWildcard = std::move(value); }
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& WithColumnWildcard(const ColumnWildcard& value) { SetColumnWildcard(value); return *this;}
/**
* <p>A wildcard specified by a <code>ColumnWildcard</code> object. At least one of
* <code>ColumnNames</code> or <code>ColumnWildcard</code> is required.</p>
*/
inline TableWithColumnsResource& WithColumnWildcard(ColumnWildcard&& value) { SetColumnWildcard(std::move(value)); return *this;}
private:
Aws::String m_catalogId;
bool m_catalogIdHasBeenSet;
Aws::String m_databaseName;
bool m_databaseNameHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_columnNames;
bool m_columnNamesHasBeenSet;
ColumnWildcard m_columnWildcard;
bool m_columnWildcardHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,137 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/lakeformation/LakeFormationRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
/**
*/
class AWS_LAKEFORMATION_API UpdateResourceRequest : public LakeFormationRequest
{
public:
UpdateResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateResource"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline UpdateResourceRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline UpdateResourceRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
/**
* <p>The new role to use for the given resource registered in AWS Lake
* Formation.</p>
*/
inline UpdateResourceRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
/**
* <p>The resource ARN.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The resource ARN.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The resource ARN.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The resource ARN.</p>
*/
inline UpdateResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The resource ARN.</p>
*/
inline UpdateResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The resource ARN.</p>
*/
inline UpdateResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
private:
Aws::String m_roleArn;
bool m_roleArnHasBeenSet;
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace LakeFormation
{
namespace Model
{
class AWS_LAKEFORMATION_API UpdateResourceResult
{
public:
UpdateResourceResult();
UpdateResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
UpdateResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,460 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/lakeformation/LakeFormationClient.h>
#include <aws/lakeformation/LakeFormationEndpoint.h>
#include <aws/lakeformation/LakeFormationErrorMarshaller.h>
#include <aws/lakeformation/model/BatchGrantPermissionsRequest.h>
#include <aws/lakeformation/model/BatchRevokePermissionsRequest.h>
#include <aws/lakeformation/model/DeregisterResourceRequest.h>
#include <aws/lakeformation/model/DescribeResourceRequest.h>
#include <aws/lakeformation/model/GetDataLakeSettingsRequest.h>
#include <aws/lakeformation/model/GetEffectivePermissionsForPathRequest.h>
#include <aws/lakeformation/model/GrantPermissionsRequest.h>
#include <aws/lakeformation/model/ListPermissionsRequest.h>
#include <aws/lakeformation/model/ListResourcesRequest.h>
#include <aws/lakeformation/model/PutDataLakeSettingsRequest.h>
#include <aws/lakeformation/model/RegisterResourceRequest.h>
#include <aws/lakeformation/model/RevokePermissionsRequest.h>
#include <aws/lakeformation/model/UpdateResourceRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::LakeFormation;
using namespace Aws::LakeFormation::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "lakeformation";
static const char* ALLOCATION_TAG = "LakeFormationClient";
LakeFormationClient::LakeFormationClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<LakeFormationErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LakeFormationClient::LakeFormationClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<LakeFormationErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LakeFormationClient::LakeFormationClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<LakeFormationErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
LakeFormationClient::~LakeFormationClient()
{
}
void LakeFormationClient::init(const ClientConfiguration& config)
{
SetServiceClientName("LakeFormation");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + LakeFormationEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void LakeFormationClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
BatchGrantPermissionsOutcome LakeFormationClient::BatchGrantPermissions(const BatchGrantPermissionsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return BatchGrantPermissionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
BatchGrantPermissionsOutcomeCallable LakeFormationClient::BatchGrantPermissionsCallable(const BatchGrantPermissionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< BatchGrantPermissionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchGrantPermissions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::BatchGrantPermissionsAsync(const BatchGrantPermissionsRequest& request, const BatchGrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->BatchGrantPermissionsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::BatchGrantPermissionsAsyncHelper(const BatchGrantPermissionsRequest& request, const BatchGrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, BatchGrantPermissions(request), context);
}
BatchRevokePermissionsOutcome LakeFormationClient::BatchRevokePermissions(const BatchRevokePermissionsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return BatchRevokePermissionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
BatchRevokePermissionsOutcomeCallable LakeFormationClient::BatchRevokePermissionsCallable(const BatchRevokePermissionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< BatchRevokePermissionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchRevokePermissions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::BatchRevokePermissionsAsync(const BatchRevokePermissionsRequest& request, const BatchRevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->BatchRevokePermissionsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::BatchRevokePermissionsAsyncHelper(const BatchRevokePermissionsRequest& request, const BatchRevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, BatchRevokePermissions(request), context);
}
DeregisterResourceOutcome LakeFormationClient::DeregisterResource(const DeregisterResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DeregisterResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DeregisterResourceOutcomeCallable LakeFormationClient::DeregisterResourceCallable(const DeregisterResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeregisterResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeregisterResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::DeregisterResourceAsync(const DeregisterResourceRequest& request, const DeregisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeregisterResourceAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::DeregisterResourceAsyncHelper(const DeregisterResourceRequest& request, const DeregisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeregisterResource(request), context);
}
DescribeResourceOutcome LakeFormationClient::DescribeResource(const DescribeResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeResourceOutcomeCallable LakeFormationClient::DescribeResourceCallable(const DescribeResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::DescribeResourceAsync(const DescribeResourceRequest& request, const DescribeResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeResourceAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::DescribeResourceAsyncHelper(const DescribeResourceRequest& request, const DescribeResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeResource(request), context);
}
GetDataLakeSettingsOutcome LakeFormationClient::GetDataLakeSettings(const GetDataLakeSettingsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetDataLakeSettingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GetDataLakeSettingsOutcomeCallable LakeFormationClient::GetDataLakeSettingsCallable(const GetDataLakeSettingsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetDataLakeSettingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetDataLakeSettings(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::GetDataLakeSettingsAsync(const GetDataLakeSettingsRequest& request, const GetDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetDataLakeSettingsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::GetDataLakeSettingsAsyncHelper(const GetDataLakeSettingsRequest& request, const GetDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetDataLakeSettings(request), context);
}
GetEffectivePermissionsForPathOutcome LakeFormationClient::GetEffectivePermissionsForPath(const GetEffectivePermissionsForPathRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetEffectivePermissionsForPathOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GetEffectivePermissionsForPathOutcomeCallable LakeFormationClient::GetEffectivePermissionsForPathCallable(const GetEffectivePermissionsForPathRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetEffectivePermissionsForPathOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetEffectivePermissionsForPath(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::GetEffectivePermissionsForPathAsync(const GetEffectivePermissionsForPathRequest& request, const GetEffectivePermissionsForPathResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetEffectivePermissionsForPathAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::GetEffectivePermissionsForPathAsyncHelper(const GetEffectivePermissionsForPathRequest& request, const GetEffectivePermissionsForPathResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetEffectivePermissionsForPath(request), context);
}
GrantPermissionsOutcome LakeFormationClient::GrantPermissions(const GrantPermissionsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GrantPermissionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GrantPermissionsOutcomeCallable LakeFormationClient::GrantPermissionsCallable(const GrantPermissionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GrantPermissionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GrantPermissions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::GrantPermissionsAsync(const GrantPermissionsRequest& request, const GrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GrantPermissionsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::GrantPermissionsAsyncHelper(const GrantPermissionsRequest& request, const GrantPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GrantPermissions(request), context);
}
ListPermissionsOutcome LakeFormationClient::ListPermissions(const ListPermissionsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListPermissionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListPermissionsOutcomeCallable LakeFormationClient::ListPermissionsCallable(const ListPermissionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListPermissionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListPermissions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::ListPermissionsAsync(const ListPermissionsRequest& request, const ListPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListPermissionsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::ListPermissionsAsyncHelper(const ListPermissionsRequest& request, const ListPermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListPermissions(request), context);
}
ListResourcesOutcome LakeFormationClient::ListResources(const ListResourcesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return ListResourcesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListResourcesOutcomeCallable LakeFormationClient::ListResourcesCallable(const ListResourcesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListResourcesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListResources(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::ListResourcesAsync(const ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListResourcesAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::ListResourcesAsyncHelper(const ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListResources(request), context);
}
PutDataLakeSettingsOutcome LakeFormationClient::PutDataLakeSettings(const PutDataLakeSettingsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return PutDataLakeSettingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
PutDataLakeSettingsOutcomeCallable LakeFormationClient::PutDataLakeSettingsCallable(const PutDataLakeSettingsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< PutDataLakeSettingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutDataLakeSettings(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::PutDataLakeSettingsAsync(const PutDataLakeSettingsRequest& request, const PutDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->PutDataLakeSettingsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::PutDataLakeSettingsAsyncHelper(const PutDataLakeSettingsRequest& request, const PutDataLakeSettingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, PutDataLakeSettings(request), context);
}
RegisterResourceOutcome LakeFormationClient::RegisterResource(const RegisterResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return RegisterResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
RegisterResourceOutcomeCallable LakeFormationClient::RegisterResourceCallable(const RegisterResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< RegisterResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->RegisterResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::RegisterResourceAsync(const RegisterResourceRequest& request, const RegisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->RegisterResourceAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::RegisterResourceAsyncHelper(const RegisterResourceRequest& request, const RegisterResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, RegisterResource(request), context);
}
RevokePermissionsOutcome LakeFormationClient::RevokePermissions(const RevokePermissionsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return RevokePermissionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
RevokePermissionsOutcomeCallable LakeFormationClient::RevokePermissionsCallable(const RevokePermissionsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< RevokePermissionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->RevokePermissions(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::RevokePermissionsAsync(const RevokePermissionsRequest& request, const RevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->RevokePermissionsAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::RevokePermissionsAsyncHelper(const RevokePermissionsRequest& request, const RevokePermissionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, RevokePermissions(request), context);
}
UpdateResourceOutcome LakeFormationClient::UpdateResource(const UpdateResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UpdateResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UpdateResourceOutcomeCallable LakeFormationClient::UpdateResourceCallable(const UpdateResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void LakeFormationClient::UpdateResourceAsync(const UpdateResourceRequest& request, const UpdateResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateResourceAsyncHelper( request, handler, context ); } );
}
void LakeFormationClient::UpdateResourceAsyncHelper(const UpdateResourceRequest& request, const UpdateResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateResource(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/LakeFormationEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::LakeFormation;
namespace Aws
{
namespace LakeFormation
{
namespace LakeFormationEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "lakeformation" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace LakeFormationEndpoint
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/lakeformation/LakeFormationErrorMarshaller.h>
#include <aws/lakeformation/LakeFormationErrors.h>
using namespace Aws::Client;
using namespace Aws::LakeFormation;
AWSError<CoreErrors> LakeFormationErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = LakeFormationErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/lakeformation/LakeFormationErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::LakeFormation;
namespace Aws
{
namespace LakeFormation
{
namespace LakeFormationErrorMapper
{
static const int OPERATION_TIMEOUT_HASH = HashingUtils::HashString("OperationTimeoutException");
static const int CONCURRENT_MODIFICATION_HASH = HashingUtils::HashString("ConcurrentModificationException");
static const int ALREADY_EXISTS_HASH = HashingUtils::HashString("AlreadyExistsException");
static const int INVALID_INPUT_HASH = HashingUtils::HashString("InvalidInputException");
static const int INTERNAL_SERVICE_HASH = HashingUtils::HashString("InternalServiceException");
static const int ENTITY_NOT_FOUND_HASH = HashingUtils::HashString("EntityNotFoundException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == OPERATION_TIMEOUT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::OPERATION_TIMEOUT), false);
}
else if (hashCode == CONCURRENT_MODIFICATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::CONCURRENT_MODIFICATION), false);
}
else if (hashCode == ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::ALREADY_EXISTS), false);
}
else if (hashCode == INVALID_INPUT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::INVALID_INPUT), false);
}
else if (hashCode == INTERNAL_SERVICE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::INTERNAL_SERVICE), false);
}
else if (hashCode == ENTITY_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(LakeFormationErrors::ENTITY_NOT_FOUND), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace LakeFormationErrorMapper
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchGrantPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchGrantPermissionsRequest::BatchGrantPermissionsRequest() :
m_catalogIdHasBeenSet(false),
m_entriesHasBeenSet(false)
{
}
Aws::String BatchGrantPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_entriesHasBeenSet)
{
Array<JsonValue> entriesJsonList(m_entries.size());
for(unsigned entriesIndex = 0; entriesIndex < entriesJsonList.GetLength(); ++entriesIndex)
{
entriesJsonList[entriesIndex].AsObject(m_entries[entriesIndex].Jsonize());
}
payload.WithArray("Entries", std::move(entriesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchGrantPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.BatchGrantPermissions"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchGrantPermissionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchGrantPermissionsResult::BatchGrantPermissionsResult()
{
}
BatchGrantPermissionsResult::BatchGrantPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchGrantPermissionsResult& BatchGrantPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Failures"))
{
Array<JsonView> failuresJsonList = jsonValue.GetArray("Failures");
for(unsigned failuresIndex = 0; failuresIndex < failuresJsonList.GetLength(); ++failuresIndex)
{
m_failures.push_back(failuresJsonList[failuresIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchPermissionsFailureEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
BatchPermissionsFailureEntry::BatchPermissionsFailureEntry() :
m_requestEntryHasBeenSet(false),
m_errorHasBeenSet(false)
{
}
BatchPermissionsFailureEntry::BatchPermissionsFailureEntry(JsonView jsonValue) :
m_requestEntryHasBeenSet(false),
m_errorHasBeenSet(false)
{
*this = jsonValue;
}
BatchPermissionsFailureEntry& BatchPermissionsFailureEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("RequestEntry"))
{
m_requestEntry = jsonValue.GetObject("RequestEntry");
m_requestEntryHasBeenSet = true;
}
if(jsonValue.ValueExists("Error"))
{
m_error = jsonValue.GetObject("Error");
m_errorHasBeenSet = true;
}
return *this;
}
JsonValue BatchPermissionsFailureEntry::Jsonize() const
{
JsonValue payload;
if(m_requestEntryHasBeenSet)
{
payload.WithObject("RequestEntry", m_requestEntry.Jsonize());
}
if(m_errorHasBeenSet)
{
payload.WithObject("Error", m_error.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchPermissionsRequestEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
BatchPermissionsRequestEntry::BatchPermissionsRequestEntry() :
m_idHasBeenSet(false),
m_principalHasBeenSet(false),
m_resourceHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_permissionsWithGrantOptionHasBeenSet(false)
{
}
BatchPermissionsRequestEntry::BatchPermissionsRequestEntry(JsonView jsonValue) :
m_idHasBeenSet(false),
m_principalHasBeenSet(false),
m_resourceHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_permissionsWithGrantOptionHasBeenSet(false)
{
*this = jsonValue;
}
BatchPermissionsRequestEntry& BatchPermissionsRequestEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Id"))
{
m_id = jsonValue.GetString("Id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("Principal"))
{
m_principal = jsonValue.GetObject("Principal");
m_principalHasBeenSet = true;
}
if(jsonValue.ValueExists("Resource"))
{
m_resource = jsonValue.GetObject("Resource");
m_resourceHasBeenSet = true;
}
if(jsonValue.ValueExists("Permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("Permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(PermissionMapper::GetPermissionForName(permissionsJsonList[permissionsIndex].AsString()));
}
m_permissionsHasBeenSet = true;
}
if(jsonValue.ValueExists("PermissionsWithGrantOption"))
{
Array<JsonView> permissionsWithGrantOptionJsonList = jsonValue.GetArray("PermissionsWithGrantOption");
for(unsigned permissionsWithGrantOptionIndex = 0; permissionsWithGrantOptionIndex < permissionsWithGrantOptionJsonList.GetLength(); ++permissionsWithGrantOptionIndex)
{
m_permissionsWithGrantOption.push_back(PermissionMapper::GetPermissionForName(permissionsWithGrantOptionJsonList[permissionsWithGrantOptionIndex].AsString()));
}
m_permissionsWithGrantOptionHasBeenSet = true;
}
return *this;
}
JsonValue BatchPermissionsRequestEntry::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_principalHasBeenSet)
{
payload.WithObject("Principal", m_principal.Jsonize());
}
if(m_resourceHasBeenSet)
{
payload.WithObject("Resource", m_resource.Jsonize());
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(PermissionMapper::GetNameForPermission(m_permissions[permissionsIndex]));
}
payload.WithArray("Permissions", std::move(permissionsJsonList));
}
if(m_permissionsWithGrantOptionHasBeenSet)
{
Array<JsonValue> permissionsWithGrantOptionJsonList(m_permissionsWithGrantOption.size());
for(unsigned permissionsWithGrantOptionIndex = 0; permissionsWithGrantOptionIndex < permissionsWithGrantOptionJsonList.GetLength(); ++permissionsWithGrantOptionIndex)
{
permissionsWithGrantOptionJsonList[permissionsWithGrantOptionIndex].AsString(PermissionMapper::GetNameForPermission(m_permissionsWithGrantOption[permissionsWithGrantOptionIndex]));
}
payload.WithArray("PermissionsWithGrantOption", std::move(permissionsWithGrantOptionJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchRevokePermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchRevokePermissionsRequest::BatchRevokePermissionsRequest() :
m_catalogIdHasBeenSet(false),
m_entriesHasBeenSet(false)
{
}
Aws::String BatchRevokePermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_entriesHasBeenSet)
{
Array<JsonValue> entriesJsonList(m_entries.size());
for(unsigned entriesIndex = 0; entriesIndex < entriesJsonList.GetLength(); ++entriesIndex)
{
entriesJsonList[entriesIndex].AsObject(m_entries[entriesIndex].Jsonize());
}
payload.WithArray("Entries", std::move(entriesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchRevokePermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.BatchRevokePermissions"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/BatchRevokePermissionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchRevokePermissionsResult::BatchRevokePermissionsResult()
{
}
BatchRevokePermissionsResult::BatchRevokePermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchRevokePermissionsResult& BatchRevokePermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Failures"))
{
Array<JsonView> failuresJsonList = jsonValue.GetArray("Failures");
for(unsigned failuresIndex = 0; failuresIndex < failuresJsonList.GetLength(); ++failuresIndex)
{
m_failures.push_back(failuresJsonList[failuresIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,45 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/CatalogResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
CatalogResource::CatalogResource()
{
}
CatalogResource::CatalogResource(JsonView jsonValue)
{
*this = jsonValue;
}
CatalogResource& CatalogResource::operator =(JsonView jsonValue)
{
AWS_UNREFERENCED_PARAM(jsonValue);
return *this;
}
JsonValue CatalogResource::Jsonize() const
{
JsonValue payload;
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ColumnWildcard.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
ColumnWildcard::ColumnWildcard() :
m_excludedColumnNamesHasBeenSet(false)
{
}
ColumnWildcard::ColumnWildcard(JsonView jsonValue) :
m_excludedColumnNamesHasBeenSet(false)
{
*this = jsonValue;
}
ColumnWildcard& ColumnWildcard::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExcludedColumnNames"))
{
Array<JsonView> excludedColumnNamesJsonList = jsonValue.GetArray("ExcludedColumnNames");
for(unsigned excludedColumnNamesIndex = 0; excludedColumnNamesIndex < excludedColumnNamesJsonList.GetLength(); ++excludedColumnNamesIndex)
{
m_excludedColumnNames.push_back(excludedColumnNamesJsonList[excludedColumnNamesIndex].AsString());
}
m_excludedColumnNamesHasBeenSet = true;
}
return *this;
}
JsonValue ColumnWildcard::Jsonize() const
{
JsonValue payload;
if(m_excludedColumnNamesHasBeenSet)
{
Array<JsonValue> excludedColumnNamesJsonList(m_excludedColumnNames.size());
for(unsigned excludedColumnNamesIndex = 0; excludedColumnNamesIndex < excludedColumnNamesJsonList.GetLength(); ++excludedColumnNamesIndex)
{
excludedColumnNamesJsonList[excludedColumnNamesIndex].AsString(m_excludedColumnNames[excludedColumnNamesIndex]);
}
payload.WithArray("ExcludedColumnNames", std::move(excludedColumnNamesJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,133 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ComparisonOperator.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
namespace ComparisonOperatorMapper
{
static const int EQ_HASH = HashingUtils::HashString("EQ");
static const int NE_HASH = HashingUtils::HashString("NE");
static const int LE_HASH = HashingUtils::HashString("LE");
static const int LT_HASH = HashingUtils::HashString("LT");
static const int GE_HASH = HashingUtils::HashString("GE");
static const int GT_HASH = HashingUtils::HashString("GT");
static const int CONTAINS_HASH = HashingUtils::HashString("CONTAINS");
static const int NOT_CONTAINS_HASH = HashingUtils::HashString("NOT_CONTAINS");
static const int BEGINS_WITH_HASH = HashingUtils::HashString("BEGINS_WITH");
static const int IN_HASH = HashingUtils::HashString("IN");
static const int BETWEEN_HASH = HashingUtils::HashString("BETWEEN");
ComparisonOperator GetComparisonOperatorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EQ_HASH)
{
return ComparisonOperator::EQ;
}
else if (hashCode == NE_HASH)
{
return ComparisonOperator::NE;
}
else if (hashCode == LE_HASH)
{
return ComparisonOperator::LE;
}
else if (hashCode == LT_HASH)
{
return ComparisonOperator::LT;
}
else if (hashCode == GE_HASH)
{
return ComparisonOperator::GE;
}
else if (hashCode == GT_HASH)
{
return ComparisonOperator::GT;
}
else if (hashCode == CONTAINS_HASH)
{
return ComparisonOperator::CONTAINS;
}
else if (hashCode == NOT_CONTAINS_HASH)
{
return ComparisonOperator::NOT_CONTAINS;
}
else if (hashCode == BEGINS_WITH_HASH)
{
return ComparisonOperator::BEGINS_WITH;
}
else if (hashCode == IN_HASH)
{
return ComparisonOperator::IN;
}
else if (hashCode == BETWEEN_HASH)
{
return ComparisonOperator::BETWEEN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComparisonOperator>(hashCode);
}
return ComparisonOperator::NOT_SET;
}
Aws::String GetNameForComparisonOperator(ComparisonOperator enumValue)
{
switch(enumValue)
{
case ComparisonOperator::EQ:
return "EQ";
case ComparisonOperator::NE:
return "NE";
case ComparisonOperator::LE:
return "LE";
case ComparisonOperator::LT:
return "LT";
case ComparisonOperator::GE:
return "GE";
case ComparisonOperator::GT:
return "GT";
case ComparisonOperator::CONTAINS:
return "CONTAINS";
case ComparisonOperator::NOT_CONTAINS:
return "NOT_CONTAINS";
case ComparisonOperator::BEGINS_WITH:
return "BEGINS_WITH";
case ComparisonOperator::IN:
return "IN";
case ComparisonOperator::BETWEEN:
return "BETWEEN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComparisonOperatorMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DataLakePrincipal.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
DataLakePrincipal::DataLakePrincipal() :
m_dataLakePrincipalIdentifierHasBeenSet(false)
{
}
DataLakePrincipal::DataLakePrincipal(JsonView jsonValue) :
m_dataLakePrincipalIdentifierHasBeenSet(false)
{
*this = jsonValue;
}
DataLakePrincipal& DataLakePrincipal::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("DataLakePrincipalIdentifier"))
{
m_dataLakePrincipalIdentifier = jsonValue.GetString("DataLakePrincipalIdentifier");
m_dataLakePrincipalIdentifierHasBeenSet = true;
}
return *this;
}
JsonValue DataLakePrincipal::Jsonize() const
{
JsonValue payload;
if(m_dataLakePrincipalIdentifierHasBeenSet)
{
payload.WithString("DataLakePrincipalIdentifier", m_dataLakePrincipalIdentifier);
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DataLakeResourceType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
namespace DataLakeResourceTypeMapper
{
static const int CATALOG_HASH = HashingUtils::HashString("CATALOG");
static const int DATABASE_HASH = HashingUtils::HashString("DATABASE");
static const int TABLE_HASH = HashingUtils::HashString("TABLE");
static const int DATA_LOCATION_HASH = HashingUtils::HashString("DATA_LOCATION");
DataLakeResourceType GetDataLakeResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CATALOG_HASH)
{
return DataLakeResourceType::CATALOG;
}
else if (hashCode == DATABASE_HASH)
{
return DataLakeResourceType::DATABASE;
}
else if (hashCode == TABLE_HASH)
{
return DataLakeResourceType::TABLE;
}
else if (hashCode == DATA_LOCATION_HASH)
{
return DataLakeResourceType::DATA_LOCATION;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DataLakeResourceType>(hashCode);
}
return DataLakeResourceType::NOT_SET;
}
Aws::String GetNameForDataLakeResourceType(DataLakeResourceType enumValue)
{
switch(enumValue)
{
case DataLakeResourceType::CATALOG:
return "CATALOG";
case DataLakeResourceType::DATABASE:
return "DATABASE";
case DataLakeResourceType::TABLE:
return "TABLE";
case DataLakeResourceType::DATA_LOCATION:
return "DATA_LOCATION";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DataLakeResourceTypeMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DataLakeSettings.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
DataLakeSettings::DataLakeSettings() :
m_dataLakeAdminsHasBeenSet(false),
m_createDatabaseDefaultPermissionsHasBeenSet(false),
m_createTableDefaultPermissionsHasBeenSet(false),
m_trustedResourceOwnersHasBeenSet(false)
{
}
DataLakeSettings::DataLakeSettings(JsonView jsonValue) :
m_dataLakeAdminsHasBeenSet(false),
m_createDatabaseDefaultPermissionsHasBeenSet(false),
m_createTableDefaultPermissionsHasBeenSet(false),
m_trustedResourceOwnersHasBeenSet(false)
{
*this = jsonValue;
}
DataLakeSettings& DataLakeSettings::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("DataLakeAdmins"))
{
Array<JsonView> dataLakeAdminsJsonList = jsonValue.GetArray("DataLakeAdmins");
for(unsigned dataLakeAdminsIndex = 0; dataLakeAdminsIndex < dataLakeAdminsJsonList.GetLength(); ++dataLakeAdminsIndex)
{
m_dataLakeAdmins.push_back(dataLakeAdminsJsonList[dataLakeAdminsIndex].AsObject());
}
m_dataLakeAdminsHasBeenSet = true;
}
if(jsonValue.ValueExists("CreateDatabaseDefaultPermissions"))
{
Array<JsonView> createDatabaseDefaultPermissionsJsonList = jsonValue.GetArray("CreateDatabaseDefaultPermissions");
for(unsigned createDatabaseDefaultPermissionsIndex = 0; createDatabaseDefaultPermissionsIndex < createDatabaseDefaultPermissionsJsonList.GetLength(); ++createDatabaseDefaultPermissionsIndex)
{
m_createDatabaseDefaultPermissions.push_back(createDatabaseDefaultPermissionsJsonList[createDatabaseDefaultPermissionsIndex].AsObject());
}
m_createDatabaseDefaultPermissionsHasBeenSet = true;
}
if(jsonValue.ValueExists("CreateTableDefaultPermissions"))
{
Array<JsonView> createTableDefaultPermissionsJsonList = jsonValue.GetArray("CreateTableDefaultPermissions");
for(unsigned createTableDefaultPermissionsIndex = 0; createTableDefaultPermissionsIndex < createTableDefaultPermissionsJsonList.GetLength(); ++createTableDefaultPermissionsIndex)
{
m_createTableDefaultPermissions.push_back(createTableDefaultPermissionsJsonList[createTableDefaultPermissionsIndex].AsObject());
}
m_createTableDefaultPermissionsHasBeenSet = true;
}
if(jsonValue.ValueExists("TrustedResourceOwners"))
{
Array<JsonView> trustedResourceOwnersJsonList = jsonValue.GetArray("TrustedResourceOwners");
for(unsigned trustedResourceOwnersIndex = 0; trustedResourceOwnersIndex < trustedResourceOwnersJsonList.GetLength(); ++trustedResourceOwnersIndex)
{
m_trustedResourceOwners.push_back(trustedResourceOwnersJsonList[trustedResourceOwnersIndex].AsString());
}
m_trustedResourceOwnersHasBeenSet = true;
}
return *this;
}
JsonValue DataLakeSettings::Jsonize() const
{
JsonValue payload;
if(m_dataLakeAdminsHasBeenSet)
{
Array<JsonValue> dataLakeAdminsJsonList(m_dataLakeAdmins.size());
for(unsigned dataLakeAdminsIndex = 0; dataLakeAdminsIndex < dataLakeAdminsJsonList.GetLength(); ++dataLakeAdminsIndex)
{
dataLakeAdminsJsonList[dataLakeAdminsIndex].AsObject(m_dataLakeAdmins[dataLakeAdminsIndex].Jsonize());
}
payload.WithArray("DataLakeAdmins", std::move(dataLakeAdminsJsonList));
}
if(m_createDatabaseDefaultPermissionsHasBeenSet)
{
Array<JsonValue> createDatabaseDefaultPermissionsJsonList(m_createDatabaseDefaultPermissions.size());
for(unsigned createDatabaseDefaultPermissionsIndex = 0; createDatabaseDefaultPermissionsIndex < createDatabaseDefaultPermissionsJsonList.GetLength(); ++createDatabaseDefaultPermissionsIndex)
{
createDatabaseDefaultPermissionsJsonList[createDatabaseDefaultPermissionsIndex].AsObject(m_createDatabaseDefaultPermissions[createDatabaseDefaultPermissionsIndex].Jsonize());
}
payload.WithArray("CreateDatabaseDefaultPermissions", std::move(createDatabaseDefaultPermissionsJsonList));
}
if(m_createTableDefaultPermissionsHasBeenSet)
{
Array<JsonValue> createTableDefaultPermissionsJsonList(m_createTableDefaultPermissions.size());
for(unsigned createTableDefaultPermissionsIndex = 0; createTableDefaultPermissionsIndex < createTableDefaultPermissionsJsonList.GetLength(); ++createTableDefaultPermissionsIndex)
{
createTableDefaultPermissionsJsonList[createTableDefaultPermissionsIndex].AsObject(m_createTableDefaultPermissions[createTableDefaultPermissionsIndex].Jsonize());
}
payload.WithArray("CreateTableDefaultPermissions", std::move(createTableDefaultPermissionsJsonList));
}
if(m_trustedResourceOwnersHasBeenSet)
{
Array<JsonValue> trustedResourceOwnersJsonList(m_trustedResourceOwners.size());
for(unsigned trustedResourceOwnersIndex = 0; trustedResourceOwnersIndex < trustedResourceOwnersJsonList.GetLength(); ++trustedResourceOwnersIndex)
{
trustedResourceOwnersJsonList[trustedResourceOwnersIndex].AsString(m_trustedResourceOwners[trustedResourceOwnersIndex]);
}
payload.WithArray("TrustedResourceOwners", std::move(trustedResourceOwnersJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DataLocationResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
DataLocationResource::DataLocationResource() :
m_catalogIdHasBeenSet(false),
m_resourceArnHasBeenSet(false)
{
}
DataLocationResource::DataLocationResource(JsonView jsonValue) :
m_catalogIdHasBeenSet(false),
m_resourceArnHasBeenSet(false)
{
*this = jsonValue;
}
DataLocationResource& DataLocationResource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CatalogId"))
{
m_catalogId = jsonValue.GetString("CatalogId");
m_catalogIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
return *this;
}
JsonValue DataLocationResource::Jsonize() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DatabaseResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
DatabaseResource::DatabaseResource() :
m_catalogIdHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
DatabaseResource::DatabaseResource(JsonView jsonValue) :
m_catalogIdHasBeenSet(false),
m_nameHasBeenSet(false)
{
*this = jsonValue;
}
DatabaseResource& DatabaseResource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CatalogId"))
{
m_catalogId = jsonValue.GetString("CatalogId");
m_catalogIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
return *this;
}
JsonValue DatabaseResource::Jsonize() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DeregisterResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeregisterResourceRequest::DeregisterResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String DeregisterResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeregisterResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.DeregisterResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DeregisterResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeregisterResourceResult::DeregisterResourceResult()
{
}
DeregisterResourceResult::DeregisterResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeregisterResourceResult& DeregisterResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DescribeResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeResourceRequest::DescribeResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String DescribeResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.DescribeResource"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DescribeResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeResourceResult::DescribeResourceResult()
{
}
DescribeResourceResult::DescribeResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeResourceResult& DescribeResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceInfo"))
{
m_resourceInfo = jsonValue.GetObject("ResourceInfo");
}
return *this;
}

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/DetailsMap.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
DetailsMap::DetailsMap() :
m_resourceShareHasBeenSet(false)
{
}
DetailsMap::DetailsMap(JsonView jsonValue) :
m_resourceShareHasBeenSet(false)
{
*this = jsonValue;
}
DetailsMap& DetailsMap::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceShare"))
{
Array<JsonView> resourceShareJsonList = jsonValue.GetArray("ResourceShare");
for(unsigned resourceShareIndex = 0; resourceShareIndex < resourceShareJsonList.GetLength(); ++resourceShareIndex)
{
m_resourceShare.push_back(resourceShareJsonList[resourceShareIndex].AsString());
}
m_resourceShareHasBeenSet = true;
}
return *this;
}
JsonValue DetailsMap::Jsonize() const
{
JsonValue payload;
if(m_resourceShareHasBeenSet)
{
Array<JsonValue> resourceShareJsonList(m_resourceShare.size());
for(unsigned resourceShareIndex = 0; resourceShareIndex < resourceShareJsonList.GetLength(); ++resourceShareIndex)
{
resourceShareJsonList[resourceShareIndex].AsString(m_resourceShare[resourceShareIndex]);
}
payload.WithArray("ResourceShare", std::move(resourceShareJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ErrorDetail.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
ErrorDetail::ErrorDetail() :
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
}
ErrorDetail::ErrorDetail(JsonView jsonValue) :
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
*this = jsonValue;
}
ErrorDetail& ErrorDetail::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ErrorCode"))
{
m_errorCode = jsonValue.GetString("ErrorCode");
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorMessage"))
{
m_errorMessage = jsonValue.GetString("ErrorMessage");
m_errorMessageHasBeenSet = true;
}
return *this;
}
JsonValue ErrorDetail::Jsonize() const
{
JsonValue payload;
if(m_errorCodeHasBeenSet)
{
payload.WithString("ErrorCode", m_errorCode);
}
if(m_errorMessageHasBeenSet)
{
payload.WithString("ErrorMessage", m_errorMessage);
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/FieldNameString.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
namespace FieldNameStringMapper
{
static const int RESOURCE_ARN_HASH = HashingUtils::HashString("RESOURCE_ARN");
static const int ROLE_ARN_HASH = HashingUtils::HashString("ROLE_ARN");
static const int LAST_MODIFIED_HASH = HashingUtils::HashString("LAST_MODIFIED");
FieldNameString GetFieldNameStringForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == RESOURCE_ARN_HASH)
{
return FieldNameString::RESOURCE_ARN;
}
else if (hashCode == ROLE_ARN_HASH)
{
return FieldNameString::ROLE_ARN;
}
else if (hashCode == LAST_MODIFIED_HASH)
{
return FieldNameString::LAST_MODIFIED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<FieldNameString>(hashCode);
}
return FieldNameString::NOT_SET;
}
Aws::String GetNameForFieldNameString(FieldNameString enumValue)
{
switch(enumValue)
{
case FieldNameString::RESOURCE_ARN:
return "RESOURCE_ARN";
case FieldNameString::ROLE_ARN:
return "ROLE_ARN";
case FieldNameString::LAST_MODIFIED:
return "LAST_MODIFIED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace FieldNameStringMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/FilterCondition.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
FilterCondition::FilterCondition() :
m_field(FieldNameString::NOT_SET),
m_fieldHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_stringValueListHasBeenSet(false)
{
}
FilterCondition::FilterCondition(JsonView jsonValue) :
m_field(FieldNameString::NOT_SET),
m_fieldHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_stringValueListHasBeenSet(false)
{
*this = jsonValue;
}
FilterCondition& FilterCondition::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Field"))
{
m_field = FieldNameStringMapper::GetFieldNameStringForName(jsonValue.GetString("Field"));
m_fieldHasBeenSet = true;
}
if(jsonValue.ValueExists("ComparisonOperator"))
{
m_comparisonOperator = ComparisonOperatorMapper::GetComparisonOperatorForName(jsonValue.GetString("ComparisonOperator"));
m_comparisonOperatorHasBeenSet = true;
}
if(jsonValue.ValueExists("StringValueList"))
{
Array<JsonView> stringValueListJsonList = jsonValue.GetArray("StringValueList");
for(unsigned stringValueListIndex = 0; stringValueListIndex < stringValueListJsonList.GetLength(); ++stringValueListIndex)
{
m_stringValueList.push_back(stringValueListJsonList[stringValueListIndex].AsString());
}
m_stringValueListHasBeenSet = true;
}
return *this;
}
JsonValue FilterCondition::Jsonize() const
{
JsonValue payload;
if(m_fieldHasBeenSet)
{
payload.WithString("Field", FieldNameStringMapper::GetNameForFieldNameString(m_field));
}
if(m_comparisonOperatorHasBeenSet)
{
payload.WithString("ComparisonOperator", ComparisonOperatorMapper::GetNameForComparisonOperator(m_comparisonOperator));
}
if(m_stringValueListHasBeenSet)
{
Array<JsonValue> stringValueListJsonList(m_stringValueList.size());
for(unsigned stringValueListIndex = 0; stringValueListIndex < stringValueListJsonList.GetLength(); ++stringValueListIndex)
{
stringValueListJsonList[stringValueListIndex].AsString(m_stringValueList[stringValueListIndex]);
}
payload.WithArray("StringValueList", std::move(stringValueListJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GetDataLakeSettingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetDataLakeSettingsRequest::GetDataLakeSettingsRequest() :
m_catalogIdHasBeenSet(false)
{
}
Aws::String GetDataLakeSettingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetDataLakeSettingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.GetDataLakeSettings"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GetDataLakeSettingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDataLakeSettingsResult::GetDataLakeSettingsResult()
{
}
GetDataLakeSettingsResult::GetDataLakeSettingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetDataLakeSettingsResult& GetDataLakeSettingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("DataLakeSettings"))
{
m_dataLakeSettings = jsonValue.GetObject("DataLakeSettings");
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GetEffectivePermissionsForPathRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetEffectivePermissionsForPathRequest::GetEffectivePermissionsForPathRequest() :
m_catalogIdHasBeenSet(false),
m_resourceArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String GetEffectivePermissionsForPathRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetEffectivePermissionsForPathRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.GetEffectivePermissionsForPath"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GetEffectivePermissionsForPathResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetEffectivePermissionsForPathResult::GetEffectivePermissionsForPathResult()
{
}
GetEffectivePermissionsForPathResult::GetEffectivePermissionsForPathResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetEffectivePermissionsForPathResult& GetEffectivePermissionsForPathResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("Permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(permissionsJsonList[permissionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,81 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GrantPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GrantPermissionsRequest::GrantPermissionsRequest() :
m_catalogIdHasBeenSet(false),
m_principalHasBeenSet(false),
m_resourceHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_permissionsWithGrantOptionHasBeenSet(false)
{
}
Aws::String GrantPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_principalHasBeenSet)
{
payload.WithObject("Principal", m_principal.Jsonize());
}
if(m_resourceHasBeenSet)
{
payload.WithObject("Resource", m_resource.Jsonize());
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(PermissionMapper::GetNameForPermission(m_permissions[permissionsIndex]));
}
payload.WithArray("Permissions", std::move(permissionsJsonList));
}
if(m_permissionsWithGrantOptionHasBeenSet)
{
Array<JsonValue> permissionsWithGrantOptionJsonList(m_permissionsWithGrantOption.size());
for(unsigned permissionsWithGrantOptionIndex = 0; permissionsWithGrantOptionIndex < permissionsWithGrantOptionJsonList.GetLength(); ++permissionsWithGrantOptionIndex)
{
permissionsWithGrantOptionJsonList[permissionsWithGrantOptionIndex].AsString(PermissionMapper::GetNameForPermission(m_permissionsWithGrantOption[permissionsWithGrantOptionIndex]));
}
payload.WithArray("PermissionsWithGrantOption", std::move(permissionsWithGrantOptionJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GrantPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.GrantPermissions"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/GrantPermissionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GrantPermissionsResult::GrantPermissionsResult()
{
}
GrantPermissionsResult::GrantPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GrantPermissionsResult& GrantPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ListPermissionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListPermissionsRequest::ListPermissionsRequest() :
m_catalogIdHasBeenSet(false),
m_principalHasBeenSet(false),
m_resourceType(DataLakeResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListPermissionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_principalHasBeenSet)
{
payload.WithObject("Principal", m_principal.Jsonize());
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", DataLakeResourceTypeMapper::GetNameForDataLakeResourceType(m_resourceType));
}
if(m_resourceHasBeenSet)
{
payload.WithObject("Resource", m_resource.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListPermissionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.ListPermissions"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ListPermissionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListPermissionsResult::ListPermissionsResult()
{
}
ListPermissionsResult::ListPermissionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListPermissionsResult& ListPermissionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("PrincipalResourcePermissions"))
{
Array<JsonView> principalResourcePermissionsJsonList = jsonValue.GetArray("PrincipalResourcePermissions");
for(unsigned principalResourcePermissionsIndex = 0; principalResourcePermissionsIndex < principalResourcePermissionsJsonList.GetLength(); ++principalResourcePermissionsIndex)
{
m_principalResourcePermissions.push_back(principalResourcePermissionsJsonList[principalResourcePermissionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ListResourcesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListResourcesRequest::ListResourcesRequest() :
m_filterConditionListHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListResourcesRequest::SerializePayload() const
{
JsonValue payload;
if(m_filterConditionListHasBeenSet)
{
Array<JsonValue> filterConditionListJsonList(m_filterConditionList.size());
for(unsigned filterConditionListIndex = 0; filterConditionListIndex < filterConditionListJsonList.GetLength(); ++filterConditionListIndex)
{
filterConditionListJsonList[filterConditionListIndex].AsObject(m_filterConditionList[filterConditionListIndex].Jsonize());
}
payload.WithArray("FilterConditionList", std::move(filterConditionListJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListResourcesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.ListResources"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ListResourcesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListResourcesResult::ListResourcesResult()
{
}
ListResourcesResult::ListResourcesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListResourcesResult& ListResourcesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ResourceInfoList"))
{
Array<JsonView> resourceInfoListJsonList = jsonValue.GetArray("ResourceInfoList");
for(unsigned resourceInfoListIndex = 0; resourceInfoListIndex < resourceInfoListJsonList.GetLength(); ++resourceInfoListIndex)
{
m_resourceInfoList.push_back(resourceInfoListJsonList[resourceInfoListIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,126 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/Permission.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
namespace PermissionMapper
{
static const int ALL_HASH = HashingUtils::HashString("ALL");
static const int SELECT_HASH = HashingUtils::HashString("SELECT");
static const int ALTER_HASH = HashingUtils::HashString("ALTER");
static const int DROP_HASH = HashingUtils::HashString("DROP");
static const int DELETE__HASH = HashingUtils::HashString("DELETE");
static const int INSERT_HASH = HashingUtils::HashString("INSERT");
static const int DESCRIBE_HASH = HashingUtils::HashString("DESCRIBE");
static const int CREATE_DATABASE_HASH = HashingUtils::HashString("CREATE_DATABASE");
static const int CREATE_TABLE_HASH = HashingUtils::HashString("CREATE_TABLE");
static const int DATA_LOCATION_ACCESS_HASH = HashingUtils::HashString("DATA_LOCATION_ACCESS");
Permission GetPermissionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ALL_HASH)
{
return Permission::ALL;
}
else if (hashCode == SELECT_HASH)
{
return Permission::SELECT;
}
else if (hashCode == ALTER_HASH)
{
return Permission::ALTER;
}
else if (hashCode == DROP_HASH)
{
return Permission::DROP;
}
else if (hashCode == DELETE__HASH)
{
return Permission::DELETE_;
}
else if (hashCode == INSERT_HASH)
{
return Permission::INSERT;
}
else if (hashCode == DESCRIBE_HASH)
{
return Permission::DESCRIBE;
}
else if (hashCode == CREATE_DATABASE_HASH)
{
return Permission::CREATE_DATABASE;
}
else if (hashCode == CREATE_TABLE_HASH)
{
return Permission::CREATE_TABLE;
}
else if (hashCode == DATA_LOCATION_ACCESS_HASH)
{
return Permission::DATA_LOCATION_ACCESS;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Permission>(hashCode);
}
return Permission::NOT_SET;
}
Aws::String GetNameForPermission(Permission enumValue)
{
switch(enumValue)
{
case Permission::ALL:
return "ALL";
case Permission::SELECT:
return "SELECT";
case Permission::ALTER:
return "ALTER";
case Permission::DROP:
return "DROP";
case Permission::DELETE_:
return "DELETE";
case Permission::INSERT:
return "INSERT";
case Permission::DESCRIBE:
return "DESCRIBE";
case Permission::CREATE_DATABASE:
return "CREATE_DATABASE";
case Permission::CREATE_TABLE:
return "CREATE_TABLE";
case Permission::DATA_LOCATION_ACCESS:
return "DATA_LOCATION_ACCESS";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PermissionMapper
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/PrincipalPermissions.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
PrincipalPermissions::PrincipalPermissions() :
m_principalHasBeenSet(false),
m_permissionsHasBeenSet(false)
{
}
PrincipalPermissions::PrincipalPermissions(JsonView jsonValue) :
m_principalHasBeenSet(false),
m_permissionsHasBeenSet(false)
{
*this = jsonValue;
}
PrincipalPermissions& PrincipalPermissions::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Principal"))
{
m_principal = jsonValue.GetObject("Principal");
m_principalHasBeenSet = true;
}
if(jsonValue.ValueExists("Permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("Permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(PermissionMapper::GetPermissionForName(permissionsJsonList[permissionsIndex].AsString()));
}
m_permissionsHasBeenSet = true;
}
return *this;
}
JsonValue PrincipalPermissions::Jsonize() const
{
JsonValue payload;
if(m_principalHasBeenSet)
{
payload.WithObject("Principal", m_principal.Jsonize());
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(PermissionMapper::GetNameForPermission(m_permissions[permissionsIndex]));
}
payload.WithArray("Permissions", std::move(permissionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/PrincipalResourcePermissions.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
PrincipalResourcePermissions::PrincipalResourcePermissions() :
m_principalHasBeenSet(false),
m_resourceHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_permissionsWithGrantOptionHasBeenSet(false),
m_additionalDetailsHasBeenSet(false)
{
}
PrincipalResourcePermissions::PrincipalResourcePermissions(JsonView jsonValue) :
m_principalHasBeenSet(false),
m_resourceHasBeenSet(false),
m_permissionsHasBeenSet(false),
m_permissionsWithGrantOptionHasBeenSet(false),
m_additionalDetailsHasBeenSet(false)
{
*this = jsonValue;
}
PrincipalResourcePermissions& PrincipalResourcePermissions::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Principal"))
{
m_principal = jsonValue.GetObject("Principal");
m_principalHasBeenSet = true;
}
if(jsonValue.ValueExists("Resource"))
{
m_resource = jsonValue.GetObject("Resource");
m_resourceHasBeenSet = true;
}
if(jsonValue.ValueExists("Permissions"))
{
Array<JsonView> permissionsJsonList = jsonValue.GetArray("Permissions");
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
m_permissions.push_back(PermissionMapper::GetPermissionForName(permissionsJsonList[permissionsIndex].AsString()));
}
m_permissionsHasBeenSet = true;
}
if(jsonValue.ValueExists("PermissionsWithGrantOption"))
{
Array<JsonView> permissionsWithGrantOptionJsonList = jsonValue.GetArray("PermissionsWithGrantOption");
for(unsigned permissionsWithGrantOptionIndex = 0; permissionsWithGrantOptionIndex < permissionsWithGrantOptionJsonList.GetLength(); ++permissionsWithGrantOptionIndex)
{
m_permissionsWithGrantOption.push_back(PermissionMapper::GetPermissionForName(permissionsWithGrantOptionJsonList[permissionsWithGrantOptionIndex].AsString()));
}
m_permissionsWithGrantOptionHasBeenSet = true;
}
if(jsonValue.ValueExists("AdditionalDetails"))
{
m_additionalDetails = jsonValue.GetObject("AdditionalDetails");
m_additionalDetailsHasBeenSet = true;
}
return *this;
}
JsonValue PrincipalResourcePermissions::Jsonize() const
{
JsonValue payload;
if(m_principalHasBeenSet)
{
payload.WithObject("Principal", m_principal.Jsonize());
}
if(m_resourceHasBeenSet)
{
payload.WithObject("Resource", m_resource.Jsonize());
}
if(m_permissionsHasBeenSet)
{
Array<JsonValue> permissionsJsonList(m_permissions.size());
for(unsigned permissionsIndex = 0; permissionsIndex < permissionsJsonList.GetLength(); ++permissionsIndex)
{
permissionsJsonList[permissionsIndex].AsString(PermissionMapper::GetNameForPermission(m_permissions[permissionsIndex]));
}
payload.WithArray("Permissions", std::move(permissionsJsonList));
}
if(m_permissionsWithGrantOptionHasBeenSet)
{
Array<JsonValue> permissionsWithGrantOptionJsonList(m_permissionsWithGrantOption.size());
for(unsigned permissionsWithGrantOptionIndex = 0; permissionsWithGrantOptionIndex < permissionsWithGrantOptionJsonList.GetLength(); ++permissionsWithGrantOptionIndex)
{
permissionsWithGrantOptionJsonList[permissionsWithGrantOptionIndex].AsString(PermissionMapper::GetNameForPermission(m_permissionsWithGrantOption[permissionsWithGrantOptionIndex]));
}
payload.WithArray("PermissionsWithGrantOption", std::move(permissionsWithGrantOptionJsonList));
}
if(m_additionalDetailsHasBeenSet)
{
payload.WithObject("AdditionalDetails", m_additionalDetails.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/PutDataLakeSettingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutDataLakeSettingsRequest::PutDataLakeSettingsRequest() :
m_catalogIdHasBeenSet(false),
m_dataLakeSettingsHasBeenSet(false)
{
}
Aws::String PutDataLakeSettingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_catalogIdHasBeenSet)
{
payload.WithString("CatalogId", m_catalogId);
}
if(m_dataLakeSettingsHasBeenSet)
{
payload.WithObject("DataLakeSettings", m_dataLakeSettings.Jsonize());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PutDataLakeSettingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.PutDataLakeSettings"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/PutDataLakeSettingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutDataLakeSettingsResult::PutDataLakeSettingsResult()
{
}
PutDataLakeSettingsResult::PutDataLakeSettingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutDataLakeSettingsResult& PutDataLakeSettingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/RegisterResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
RegisterResourceRequest::RegisterResourceRequest() :
m_resourceArnHasBeenSet(false),
m_useServiceLinkedRole(false),
m_useServiceLinkedRoleHasBeenSet(false),
m_roleArnHasBeenSet(false)
{
}
Aws::String RegisterResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_useServiceLinkedRoleHasBeenSet)
{
payload.WithBool("UseServiceLinkedRole", m_useServiceLinkedRole);
}
if(m_roleArnHasBeenSet)
{
payload.WithString("RoleArn", m_roleArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection RegisterResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSLakeFormation.RegisterResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/RegisterResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::LakeFormation::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
RegisterResourceResult::RegisterResourceResult()
{
}
RegisterResourceResult::RegisterResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
RegisterResourceResult& RegisterResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,119 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/Resource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
Resource::Resource() :
m_catalogHasBeenSet(false),
m_databaseHasBeenSet(false),
m_tableHasBeenSet(false),
m_tableWithColumnsHasBeenSet(false),
m_dataLocationHasBeenSet(false)
{
}
Resource::Resource(JsonView jsonValue) :
m_catalogHasBeenSet(false),
m_databaseHasBeenSet(false),
m_tableHasBeenSet(false),
m_tableWithColumnsHasBeenSet(false),
m_dataLocationHasBeenSet(false)
{
*this = jsonValue;
}
Resource& Resource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Catalog"))
{
m_catalog = jsonValue.GetObject("Catalog");
m_catalogHasBeenSet = true;
}
if(jsonValue.ValueExists("Database"))
{
m_database = jsonValue.GetObject("Database");
m_databaseHasBeenSet = true;
}
if(jsonValue.ValueExists("Table"))
{
m_table = jsonValue.GetObject("Table");
m_tableHasBeenSet = true;
}
if(jsonValue.ValueExists("TableWithColumns"))
{
m_tableWithColumns = jsonValue.GetObject("TableWithColumns");
m_tableWithColumnsHasBeenSet = true;
}
if(jsonValue.ValueExists("DataLocation"))
{
m_dataLocation = jsonValue.GetObject("DataLocation");
m_dataLocationHasBeenSet = true;
}
return *this;
}
JsonValue Resource::Jsonize() const
{
JsonValue payload;
if(m_catalogHasBeenSet)
{
payload.WithObject("Catalog", m_catalog.Jsonize());
}
if(m_databaseHasBeenSet)
{
payload.WithObject("Database", m_database.Jsonize());
}
if(m_tableHasBeenSet)
{
payload.WithObject("Table", m_table.Jsonize());
}
if(m_tableWithColumnsHasBeenSet)
{
payload.WithObject("TableWithColumns", m_tableWithColumns.Jsonize());
}
if(m_dataLocationHasBeenSet)
{
payload.WithObject("DataLocation", m_dataLocation.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lakeformation/model/ResourceInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
ResourceInfo::ResourceInfo() :
m_resourceArnHasBeenSet(false),
m_roleArnHasBeenSet(false),
m_lastModifiedHasBeenSet(false)
{
}
ResourceInfo::ResourceInfo(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_roleArnHasBeenSet(false),
m_lastModifiedHasBeenSet(false)
{
*this = jsonValue;
}
ResourceInfo& ResourceInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ResourceArn"))
{
m_resourceArn = jsonValue.GetString("ResourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("RoleArn"))
{
m_roleArn = jsonValue.GetString("RoleArn");
m_roleArnHasBeenSet = true;
}
if(jsonValue.ValueExists("LastModified"))
{
m_lastModified = jsonValue.GetDouble("LastModified");
m_lastModifiedHasBeenSet = true;
}
return *this;
}
JsonValue ResourceInfo::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("ResourceArn", m_resourceArn);
}
if(m_roleArnHasBeenSet)
{
payload.WithString("RoleArn", m_roleArn);
}
if(m_lastModifiedHasBeenSet)
{
payload.WithDouble("LastModified", m_lastModified.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace LakeFormation
} // namespace Aws

Some files were not shown because too many files have changed in this diff Show More