/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace ApiGatewayManagementApi
{
/**
* The Amazon API Gateway Management API allows you to directly manage runtime
* aspects of your deployed APIs. To use it, you must explicitly set the SDK's
* endpoint to point to the endpoint of your deployed API. The endpoint will be of
* the form https://{api-id}.execute-api.{region}.amazonaws.com/{stage}, or will be
* the endpoint corresponding to your API's custom domain and base path, if
* applicable.
*/
class AWS_APIGATEWAYMANAGEMENTAPI_API ApiGatewayManagementApiClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef ApiGatewayManagementApiClientConfiguration ClientConfigurationType;
typedef ApiGatewayManagementApiEndpointProvider EndpointProviderType;
/**
* 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.
*/
ApiGatewayManagementApiClient(const Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration& clientConfiguration = Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* 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.
*/
ApiGatewayManagementApiClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration& clientConfiguration = Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration());
/**
* 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
*/
ApiGatewayManagementApiClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration& clientConfiguration = Aws::ApiGatewayManagementApi::ApiGatewayManagementApiClientConfiguration());
/* Legacy constructors due deprecation */
/**
* 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.
*/
ApiGatewayManagementApiClient(const Aws::Client::ClientConfiguration& 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.
*/
ApiGatewayManagementApiClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& 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
*/
ApiGatewayManagementApiClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~ApiGatewayManagementApiClient();
/**
* Delete the connection with the provided id.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteConnectionOutcome DeleteConnection(const Model::DeleteConnectionRequest& request) const;
/**
* A Callable wrapper for DeleteConnection that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteConnectionOutcomeCallable DeleteConnectionCallable(const DeleteConnectionRequestT& request) const
{
return SubmitCallable(&ApiGatewayManagementApiClient::DeleteConnection, request);
}
/**
* An Async wrapper for DeleteConnection that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteConnectionAsync(const DeleteConnectionRequestT& request, const DeleteConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ApiGatewayManagementApiClient::DeleteConnection, request, handler, context);
}
/**
* Get information about the connection with the provided id.
See
* Also:
AWS
* API Reference
*/
virtual Model::GetConnectionOutcome GetConnection(const Model::GetConnectionRequest& request) const;
/**
* A Callable wrapper for GetConnection that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetConnectionOutcomeCallable GetConnectionCallable(const GetConnectionRequestT& request) const
{
return SubmitCallable(&ApiGatewayManagementApiClient::GetConnection, request);
}
/**
* An Async wrapper for GetConnection that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetConnectionAsync(const GetConnectionRequestT& request, const GetConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ApiGatewayManagementApiClient::GetConnection, request, handler, context);
}
/**
* Sends the provided data to the specified connection.
See Also:
* AWS
* API Reference
*/
virtual Model::PostToConnectionOutcome PostToConnection(const Model::PostToConnectionRequest& request) const;
/**
* A Callable wrapper for PostToConnection that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PostToConnectionOutcomeCallable PostToConnectionCallable(const PostToConnectionRequestT& request) const
{
return SubmitCallable(&ApiGatewayManagementApiClient::PostToConnection, request);
}
/**
* An Async wrapper for PostToConnection that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PostToConnectionAsync(const PostToConnectionRequestT& request, const PostToConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ApiGatewayManagementApiClient::PostToConnection, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const ApiGatewayManagementApiClientConfiguration& clientConfiguration);
ApiGatewayManagementApiClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace ApiGatewayManagementApi
} // namespace Aws