/** * 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 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 ApiGatewayManagementApi { namespace Model { class DeleteConnectionRequest; class GetConnectionRequest; class PostToConnectionRequest; typedef Aws::Utils::Outcome DeleteConnectionOutcome; typedef Aws::Utils::Outcome GetConnectionOutcome; typedef Aws::Utils::Outcome PostToConnectionOutcome; typedef std::future DeleteConnectionOutcomeCallable; typedef std::future GetConnectionOutcomeCallable; typedef std::future PostToConnectionOutcomeCallable; } // namespace Model class ApiGatewayManagementApiClient; typedef std::function&) > DeleteConnectionResponseReceivedHandler; typedef std::function&) > GetConnectionResponseReceivedHandler; typedef std::function&) > PostToConnectionResponseReceivedHandler; /** *

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: 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. */ ApiGatewayManagementApiClient(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. */ ApiGatewayManagementApiClient(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 */ ApiGatewayManagementApiClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~ApiGatewayManagementApiClient(); /** *

Delete the connection with the provided id.

See Also:

AWS * API Reference

*/ virtual Model::DeleteConnectionOutcome DeleteConnection(const Model::DeleteConnectionRequest& request) const; /** *

Delete the connection with the provided 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::DeleteConnectionOutcomeCallable DeleteConnectionCallable(const Model::DeleteConnectionRequest& request) const; /** *

Delete the connection with the provided id.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DeleteConnectionAsync(const Model::DeleteConnectionRequest& request, const DeleteConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Get information about the connection with the provided id.

See * Also:

AWS * API Reference

*/ virtual Model::GetConnectionOutcome GetConnection(const Model::GetConnectionRequest& request) const; /** *

Get information about the connection with the provided 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::GetConnectionOutcomeCallable GetConnectionCallable(const Model::GetConnectionRequest& request) const; /** *

Get information about the connection with the provided id.

See * Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetConnectionAsync(const Model::GetConnectionRequest& request, const GetConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Sends the provided data to the specified connection.

See Also:

* AWS * API Reference

*/ virtual Model::PostToConnectionOutcome PostToConnection(const Model::PostToConnectionRequest& request) const; /** *

Sends the provided data to the specified connection.

See Also:

* AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::PostToConnectionOutcomeCallable PostToConnectionCallable(const Model::PostToConnectionRequest& request) const; /** *

Sends the provided data to the specified connection.

See Also:

* AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void PostToConnectionAsync(const Model::PostToConnectionRequest& request, const PostToConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void DeleteConnectionAsyncHelper(const Model::DeleteConnectionRequest& request, const DeleteConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetConnectionAsyncHelper(const Model::GetConnectionRequest& request, const GetConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void PostToConnectionAsyncHelper(const Model::PostToConnectionRequest& request, const PostToConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr m_executor; }; } // namespace ApiGatewayManagementApi } // namespace Aws