/**
* 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
#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 CodeStarconnections
{
namespace Model
{
class CreateConnectionRequest;
class CreateHostRequest;
class DeleteConnectionRequest;
class DeleteHostRequest;
class GetConnectionRequest;
class GetHostRequest;
class ListConnectionsRequest;
class ListHostsRequest;
class ListTagsForResourceRequest;
class TagResourceRequest;
class UntagResourceRequest;
typedef Aws::Utils::Outcome CreateConnectionOutcome;
typedef Aws::Utils::Outcome CreateHostOutcome;
typedef Aws::Utils::Outcome DeleteConnectionOutcome;
typedef Aws::Utils::Outcome DeleteHostOutcome;
typedef Aws::Utils::Outcome GetConnectionOutcome;
typedef Aws::Utils::Outcome GetHostOutcome;
typedef Aws::Utils::Outcome ListConnectionsOutcome;
typedef Aws::Utils::Outcome ListHostsOutcome;
typedef Aws::Utils::Outcome ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome TagResourceOutcome;
typedef Aws::Utils::Outcome UntagResourceOutcome;
typedef std::future CreateConnectionOutcomeCallable;
typedef std::future CreateHostOutcomeCallable;
typedef std::future DeleteConnectionOutcomeCallable;
typedef std::future DeleteHostOutcomeCallable;
typedef std::future GetConnectionOutcomeCallable;
typedef std::future GetHostOutcomeCallable;
typedef std::future ListConnectionsOutcomeCallable;
typedef std::future ListHostsOutcomeCallable;
typedef std::future ListTagsForResourceOutcomeCallable;
typedef std::future TagResourceOutcomeCallable;
typedef std::future UntagResourceOutcomeCallable;
} // namespace Model
class CodeStarconnectionsClient;
typedef std::function&) > CreateConnectionResponseReceivedHandler;
typedef std::function&) > CreateHostResponseReceivedHandler;
typedef std::function&) > DeleteConnectionResponseReceivedHandler;
typedef std::function&) > DeleteHostResponseReceivedHandler;
typedef std::function&) > GetConnectionResponseReceivedHandler;
typedef std::function&) > GetHostResponseReceivedHandler;
typedef std::function&) > ListConnectionsResponseReceivedHandler;
typedef std::function&) > ListHostsResponseReceivedHandler;
typedef std::function&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function&) > TagResourceResponseReceivedHandler;
typedef std::function&) > UntagResourceResponseReceivedHandler;
/**
* AWS CodeStar Connections The CodeStar
* Connections feature is in preview release and is subject to change.
* This AWS CodeStar Connections API Reference provides
* descriptions and usage examples of the operations and data types for the AWS
* CodeStar Connections API. You can use the connections API to work with
* connections and installations.
Connections are configurations
* that you use to connect AWS resources to external code repositories. Each
* connection is a resource that can be given to services such as CodePipeline to
* connect to a third-party repository such as Bitbucket. For example, you can add
* the connection in CodePipeline so that it triggers your pipeline when a code
* change is made to your third-party code repository. Each connection is named and
* associated with a unique ARN that is used to reference the connection.
* When you create a connection, the console initiates a third-party connection
* handshake. Installations are the apps that are used to conduct this
* handshake. For example, the installation for the Bitbucket provider type is the
* Bitbucket Cloud app. When you create a connection, you can choose an existing
* installation or create one.
When you want to create a connection to an
* installed provider type such as GitHub Enterprise Server, you create a
* host for your connections.
You can work with connections by
* calling:
-
CreateConnection, which creates a uniquely
* named connection that can be referenced by services such as CodePipeline.
* -
DeleteConnection, which deletes the specified
* connection.
-
GetConnection, which returns information
* about the connection, including the connection status.
-
* ListConnections, which lists the connections associated with your
* account.
You can work with hosts by calling:
-
*
CreateHost, which creates a host that represents the infrastructure
* where your provider is installed.
-
DeleteHost, which
* deletes the specified host.
-
GetHost, which returns
* information about the host, including the setup status.
-
* ListHosts, which lists the hosts associated with your account.
*
You can work with tags in AWS CodeStar Connections by calling the
* following:
-
ListTagsForResource, which gets information
* about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeStar
* Connections.
-
TagResource, which adds or updates tags
* for a resource in AWS CodeStar Connections.
-
* UntagResource, which removes tags for a resource in AWS CodeStar
* Connections.
For information about how to use AWS CodeStar
* Connections, see the Developer
* Tools User Guide.
*/
class AWS_CODESTARCONNECTIONS_API CodeStarconnectionsClient : 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.
*/
CodeStarconnectionsClient(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.
*/
CodeStarconnectionsClient(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
*/
CodeStarconnectionsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~CodeStarconnectionsClient();
/**
* Creates a connection that can then be given to other AWS services like
* CodePipeline so that it can access third-party code repositories. The connection
* is in pending status until the third-party connection handshake is completed
* from the console.
See Also:
AWS
* API Reference
*/
virtual Model::CreateConnectionOutcome CreateConnection(const Model::CreateConnectionRequest& request) const;
/**
* Creates a connection that can then be given to other AWS services like
* CodePipeline so that it can access third-party code repositories. The connection
* is in pending status until the third-party connection handshake is completed
* from the console.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateConnectionOutcomeCallable CreateConnectionCallable(const Model::CreateConnectionRequest& request) const;
/**
* Creates a connection that can then be given to other AWS services like
* CodePipeline so that it can access third-party code repositories. The connection
* is in pending status until the third-party connection handshake is completed
* from the console.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateConnectionAsync(const Model::CreateConnectionRequest& request, const CreateConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Creates a resource that represents the infrastructure where a third-party
* provider is installed. The host is used when you create connections to an
* installed third-party provider type, such as GitHub Enterprise Server. You
* create one host for all connections to that provider.
A host
* created through the CLI or the SDK is in `PENDING` status by default. You can
* make its status `AVAILABLE` by setting up the host in the console.
* See Also:
AWS
* API Reference
*/
virtual Model::CreateHostOutcome CreateHost(const Model::CreateHostRequest& request) const;
/**
* Creates a resource that represents the infrastructure where a third-party
* provider is installed. The host is used when you create connections to an
* installed third-party provider type, such as GitHub Enterprise Server. You
* create one host for all connections to that provider.
A host
* created through the CLI or the SDK is in `PENDING` status by default. You can
* make its status `AVAILABLE` by setting up the host in the console.
* See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateHostOutcomeCallable CreateHostCallable(const Model::CreateHostRequest& request) const;
/**
* Creates a resource that represents the infrastructure where a third-party
* provider is installed. The host is used when you create connections to an
* installed third-party provider type, such as GitHub Enterprise Server. You
* create one host for all connections to that provider.
A host
* created through the CLI or the SDK is in `PENDING` status by default. You can
* make its status `AVAILABLE` by setting up the host in the console.
* See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateHostAsync(const Model::CreateHostRequest& request, const CreateHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* The connection to be deleted.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteConnectionOutcome DeleteConnection(const Model::DeleteConnectionRequest& request) const;
/**
* The connection to be deleted.
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;
/**
* The connection to be deleted.
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;
/**
* The host to be deleted. Before you delete a host, all connections associated
* to the host must be deleted.
A host cannot be deleted if it is in
* the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
See
* Also:
AWS
* API Reference
*/
virtual Model::DeleteHostOutcome DeleteHost(const Model::DeleteHostRequest& request) const;
/**
* The host to be deleted. Before you delete a host, all connections associated
* to the host must be deleted.
A host cannot be deleted if it is in
* the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteHostOutcomeCallable DeleteHostCallable(const Model::DeleteHostRequest& request) const;
/**
* The host to be deleted. Before you delete a host, all connections associated
* to the host must be deleted.
A host cannot be deleted if it is in
* the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteHostAsync(const Model::DeleteHostRequest& request, const DeleteHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns the connection ARN and details such as status, owner, and provider
* type.
See Also:
AWS
* API Reference
*/
virtual Model::GetConnectionOutcome GetConnection(const Model::GetConnectionRequest& request) const;
/**
* Returns the connection ARN and details such as status, owner, and provider
* type.
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;
/**
* Returns the connection ARN and details such as status, owner, and provider
* type.
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;
/**
* Returns the host ARN and details such as status, provider type, endpoint,
* and, if applicable, the VPC configuration.
See Also:
AWS
* API Reference
*/
virtual Model::GetHostOutcome GetHost(const Model::GetHostRequest& request) const;
/**
* Returns the host ARN and details such as status, provider type, endpoint,
* and, if applicable, the VPC configuration.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetHostOutcomeCallable GetHostCallable(const Model::GetHostRequest& request) const;
/**
* Returns the host ARN and details such as status, provider type, endpoint,
* and, if applicable, the VPC configuration.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetHostAsync(const Model::GetHostRequest& request, const GetHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists the connections associated with your account.
See Also:
* AWS
* API Reference
*/
virtual Model::ListConnectionsOutcome ListConnections(const Model::ListConnectionsRequest& request) const;
/**
* Lists the connections associated with your account.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListConnectionsOutcomeCallable ListConnectionsCallable(const Model::ListConnectionsRequest& request) const;
/**
* Lists the connections associated with your account.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListConnectionsAsync(const Model::ListConnectionsRequest& request, const ListConnectionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists the hosts associated with your account.
See Also:
AWS
* API Reference
*/
virtual Model::ListHostsOutcome ListHosts(const Model::ListHostsRequest& request) const;
/**
* Lists the hosts associated with your account.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListHostsOutcomeCallable ListHostsCallable(const Model::ListHostsRequest& request) const;
/**
* Lists the hosts associated with your account.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListHostsAsync(const Model::ListHostsRequest& request, const ListHostsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Gets the set of key-value pairs (metadata) that are used to manage the
* resource.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* Gets the set of key-value pairs (metadata) that are used to manage the
* 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;
/**
* Gets the set of key-value pairs (metadata) that are used to manage the
* 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;
/**
* Adds to or modifies the tags of the given resource. Tags are metadata that
* can be used to manage a resource.
See Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* Adds to or modifies the tags of the given resource. Tags are metadata that
* can be used to manage 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::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* Adds to or modifies the tags of the given resource. Tags are metadata that
* can be used to manage a resource.
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 tags from an AWS resource.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* Removes tags from an AWS 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 tags from an AWS 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 CreateConnectionAsyncHelper(const Model::CreateConnectionRequest& request, const CreateConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void CreateHostAsyncHelper(const Model::CreateHostRequest& request, const CreateHostResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DeleteConnectionAsyncHelper(const Model::DeleteConnectionRequest& request, const DeleteConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DeleteHostAsyncHelper(const Model::DeleteHostRequest& request, const DeleteHostResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetConnectionAsyncHelper(const Model::GetConnectionRequest& request, const GetConnectionResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetHostAsyncHelper(const Model::GetHostRequest& request, const GetHostResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListConnectionsAsyncHelper(const Model::ListConnectionsRequest& request, const ListConnectionsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListHostsAsyncHelper(const Model::ListHostsRequest& request, const ListHostsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& 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 CodeStarconnections
} // namespace Aws