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-outposts "C++ SDK for the AWS outposts service" aws-cpp-sdk-core)
file(GLOB AWS_OUTPOSTS_HEADERS
"include/aws/outposts/*.h"
)
file(GLOB AWS_OUTPOSTS_MODEL_HEADERS
"include/aws/outposts/model/*.h"
)
file(GLOB AWS_OUTPOSTS_SOURCE
"source/*.cpp"
)
file(GLOB AWS_OUTPOSTS_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB OUTPOSTS_UNIFIED_HEADERS
${AWS_OUTPOSTS_HEADERS}
${AWS_OUTPOSTS_MODEL_HEADERS}
)
file(GLOB OUTPOSTS_UNITY_SRC
${AWS_OUTPOSTS_SOURCE}
${AWS_OUTPOSTS_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("OUTPOSTS" OUTPOSTS_UNITY_SRC)
endif()
file(GLOB OUTPOSTS_SRC
${OUTPOSTS_UNIFIED_HEADERS}
${OUTPOSTS_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\outposts" FILES ${AWS_OUTPOSTS_HEADERS})
source_group("Header Files\\aws\\outposts\\model" FILES ${AWS_OUTPOSTS_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_OUTPOSTS_SOURCE})
source_group("Source Files\\model" FILES ${AWS_OUTPOSTS_MODEL_SOURCE})
endif(MSVC)
endif()
set(OUTPOSTS_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${OUTPOSTS_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_OUTPOSTS_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_OUTPOSTS_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/outposts)
install (FILES ${AWS_OUTPOSTS_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/outposts/model)
do_packaging()

View File

@@ -0,0 +1,326 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsErrors.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/outposts/model/CreateOutpostResult.h>
#include <aws/outposts/model/DeleteOutpostResult.h>
#include <aws/outposts/model/DeleteSiteResult.h>
#include <aws/outposts/model/GetOutpostResult.h>
#include <aws/outposts/model/GetOutpostInstanceTypesResult.h>
#include <aws/outposts/model/ListOutpostsResult.h>
#include <aws/outposts/model/ListSitesResult.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 Outposts
{
namespace Model
{
class CreateOutpostRequest;
class DeleteOutpostRequest;
class DeleteSiteRequest;
class GetOutpostRequest;
class GetOutpostInstanceTypesRequest;
class ListOutpostsRequest;
class ListSitesRequest;
typedef Aws::Utils::Outcome<CreateOutpostResult, OutpostsError> CreateOutpostOutcome;
typedef Aws::Utils::Outcome<DeleteOutpostResult, OutpostsError> DeleteOutpostOutcome;
typedef Aws::Utils::Outcome<DeleteSiteResult, OutpostsError> DeleteSiteOutcome;
typedef Aws::Utils::Outcome<GetOutpostResult, OutpostsError> GetOutpostOutcome;
typedef Aws::Utils::Outcome<GetOutpostInstanceTypesResult, OutpostsError> GetOutpostInstanceTypesOutcome;
typedef Aws::Utils::Outcome<ListOutpostsResult, OutpostsError> ListOutpostsOutcome;
typedef Aws::Utils::Outcome<ListSitesResult, OutpostsError> ListSitesOutcome;
typedef std::future<CreateOutpostOutcome> CreateOutpostOutcomeCallable;
typedef std::future<DeleteOutpostOutcome> DeleteOutpostOutcomeCallable;
typedef std::future<DeleteSiteOutcome> DeleteSiteOutcomeCallable;
typedef std::future<GetOutpostOutcome> GetOutpostOutcomeCallable;
typedef std::future<GetOutpostInstanceTypesOutcome> GetOutpostInstanceTypesOutcomeCallable;
typedef std::future<ListOutpostsOutcome> ListOutpostsOutcomeCallable;
typedef std::future<ListSitesOutcome> ListSitesOutcomeCallable;
} // namespace Model
class OutpostsClient;
typedef std::function<void(const OutpostsClient*, const Model::CreateOutpostRequest&, const Model::CreateOutpostOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateOutpostResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::DeleteOutpostRequest&, const Model::DeleteOutpostOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteOutpostResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::DeleteSiteRequest&, const Model::DeleteSiteOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteSiteResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::GetOutpostRequest&, const Model::GetOutpostOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetOutpostResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::GetOutpostInstanceTypesRequest&, const Model::GetOutpostInstanceTypesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetOutpostInstanceTypesResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::ListOutpostsRequest&, const Model::ListOutpostsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListOutpostsResponseReceivedHandler;
typedef std::function<void(const OutpostsClient*, const Model::ListSitesRequest&, const Model::ListSitesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListSitesResponseReceivedHandler;
/**
* <p>AWS Outposts is a fully-managed service that extends AWS infrastructure,
* APIs, and tools to customer premises. By providing local access to AWS-managed
* infrastructure, AWS Outposts enables customers to build and run applications on
* premises using the same programming interfaces as in AWS Regions, while using
* local compute and storage resources for lower latency and local data processing
* needs.</p>
*/
class AWS_OUTPOSTS_API OutpostsClient : 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.
*/
OutpostsClient(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.
*/
OutpostsClient(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
*/
OutpostsClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~OutpostsClient();
/**
* <p>Creates an Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/CreateOutpost">AWS
* API Reference</a></p>
*/
virtual Model::CreateOutpostOutcome CreateOutpost(const Model::CreateOutpostRequest& request) const;
/**
* <p>Creates an Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/CreateOutpost">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateOutpostOutcomeCallable CreateOutpostCallable(const Model::CreateOutpostRequest& request) const;
/**
* <p>Creates an Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/CreateOutpost">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateOutpostAsync(const Model::CreateOutpostRequest& request, const CreateOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes the Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteOutpost">AWS
* API Reference</a></p>
*/
virtual Model::DeleteOutpostOutcome DeleteOutpost(const Model::DeleteOutpostRequest& request) const;
/**
* <p>Deletes the Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteOutpost">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteOutpostOutcomeCallable DeleteOutpostCallable(const Model::DeleteOutpostRequest& request) const;
/**
* <p>Deletes the Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteOutpost">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteOutpostAsync(const Model::DeleteOutpostRequest& request, const DeleteOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes the site.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteSite">AWS
* API Reference</a></p>
*/
virtual Model::DeleteSiteOutcome DeleteSite(const Model::DeleteSiteRequest& request) const;
/**
* <p>Deletes the site.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteSite">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteSiteOutcomeCallable DeleteSiteCallable(const Model::DeleteSiteRequest& request) const;
/**
* <p>Deletes the site.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/DeleteSite">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteSiteAsync(const Model::DeleteSiteRequest& request, const DeleteSiteResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Gets information about the specified Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpost">AWS
* API Reference</a></p>
*/
virtual Model::GetOutpostOutcome GetOutpost(const Model::GetOutpostRequest& request) const;
/**
* <p>Gets information about the specified Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpost">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetOutpostOutcomeCallable GetOutpostCallable(const Model::GetOutpostRequest& request) const;
/**
* <p>Gets information about the specified Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpost">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetOutpostAsync(const Model::GetOutpostRequest& request, const GetOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the instance types for the specified Outpost.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpostInstanceTypes">AWS
* API Reference</a></p>
*/
virtual Model::GetOutpostInstanceTypesOutcome GetOutpostInstanceTypes(const Model::GetOutpostInstanceTypesRequest& request) const;
/**
* <p>Lists the instance types for the specified Outpost.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpostInstanceTypes">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetOutpostInstanceTypesOutcomeCallable GetOutpostInstanceTypesCallable(const Model::GetOutpostInstanceTypesRequest& request) const;
/**
* <p>Lists the instance types for the specified Outpost.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/GetOutpostInstanceTypes">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetOutpostInstanceTypesAsync(const Model::GetOutpostInstanceTypesRequest& request, const GetOutpostInstanceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>List the Outposts for your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListOutposts">AWS
* API Reference</a></p>
*/
virtual Model::ListOutpostsOutcome ListOutposts(const Model::ListOutpostsRequest& request) const;
/**
* <p>List the Outposts for your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListOutposts">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListOutpostsOutcomeCallable ListOutpostsCallable(const Model::ListOutpostsRequest& request) const;
/**
* <p>List the Outposts for your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListOutposts">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListOutpostsAsync(const Model::ListOutpostsRequest& request, const ListOutpostsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the sites for the specified AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListSites">AWS
* API Reference</a></p>
*/
virtual Model::ListSitesOutcome ListSites(const Model::ListSitesRequest& request) const;
/**
* <p>Lists the sites for the specified AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListSites">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListSitesOutcomeCallable ListSitesCallable(const Model::ListSitesRequest& request) const;
/**
* <p>Lists the sites for the specified AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/ListSites">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListSitesAsync(const Model::ListSitesRequest& request, const ListSitesResponseReceivedHandler& 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 CreateOutpostAsyncHelper(const Model::CreateOutpostRequest& request, const CreateOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteOutpostAsyncHelper(const Model::DeleteOutpostRequest& request, const DeleteOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteSiteAsyncHelper(const Model::DeleteSiteRequest& request, const DeleteSiteResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetOutpostAsyncHelper(const Model::GetOutpostRequest& request, const GetOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetOutpostInstanceTypesAsyncHelper(const Model::GetOutpostInstanceTypesRequest& request, const GetOutpostInstanceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListOutpostsAsyncHelper(const Model::ListOutpostsRequest& request, const ListOutpostsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListSitesAsyncHelper(const Model::ListSitesRequest& request, const ListSitesResponseReceivedHandler& 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 Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Outposts
{
namespace OutpostsEndpoint
{
AWS_OUTPOSTS_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace OutpostsEndpoint
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_OUTPOSTS_API OutpostsErrorMarshaller : 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,74 @@
/**
* 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/outposts/Outposts_EXPORTS.h>
namespace Aws
{
namespace Outposts
{
enum class OutpostsErrors
{
//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,
///////////////////////////////////////////////////////////////////////////////////////////
INTERNAL_SERVER= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
NOT_FOUND,
SERVICE_QUOTA_EXCEEDED
};
class AWS_OUTPOSTS_API OutpostsError : public Aws::Client::AWSError<OutpostsErrors>
{
public:
OutpostsError() {}
OutpostsError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<OutpostsErrors>(rhs) {}
OutpostsError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<OutpostsErrors>(rhs) {}
OutpostsError(const Aws::Client::AWSError<OutpostsErrors>& rhs) : Aws::Client::AWSError<OutpostsErrors>(rhs) {}
OutpostsError(Aws::Client::AWSError<OutpostsErrors>&& rhs) : Aws::Client::AWSError<OutpostsErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace OutpostsErrorMapper
{
AWS_OUTPOSTS_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace Outposts
{
class AWS_OUTPOSTS_API OutpostsRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~OutpostsRequest () {}
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, "2019-12-03"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace Outposts
} // 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_OUTPOSTS_EXPORTS
#define AWS_OUTPOSTS_API __declspec(dllexport)
#else
#define AWS_OUTPOSTS_API __declspec(dllimport)
#endif /* AWS_OUTPOSTS_EXPORTS */
#else
#define AWS_OUTPOSTS_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_OUTPOSTS_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,179 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API CreateOutpostRequest : public OutpostsRequest
{
public:
CreateOutpostRequest();
// 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 "CreateOutpost"; }
Aws::String SerializePayload() const override;
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline CreateOutpostRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
inline CreateOutpostRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline CreateOutpostRequest& WithName(const char* value) { SetName(value); return *this;}
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline CreateOutpostRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline CreateOutpostRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline CreateOutpostRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
inline const Aws::String& GetSiteId() const{ return m_siteId; }
inline bool SiteIdHasBeenSet() const { return m_siteIdHasBeenSet; }
inline void SetSiteId(const Aws::String& value) { m_siteIdHasBeenSet = true; m_siteId = value; }
inline void SetSiteId(Aws::String&& value) { m_siteIdHasBeenSet = true; m_siteId = std::move(value); }
inline void SetSiteId(const char* value) { m_siteIdHasBeenSet = true; m_siteId.assign(value); }
inline CreateOutpostRequest& WithSiteId(const Aws::String& value) { SetSiteId(value); return *this;}
inline CreateOutpostRequest& WithSiteId(Aws::String&& value) { SetSiteId(std::move(value)); return *this;}
inline CreateOutpostRequest& WithSiteId(const char* value) { SetSiteId(value); return *this;}
inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
inline CreateOutpostRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
inline CreateOutpostRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
inline CreateOutpostRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; }
inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; }
inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); }
inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); }
inline CreateOutpostRequest& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;}
inline CreateOutpostRequest& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;}
inline CreateOutpostRequest& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
Aws::String m_siteId;
bool m_siteIdHasBeenSet;
Aws::String m_availabilityZone;
bool m_availabilityZoneHasBeenSet;
Aws::String m_availabilityZoneId;
bool m_availabilityZoneIdHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/model/Outpost.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API CreateOutpostResult
{
public:
CreateOutpostResult();
CreateOutpostResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CreateOutpostResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
inline const Outpost& GetOutpost() const{ return m_outpost; }
inline void SetOutpost(const Outpost& value) { m_outpost = value; }
inline void SetOutpost(Outpost&& value) { m_outpost = std::move(value); }
inline CreateOutpostResult& WithOutpost(const Outpost& value) { SetOutpost(value); return *this;}
inline CreateOutpostResult& WithOutpost(Outpost&& value) { SetOutpost(std::move(value)); return *this;}
private:
Outpost m_outpost;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API DeleteOutpostRequest : public OutpostsRequest
{
public:
DeleteOutpostRequest();
// 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 "DeleteOutpost"; }
Aws::String SerializePayload() const override;
inline const Aws::String& GetOutpostId() const{ return m_outpostId; }
inline bool OutpostIdHasBeenSet() const { return m_outpostIdHasBeenSet; }
inline void SetOutpostId(const Aws::String& value) { m_outpostIdHasBeenSet = true; m_outpostId = value; }
inline void SetOutpostId(Aws::String&& value) { m_outpostIdHasBeenSet = true; m_outpostId = std::move(value); }
inline void SetOutpostId(const char* value) { m_outpostIdHasBeenSet = true; m_outpostId.assign(value); }
inline DeleteOutpostRequest& WithOutpostId(const Aws::String& value) { SetOutpostId(value); return *this;}
inline DeleteOutpostRequest& WithOutpostId(Aws::String&& value) { SetOutpostId(std::move(value)); return *this;}
inline DeleteOutpostRequest& WithOutpostId(const char* value) { SetOutpostId(value); return *this;}
private:
Aws::String m_outpostId;
bool m_outpostIdHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API DeleteOutpostResult
{
public:
DeleteOutpostResult();
DeleteOutpostResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DeleteOutpostResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API DeleteSiteRequest : public OutpostsRequest
{
public:
DeleteSiteRequest();
// 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 "DeleteSite"; }
Aws::String SerializePayload() const override;
inline const Aws::String& GetSiteId() const{ return m_siteId; }
inline bool SiteIdHasBeenSet() const { return m_siteIdHasBeenSet; }
inline void SetSiteId(const Aws::String& value) { m_siteIdHasBeenSet = true; m_siteId = value; }
inline void SetSiteId(Aws::String&& value) { m_siteIdHasBeenSet = true; m_siteId = std::move(value); }
inline void SetSiteId(const char* value) { m_siteIdHasBeenSet = true; m_siteId.assign(value); }
inline DeleteSiteRequest& WithSiteId(const Aws::String& value) { SetSiteId(value); return *this;}
inline DeleteSiteRequest& WithSiteId(Aws::String&& value) { SetSiteId(std::move(value)); return *this;}
inline DeleteSiteRequest& WithSiteId(const char* value) { SetSiteId(value); return *this;}
private:
Aws::String m_siteId;
bool m_siteIdHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API DeleteSiteResult
{
public:
DeleteSiteResult();
DeleteSiteResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DeleteSiteResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,117 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API GetOutpostInstanceTypesRequest : public OutpostsRequest
{
public:
GetOutpostInstanceTypesRequest();
// 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 "GetOutpostInstanceTypes"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
inline const Aws::String& GetOutpostId() const{ return m_outpostId; }
inline bool OutpostIdHasBeenSet() const { return m_outpostIdHasBeenSet; }
inline void SetOutpostId(const Aws::String& value) { m_outpostIdHasBeenSet = true; m_outpostId = value; }
inline void SetOutpostId(Aws::String&& value) { m_outpostIdHasBeenSet = true; m_outpostId = std::move(value); }
inline void SetOutpostId(const char* value) { m_outpostIdHasBeenSet = true; m_outpostId.assign(value); }
inline GetOutpostInstanceTypesRequest& WithOutpostId(const Aws::String& value) { SetOutpostId(value); return *this;}
inline GetOutpostInstanceTypesRequest& WithOutpostId(Aws::String&& value) { SetOutpostId(std::move(value)); return *this;}
inline GetOutpostInstanceTypesRequest& WithOutpostId(const char* value) { SetOutpostId(value); return *this;}
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline GetOutpostInstanceTypesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline GetOutpostInstanceTypesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline GetOutpostInstanceTypesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline GetOutpostInstanceTypesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_outpostId;
bool m_outpostIdHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/outposts/model/InstanceTypeItem.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API GetOutpostInstanceTypesResult
{
public:
GetOutpostInstanceTypesResult();
GetOutpostInstanceTypesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetOutpostInstanceTypesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
inline const Aws::Vector<InstanceTypeItem>& GetInstanceTypes() const{ return m_instanceTypes; }
inline void SetInstanceTypes(const Aws::Vector<InstanceTypeItem>& value) { m_instanceTypes = value; }
inline void SetInstanceTypes(Aws::Vector<InstanceTypeItem>&& value) { m_instanceTypes = std::move(value); }
inline GetOutpostInstanceTypesResult& WithInstanceTypes(const Aws::Vector<InstanceTypeItem>& value) { SetInstanceTypes(value); return *this;}
inline GetOutpostInstanceTypesResult& WithInstanceTypes(Aws::Vector<InstanceTypeItem>&& value) { SetInstanceTypes(std::move(value)); return *this;}
inline GetOutpostInstanceTypesResult& AddInstanceTypes(const InstanceTypeItem& value) { m_instanceTypes.push_back(value); return *this; }
inline GetOutpostInstanceTypesResult& AddInstanceTypes(InstanceTypeItem&& value) { m_instanceTypes.push_back(std::move(value)); return *this; }
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline GetOutpostInstanceTypesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline GetOutpostInstanceTypesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline GetOutpostInstanceTypesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
inline const Aws::String& GetOutpostId() const{ return m_outpostId; }
inline void SetOutpostId(const Aws::String& value) { m_outpostId = value; }
inline void SetOutpostId(Aws::String&& value) { m_outpostId = std::move(value); }
inline void SetOutpostId(const char* value) { m_outpostId.assign(value); }
inline GetOutpostInstanceTypesResult& WithOutpostId(const Aws::String& value) { SetOutpostId(value); return *this;}
inline GetOutpostInstanceTypesResult& WithOutpostId(Aws::String&& value) { SetOutpostId(std::move(value)); return *this;}
inline GetOutpostInstanceTypesResult& WithOutpostId(const char* value) { SetOutpostId(value); return *this;}
inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
inline void SetOutpostArn(const Aws::String& value) { m_outpostArn = value; }
inline void SetOutpostArn(Aws::String&& value) { m_outpostArn = std::move(value); }
inline void SetOutpostArn(const char* value) { m_outpostArn.assign(value); }
inline GetOutpostInstanceTypesResult& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
inline GetOutpostInstanceTypesResult& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
inline GetOutpostInstanceTypesResult& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
private:
Aws::Vector<InstanceTypeItem> m_instanceTypes;
Aws::String m_nextToken;
Aws::String m_outpostId;
Aws::String m_outpostArn;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API GetOutpostRequest : public OutpostsRequest
{
public:
GetOutpostRequest();
// 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 "GetOutpost"; }
Aws::String SerializePayload() const override;
inline const Aws::String& GetOutpostId() const{ return m_outpostId; }
inline bool OutpostIdHasBeenSet() const { return m_outpostIdHasBeenSet; }
inline void SetOutpostId(const Aws::String& value) { m_outpostIdHasBeenSet = true; m_outpostId = value; }
inline void SetOutpostId(Aws::String&& value) { m_outpostIdHasBeenSet = true; m_outpostId = std::move(value); }
inline void SetOutpostId(const char* value) { m_outpostIdHasBeenSet = true; m_outpostId.assign(value); }
inline GetOutpostRequest& WithOutpostId(const Aws::String& value) { SetOutpostId(value); return *this;}
inline GetOutpostRequest& WithOutpostId(Aws::String&& value) { SetOutpostId(std::move(value)); return *this;}
inline GetOutpostRequest& WithOutpostId(const char* value) { SetOutpostId(value); return *this;}
private:
Aws::String m_outpostId;
bool m_outpostIdHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/model/Outpost.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API GetOutpostResult
{
public:
GetOutpostResult();
GetOutpostResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetOutpostResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
inline const Outpost& GetOutpost() const{ return m_outpost; }
inline void SetOutpost(const Outpost& value) { m_outpost = value; }
inline void SetOutpost(Outpost&& value) { m_outpost = std::move(value); }
inline GetOutpostResult& WithOutpost(const Outpost& value) { SetOutpost(value); return *this;}
inline GetOutpostResult& WithOutpost(Outpost&& value) { SetOutpost(std::move(value)); return *this;}
private:
Outpost m_outpost;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_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 Outposts
{
namespace Model
{
/**
* <p>Information about an instance type.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/InstanceTypeItem">AWS
* API Reference</a></p>
*/
class AWS_OUTPOSTS_API InstanceTypeItem
{
public:
InstanceTypeItem();
InstanceTypeItem(Aws::Utils::Json::JsonView jsonValue);
InstanceTypeItem& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetInstanceType() const{ return m_instanceType; }
inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); }
inline InstanceTypeItem& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;}
inline InstanceTypeItem& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;}
inline InstanceTypeItem& WithInstanceType(const char* value) { SetInstanceType(value); return *this;}
private:
Aws::String m_instanceType;
bool m_instanceTypeHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API ListOutpostsRequest : public OutpostsRequest
{
public:
ListOutpostsRequest();
// 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 "ListOutposts"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline ListOutpostsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListOutpostsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListOutpostsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline ListOutpostsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/outposts/model/Outpost.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API ListOutpostsResult
{
public:
ListOutpostsResult();
ListOutpostsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListOutpostsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
inline const Aws::Vector<Outpost>& GetOutposts() const{ return m_outposts; }
inline void SetOutposts(const Aws::Vector<Outpost>& value) { m_outposts = value; }
inline void SetOutposts(Aws::Vector<Outpost>&& value) { m_outposts = std::move(value); }
inline ListOutpostsResult& WithOutposts(const Aws::Vector<Outpost>& value) { SetOutposts(value); return *this;}
inline ListOutpostsResult& WithOutposts(Aws::Vector<Outpost>&& value) { SetOutposts(std::move(value)); return *this;}
inline ListOutpostsResult& AddOutposts(const Outpost& value) { m_outposts.push_back(value); return *this; }
inline ListOutpostsResult& AddOutposts(Outpost&& value) { m_outposts.push_back(std::move(value)); return *this; }
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline ListOutpostsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListOutpostsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListOutpostsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<Outpost> m_outposts;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/outposts/OutpostsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace Outposts
{
namespace Model
{
/**
*/
class AWS_OUTPOSTS_API ListSitesRequest : public OutpostsRequest
{
public:
ListSitesRequest();
// 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 "ListSites"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline ListSitesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSitesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSitesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline ListSitesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // 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/outposts/Outposts_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/outposts/model/Site.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Outposts
{
namespace Model
{
class AWS_OUTPOSTS_API ListSitesResult
{
public:
ListSitesResult();
ListSitesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListSitesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
inline const Aws::Vector<Site>& GetSites() const{ return m_sites; }
inline void SetSites(const Aws::Vector<Site>& value) { m_sites = value; }
inline void SetSites(Aws::Vector<Site>&& value) { m_sites = std::move(value); }
inline ListSitesResult& WithSites(const Aws::Vector<Site>& value) { SetSites(value); return *this;}
inline ListSitesResult& WithSites(Aws::Vector<Site>&& value) { SetSites(std::move(value)); return *this;}
inline ListSitesResult& AddSites(const Site& value) { m_sites.push_back(value); return *this; }
inline ListSitesResult& AddSites(Site&& value) { m_sites.push_back(std::move(value)); return *this; }
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline ListSitesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSitesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSitesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<Site> m_sites;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,296 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_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 Outposts
{
namespace Model
{
/**
* <p>Information about an Outpost.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/Outpost">AWS
* API Reference</a></p>
*/
class AWS_OUTPOSTS_API Outpost
{
public:
Outpost();
Outpost(Aws::Utils::Json::JsonView jsonValue);
Outpost& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetOutpostId() const{ return m_outpostId; }
inline bool OutpostIdHasBeenSet() const { return m_outpostIdHasBeenSet; }
inline void SetOutpostId(const Aws::String& value) { m_outpostIdHasBeenSet = true; m_outpostId = value; }
inline void SetOutpostId(Aws::String&& value) { m_outpostIdHasBeenSet = true; m_outpostId = std::move(value); }
inline void SetOutpostId(const char* value) { m_outpostIdHasBeenSet = true; m_outpostId.assign(value); }
inline Outpost& WithOutpostId(const Aws::String& value) { SetOutpostId(value); return *this;}
inline Outpost& WithOutpostId(Aws::String&& value) { SetOutpostId(std::move(value)); return *this;}
inline Outpost& WithOutpostId(const char* value) { SetOutpostId(value); return *this;}
inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); }
inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
inline Outpost& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
inline Outpost& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;}
inline Outpost& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
inline Outpost& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
inline Outpost& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
inline Outpost& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
inline const Aws::String& GetSiteId() const{ return m_siteId; }
inline bool SiteIdHasBeenSet() const { return m_siteIdHasBeenSet; }
inline void SetSiteId(const Aws::String& value) { m_siteIdHasBeenSet = true; m_siteId = value; }
inline void SetSiteId(Aws::String&& value) { m_siteIdHasBeenSet = true; m_siteId = std::move(value); }
inline void SetSiteId(const char* value) { m_siteIdHasBeenSet = true; m_siteId.assign(value); }
inline Outpost& WithSiteId(const Aws::String& value) { SetSiteId(value); return *this;}
inline Outpost& WithSiteId(Aws::String&& value) { SetSiteId(std::move(value)); return *this;}
inline Outpost& WithSiteId(const char* value) { SetSiteId(value); return *this;}
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline Outpost& WithName(const Aws::String& value) { SetName(value); return *this;}
inline Outpost& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline Outpost& WithName(const char* value) { SetName(value); return *this;}
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline Outpost& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline Outpost& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline Outpost& WithDescription(const char* value) { SetDescription(value); return *this;}
inline const Aws::String& GetLifeCycleStatus() const{ return m_lifeCycleStatus; }
inline bool LifeCycleStatusHasBeenSet() const { return m_lifeCycleStatusHasBeenSet; }
inline void SetLifeCycleStatus(const Aws::String& value) { m_lifeCycleStatusHasBeenSet = true; m_lifeCycleStatus = value; }
inline void SetLifeCycleStatus(Aws::String&& value) { m_lifeCycleStatusHasBeenSet = true; m_lifeCycleStatus = std::move(value); }
inline void SetLifeCycleStatus(const char* value) { m_lifeCycleStatusHasBeenSet = true; m_lifeCycleStatus.assign(value); }
inline Outpost& WithLifeCycleStatus(const Aws::String& value) { SetLifeCycleStatus(value); return *this;}
inline Outpost& WithLifeCycleStatus(Aws::String&& value) { SetLifeCycleStatus(std::move(value)); return *this;}
inline Outpost& WithLifeCycleStatus(const char* value) { SetLifeCycleStatus(value); return *this;}
inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
inline Outpost& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
inline Outpost& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
inline Outpost& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; }
inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; }
inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); }
inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); }
inline Outpost& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;}
inline Outpost& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;}
inline Outpost& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;}
private:
Aws::String m_outpostId;
bool m_outpostIdHasBeenSet;
Aws::String m_ownerId;
bool m_ownerIdHasBeenSet;
Aws::String m_outpostArn;
bool m_outpostArnHasBeenSet;
Aws::String m_siteId;
bool m_siteIdHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
Aws::String m_lifeCycleStatus;
bool m_lifeCycleStatusHasBeenSet;
Aws::String m_availabilityZone;
bool m_availabilityZoneHasBeenSet;
Aws::String m_availabilityZoneId;
bool m_availabilityZoneIdHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,156 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/outposts/Outposts_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 Outposts
{
namespace Model
{
/**
* <p>Information about a site.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/outposts-2019-12-03/Site">AWS API
* Reference</a></p>
*/
class AWS_OUTPOSTS_API Site
{
public:
Site();
Site(Aws::Utils::Json::JsonView jsonValue);
Site& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
inline const Aws::String& GetSiteId() const{ return m_siteId; }
inline bool SiteIdHasBeenSet() const { return m_siteIdHasBeenSet; }
inline void SetSiteId(const Aws::String& value) { m_siteIdHasBeenSet = true; m_siteId = value; }
inline void SetSiteId(Aws::String&& value) { m_siteIdHasBeenSet = true; m_siteId = std::move(value); }
inline void SetSiteId(const char* value) { m_siteIdHasBeenSet = true; m_siteId.assign(value); }
inline Site& WithSiteId(const Aws::String& value) { SetSiteId(value); return *this;}
inline Site& WithSiteId(Aws::String&& value) { SetSiteId(std::move(value)); return *this;}
inline Site& WithSiteId(const char* value) { SetSiteId(value); return *this;}
inline const Aws::String& GetAccountId() const{ return m_accountId; }
inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
inline Site& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
inline Site& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
inline Site& WithAccountId(const char* value) { SetAccountId(value); return *this;}
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline Site& WithName(const Aws::String& value) { SetName(value); return *this;}
inline Site& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline Site& WithName(const char* value) { SetName(value); return *this;}
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline Site& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline Site& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline Site& WithDescription(const char* value) { SetDescription(value); return *this;}
private:
Aws::String m_siteId;
bool m_siteIdHasBeenSet;
Aws::String m_accountId;
bool m_accountIdHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
};
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,317 @@
/**
* 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/outposts/OutpostsClient.h>
#include <aws/outposts/OutpostsEndpoint.h>
#include <aws/outposts/OutpostsErrorMarshaller.h>
#include <aws/outposts/model/CreateOutpostRequest.h>
#include <aws/outposts/model/DeleteOutpostRequest.h>
#include <aws/outposts/model/DeleteSiteRequest.h>
#include <aws/outposts/model/GetOutpostRequest.h>
#include <aws/outposts/model/GetOutpostInstanceTypesRequest.h>
#include <aws/outposts/model/ListOutpostsRequest.h>
#include <aws/outposts/model/ListSitesRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::Outposts;
using namespace Aws::Outposts::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "outposts";
static const char* ALLOCATION_TAG = "OutpostsClient";
OutpostsClient::OutpostsClient(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<OutpostsErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
OutpostsClient::OutpostsClient(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<OutpostsErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
OutpostsClient::OutpostsClient(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<OutpostsErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
OutpostsClient::~OutpostsClient()
{
}
void OutpostsClient::init(const ClientConfiguration& config)
{
SetServiceClientName("Outposts");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + OutpostsEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void OutpostsClient::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;
}
}
CreateOutpostOutcome OutpostsClient::CreateOutpost(const CreateOutpostRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/outposts";
uri.SetPath(uri.GetPath() + ss.str());
return CreateOutpostOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateOutpostOutcomeCallable OutpostsClient::CreateOutpostCallable(const CreateOutpostRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateOutpostOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateOutpost(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::CreateOutpostAsync(const CreateOutpostRequest& request, const CreateOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateOutpostAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::CreateOutpostAsyncHelper(const CreateOutpostRequest& request, const CreateOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateOutpost(request), context);
}
DeleteOutpostOutcome OutpostsClient::DeleteOutpost(const DeleteOutpostRequest& request) const
{
if (!request.OutpostIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteOutpost", "Required field: OutpostId, is not set");
return DeleteOutpostOutcome(Aws::Client::AWSError<OutpostsErrors>(OutpostsErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [OutpostId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/outposts/";
ss << request.GetOutpostId();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteOutpostOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteOutpostOutcomeCallable OutpostsClient::DeleteOutpostCallable(const DeleteOutpostRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteOutpostOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteOutpost(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::DeleteOutpostAsync(const DeleteOutpostRequest& request, const DeleteOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteOutpostAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::DeleteOutpostAsyncHelper(const DeleteOutpostRequest& request, const DeleteOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteOutpost(request), context);
}
DeleteSiteOutcome OutpostsClient::DeleteSite(const DeleteSiteRequest& request) const
{
if (!request.SiteIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("DeleteSite", "Required field: SiteId, is not set");
return DeleteSiteOutcome(Aws::Client::AWSError<OutpostsErrors>(OutpostsErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SiteId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/sites/";
ss << request.GetSiteId();
uri.SetPath(uri.GetPath() + ss.str());
return DeleteSiteOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
}
DeleteSiteOutcomeCallable OutpostsClient::DeleteSiteCallable(const DeleteSiteRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteSiteOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteSite(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::DeleteSiteAsync(const DeleteSiteRequest& request, const DeleteSiteResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteSiteAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::DeleteSiteAsyncHelper(const DeleteSiteRequest& request, const DeleteSiteResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteSite(request), context);
}
GetOutpostOutcome OutpostsClient::GetOutpost(const GetOutpostRequest& request) const
{
if (!request.OutpostIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetOutpost", "Required field: OutpostId, is not set");
return GetOutpostOutcome(Aws::Client::AWSError<OutpostsErrors>(OutpostsErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [OutpostId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/outposts/";
ss << request.GetOutpostId();
uri.SetPath(uri.GetPath() + ss.str());
return GetOutpostOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetOutpostOutcomeCallable OutpostsClient::GetOutpostCallable(const GetOutpostRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetOutpostOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetOutpost(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::GetOutpostAsync(const GetOutpostRequest& request, const GetOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetOutpostAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::GetOutpostAsyncHelper(const GetOutpostRequest& request, const GetOutpostResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetOutpost(request), context);
}
GetOutpostInstanceTypesOutcome OutpostsClient::GetOutpostInstanceTypes(const GetOutpostInstanceTypesRequest& request) const
{
if (!request.OutpostIdHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetOutpostInstanceTypes", "Required field: OutpostId, is not set");
return GetOutpostInstanceTypesOutcome(Aws::Client::AWSError<OutpostsErrors>(OutpostsErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [OutpostId]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/outposts/";
ss << request.GetOutpostId();
ss << "/instanceTypes";
uri.SetPath(uri.GetPath() + ss.str());
return GetOutpostInstanceTypesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetOutpostInstanceTypesOutcomeCallable OutpostsClient::GetOutpostInstanceTypesCallable(const GetOutpostInstanceTypesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetOutpostInstanceTypesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetOutpostInstanceTypes(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::GetOutpostInstanceTypesAsync(const GetOutpostInstanceTypesRequest& request, const GetOutpostInstanceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetOutpostInstanceTypesAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::GetOutpostInstanceTypesAsyncHelper(const GetOutpostInstanceTypesRequest& request, const GetOutpostInstanceTypesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetOutpostInstanceTypes(request), context);
}
ListOutpostsOutcome OutpostsClient::ListOutposts(const ListOutpostsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/outposts";
uri.SetPath(uri.GetPath() + ss.str());
return ListOutpostsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListOutpostsOutcomeCallable OutpostsClient::ListOutpostsCallable(const ListOutpostsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListOutpostsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListOutposts(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::ListOutpostsAsync(const ListOutpostsRequest& request, const ListOutpostsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListOutpostsAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::ListOutpostsAsyncHelper(const ListOutpostsRequest& request, const ListOutpostsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListOutposts(request), context);
}
ListSitesOutcome OutpostsClient::ListSites(const ListSitesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/sites";
uri.SetPath(uri.GetPath() + ss.str());
return ListSitesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
ListSitesOutcomeCallable OutpostsClient::ListSitesCallable(const ListSitesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListSitesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListSites(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void OutpostsClient::ListSitesAsync(const ListSitesRequest& request, const ListSitesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListSitesAsyncHelper( request, handler, context ); } );
}
void OutpostsClient::ListSitesAsyncHelper(const ListSitesRequest& request, const ListSitesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListSites(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/outposts/OutpostsEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::Outposts;
namespace Aws
{
namespace Outposts
{
namespace OutpostsEndpoint
{
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 << "outposts" << ".";
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 OutpostsEndpoint
} // namespace Outposts
} // 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/outposts/OutpostsErrorMarshaller.h>
#include <aws/outposts/OutpostsErrors.h>
using namespace Aws::Client;
using namespace Aws::Outposts;
AWSError<CoreErrors> OutpostsErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = OutpostsErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,47 @@
/**
* 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/outposts/OutpostsErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::Outposts;
namespace Aws
{
namespace Outposts
{
namespace OutpostsErrorMapper
{
static const int SERVICE_QUOTA_EXCEEDED_HASH = HashingUtils::HashString("ServiceQuotaExceededException");
static const int NOT_FOUND_HASH = HashingUtils::HashString("NotFoundException");
static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == SERVICE_QUOTA_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(OutpostsErrors::SERVICE_QUOTA_EXCEEDED), false);
}
else if (hashCode == NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(OutpostsErrors::NOT_FOUND), false);
}
else if (hashCode == INTERNAL_SERVER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(OutpostsErrors::INTERNAL_SERVER), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace OutpostsErrorMapper
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/CreateOutpostRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateOutpostRequest::CreateOutpostRequest() :
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_siteIdHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_availabilityZoneIdHasBeenSet(false)
{
}
Aws::String CreateOutpostRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_siteIdHasBeenSet)
{
payload.WithString("SiteId", m_siteId);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("AvailabilityZone", m_availabilityZone);
}
if(m_availabilityZoneIdHasBeenSet)
{
payload.WithString("AvailabilityZoneId", m_availabilityZoneId);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/CreateOutpostResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateOutpostResult::CreateOutpostResult()
{
}
CreateOutpostResult::CreateOutpostResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateOutpostResult& CreateOutpostResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Outpost"))
{
m_outpost = jsonValue.GetObject("Outpost");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/DeleteOutpostRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteOutpostRequest::DeleteOutpostRequest() :
m_outpostIdHasBeenSet(false)
{
}
Aws::String DeleteOutpostRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/DeleteOutpostResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteOutpostResult::DeleteOutpostResult()
{
}
DeleteOutpostResult::DeleteOutpostResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteOutpostResult& DeleteOutpostResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/DeleteSiteRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteSiteRequest::DeleteSiteRequest() :
m_siteIdHasBeenSet(false)
{
}
Aws::String DeleteSiteRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/DeleteSiteResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteSiteResult::DeleteSiteResult()
{
}
DeleteSiteResult::DeleteSiteResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteSiteResult& DeleteSiteResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/GetOutpostInstanceTypesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetOutpostInstanceTypesRequest::GetOutpostInstanceTypesRequest() :
m_outpostIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String GetOutpostInstanceTypesRequest::SerializePayload() const
{
return {};
}
void GetOutpostInstanceTypesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("MaxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/GetOutpostInstanceTypesResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetOutpostInstanceTypesResult::GetOutpostInstanceTypesResult()
{
}
GetOutpostInstanceTypesResult::GetOutpostInstanceTypesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetOutpostInstanceTypesResult& GetOutpostInstanceTypesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("InstanceTypes"))
{
Array<JsonView> instanceTypesJsonList = jsonValue.GetArray("InstanceTypes");
for(unsigned instanceTypesIndex = 0; instanceTypesIndex < instanceTypesJsonList.GetLength(); ++instanceTypesIndex)
{
m_instanceTypes.push_back(instanceTypesJsonList[instanceTypesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
if(jsonValue.ValueExists("OutpostId"))
{
m_outpostId = jsonValue.GetString("OutpostId");
}
if(jsonValue.ValueExists("OutpostArn"))
{
m_outpostArn = jsonValue.GetString("OutpostArn");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/GetOutpostRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetOutpostRequest::GetOutpostRequest() :
m_outpostIdHasBeenSet(false)
{
}
Aws::String GetOutpostRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/GetOutpostResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetOutpostResult::GetOutpostResult()
{
}
GetOutpostResult::GetOutpostResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetOutpostResult& GetOutpostResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Outpost"))
{
m_outpost = jsonValue.GetObject("Outpost");
}
return *this;
}

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/InstanceTypeItem.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Outposts
{
namespace Model
{
InstanceTypeItem::InstanceTypeItem() :
m_instanceTypeHasBeenSet(false)
{
}
InstanceTypeItem::InstanceTypeItem(JsonView jsonValue) :
m_instanceTypeHasBeenSet(false)
{
*this = jsonValue;
}
InstanceTypeItem& InstanceTypeItem::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("InstanceType"))
{
m_instanceType = jsonValue.GetString("InstanceType");
m_instanceTypeHasBeenSet = true;
}
return *this;
}
JsonValue InstanceTypeItem::Jsonize() const
{
JsonValue payload;
if(m_instanceTypeHasBeenSet)
{
payload.WithString("InstanceType", m_instanceType);
}
return payload;
}
} // namespace Model
} // namespace Outposts
} // 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/outposts/model/ListOutpostsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListOutpostsRequest::ListOutpostsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListOutpostsRequest::SerializePayload() const
{
return {};
}
void ListOutpostsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("MaxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/ListOutpostsResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListOutpostsResult::ListOutpostsResult()
{
}
ListOutpostsResult::ListOutpostsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListOutpostsResult& ListOutpostsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Outposts"))
{
Array<JsonView> outpostsJsonList = jsonValue.GetArray("Outposts");
for(unsigned outpostsIndex = 0; outpostsIndex < outpostsJsonList.GetLength(); ++outpostsIndex)
{
m_outposts.push_back(outpostsJsonList[outpostsIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/ListSitesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListSitesRequest::ListSitesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListSitesRequest::SerializePayload() const
{
return {};
}
void ListSitesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("NextToken", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("MaxResults", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/ListSitesResult.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::Outposts::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListSitesResult::ListSitesResult()
{
}
ListSitesResult::ListSitesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListSitesResult& ListSitesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Sites"))
{
Array<JsonView> sitesJsonList = jsonValue.GetArray("Sites");
for(unsigned sitesIndex = 0; sitesIndex < sitesJsonList.GetLength(); ++sitesIndex)
{
m_sites.push_back(sitesJsonList[sitesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,179 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/Outpost.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Outposts
{
namespace Model
{
Outpost::Outpost() :
m_outpostIdHasBeenSet(false),
m_ownerIdHasBeenSet(false),
m_outpostArnHasBeenSet(false),
m_siteIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_lifeCycleStatusHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_availabilityZoneIdHasBeenSet(false)
{
}
Outpost::Outpost(JsonView jsonValue) :
m_outpostIdHasBeenSet(false),
m_ownerIdHasBeenSet(false),
m_outpostArnHasBeenSet(false),
m_siteIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_lifeCycleStatusHasBeenSet(false),
m_availabilityZoneHasBeenSet(false),
m_availabilityZoneIdHasBeenSet(false)
{
*this = jsonValue;
}
Outpost& Outpost::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("OutpostId"))
{
m_outpostId = jsonValue.GetString("OutpostId");
m_outpostIdHasBeenSet = true;
}
if(jsonValue.ValueExists("OwnerId"))
{
m_ownerId = jsonValue.GetString("OwnerId");
m_ownerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("OutpostArn"))
{
m_outpostArn = jsonValue.GetString("OutpostArn");
m_outpostArnHasBeenSet = true;
}
if(jsonValue.ValueExists("SiteId"))
{
m_siteId = jsonValue.GetString("SiteId");
m_siteIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("LifeCycleStatus"))
{
m_lifeCycleStatus = jsonValue.GetString("LifeCycleStatus");
m_lifeCycleStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("AvailabilityZone"))
{
m_availabilityZone = jsonValue.GetString("AvailabilityZone");
m_availabilityZoneHasBeenSet = true;
}
if(jsonValue.ValueExists("AvailabilityZoneId"))
{
m_availabilityZoneId = jsonValue.GetString("AvailabilityZoneId");
m_availabilityZoneIdHasBeenSet = true;
}
return *this;
}
JsonValue Outpost::Jsonize() const
{
JsonValue payload;
if(m_outpostIdHasBeenSet)
{
payload.WithString("OutpostId", m_outpostId);
}
if(m_ownerIdHasBeenSet)
{
payload.WithString("OwnerId", m_ownerId);
}
if(m_outpostArnHasBeenSet)
{
payload.WithString("OutpostArn", m_outpostArn);
}
if(m_siteIdHasBeenSet)
{
payload.WithString("SiteId", m_siteId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_lifeCycleStatusHasBeenSet)
{
payload.WithString("LifeCycleStatus", m_lifeCycleStatus);
}
if(m_availabilityZoneHasBeenSet)
{
payload.WithString("AvailabilityZone", m_availabilityZone);
}
if(m_availabilityZoneIdHasBeenSet)
{
payload.WithString("AvailabilityZoneId", m_availabilityZoneId);
}
return payload;
}
} // namespace Model
} // namespace Outposts
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/outposts/model/Site.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Outposts
{
namespace Model
{
Site::Site() :
m_siteIdHasBeenSet(false),
m_accountIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false)
{
}
Site::Site(JsonView jsonValue) :
m_siteIdHasBeenSet(false),
m_accountIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false)
{
*this = jsonValue;
}
Site& Site::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("SiteId"))
{
m_siteId = jsonValue.GetString("SiteId");
m_siteIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
m_accountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
return *this;
}
JsonValue Site::Jsonize() const
{
JsonValue payload;
if(m_siteIdHasBeenSet)
{
payload.WithString("SiteId", m_siteId);
}
if(m_accountIdHasBeenSet)
{
payload.WithString("AccountId", m_accountId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
return payload;
}
} // namespace Model
} // namespace Outposts
} // namespace Aws