/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
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 IoTSecureTunneling
{
namespace Model
{
class CloseTunnelRequest;
class DescribeTunnelRequest;
class ListTagsForResourceRequest;
class ListTunnelsRequest;
class OpenTunnelRequest;
class TagResourceRequest;
class UntagResourceRequest;
typedef Aws::Utils::Outcome CloseTunnelOutcome;
typedef Aws::Utils::Outcome DescribeTunnelOutcome;
typedef Aws::Utils::Outcome ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome ListTunnelsOutcome;
typedef Aws::Utils::Outcome OpenTunnelOutcome;
typedef Aws::Utils::Outcome TagResourceOutcome;
typedef Aws::Utils::Outcome UntagResourceOutcome;
typedef std::future CloseTunnelOutcomeCallable;
typedef std::future DescribeTunnelOutcomeCallable;
typedef std::future ListTagsForResourceOutcomeCallable;
typedef std::future ListTunnelsOutcomeCallable;
typedef std::future OpenTunnelOutcomeCallable;
typedef std::future TagResourceOutcomeCallable;
typedef std::future UntagResourceOutcomeCallable;
} // namespace Model
class IoTSecureTunnelingClient;
typedef std::function&) > CloseTunnelResponseReceivedHandler;
typedef std::function&) > DescribeTunnelResponseReceivedHandler;
typedef std::function&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function&) > ListTunnelsResponseReceivedHandler;
typedef std::function&) > OpenTunnelResponseReceivedHandler;
typedef std::function&) > TagResourceResponseReceivedHandler;
typedef std::function&) > UntagResourceResponseReceivedHandler;
/**
* AWS IoT Secure Tunneling AWS IoT Secure Tunnling enables
* you to create remote connections to devices deployed in the field.
For
* more information about how AWS IoT Secure Tunneling works, see the User
* Guide.
*/
class AWS_IOTSECURETUNNELING_API IoTSecureTunnelingClient : 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.
*/
IoTSecureTunnelingClient(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.
*/
IoTSecureTunnelingClient(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
*/
IoTSecureTunnelingClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~IoTSecureTunnelingClient();
/**
* Closes a tunnel identified by the unique tunnel id. When a
* CloseTunnel request is received, we close the WebSocket connections
* between the client and proxy server so no data can be transmitted.
See
* Also:
AWS
* API Reference
*/
virtual Model::CloseTunnelOutcome CloseTunnel(const Model::CloseTunnelRequest& request) const;
/**
* Closes a tunnel identified by the unique tunnel id. When a
* CloseTunnel request is received, we close the WebSocket connections
* between the client and proxy server so no data can be transmitted.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CloseTunnelOutcomeCallable CloseTunnelCallable(const Model::CloseTunnelRequest& request) const;
/**
* Closes a tunnel identified by the unique tunnel id. When a
* CloseTunnel request is received, we close the WebSocket connections
* between the client and proxy server so no data can be transmitted.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CloseTunnelAsync(const Model::CloseTunnelRequest& request, const CloseTunnelResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Gets information about a tunnel identified by the unique tunnel
* id.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeTunnelOutcome DescribeTunnel(const Model::DescribeTunnelRequest& request) const;
/**
* Gets information about a tunnel identified by the unique tunnel
* id.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeTunnelOutcomeCallable DescribeTunnelCallable(const Model::DescribeTunnelRequest& request) const;
/**
* Gets information about a tunnel identified by the unique tunnel
* id.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeTunnelAsync(const Model::DescribeTunnelRequest& request, const DescribeTunnelResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* List all tunnels for an AWS account. Tunnels are listed by creation time in
* descending order, newer tunnels will be listed before older
* tunnels.
See Also:
AWS
* API Reference
*/
virtual Model::ListTunnelsOutcome ListTunnels(const Model::ListTunnelsRequest& request) const;
/**
* List all tunnels for an AWS account. Tunnels are listed by creation time in
* descending order, newer tunnels will be listed before older
* tunnels.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTunnelsOutcomeCallable ListTunnelsCallable(const Model::ListTunnelsRequest& request) const;
/**
* List all tunnels for an AWS account. Tunnels are listed by creation time in
* descending order, newer tunnels will be listed before older
* tunnels.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTunnelsAsync(const Model::ListTunnelsRequest& request, const ListTunnelsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Creates a new tunnel, and returns two client access tokens for clients to use
* to connect to the AWS IoT Secure Tunneling proxy server. .
See
* Also:
AWS
* API Reference
*/
virtual Model::OpenTunnelOutcome OpenTunnel(const Model::OpenTunnelRequest& request) const;
/**
* Creates a new tunnel, and returns two client access tokens for clients to use
* to connect to the AWS IoT Secure Tunneling proxy server. .
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::OpenTunnelOutcomeCallable OpenTunnelCallable(const Model::OpenTunnelRequest& request) const;
/**
* Creates a new tunnel, and returns two client access tokens for clients to use
* to connect to the AWS IoT Secure Tunneling proxy server. .
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void OpenTunnelAsync(const Model::OpenTunnelRequest& request, const OpenTunnelResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* A resource tag.
See Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* A resource tag.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* A resource tag.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Removes a tag from a resource.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* Removes a tag from a resource.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const;
/**
* Removes a tag from a resource.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CloseTunnelAsyncHelper(const Model::CloseTunnelRequest& request, const CloseTunnelResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeTunnelAsyncHelper(const Model::DescribeTunnelRequest& request, const DescribeTunnelResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTunnelsAsyncHelper(const Model::ListTunnelsRequest& request, const ListTunnelsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void OpenTunnelAsyncHelper(const Model::OpenTunnelRequest& request, const OpenTunnelResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace IoTSecureTunneling
} // namespace Aws