/**
* 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 CodeStarconnections
{
/**
* AWS CodeStar Connections 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 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 Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef CodeStarconnectionsClientConfiguration ClientConfigurationType;
typedef CodeStarconnectionsEndpointProvider 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.
*/
CodeStarconnectionsClient(const Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration& clientConfiguration = Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration(),
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.
*/
CodeStarconnectionsClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration& clientConfiguration = Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration());
/**
* 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,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration& clientConfiguration = Aws::CodeStarconnections::CodeStarconnectionsClientConfiguration());
/* 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.
*/
CodeStarconnectionsClient(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.
*/
CodeStarconnectionsClient(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
*/
CodeStarconnectionsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
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;
/**
* A Callable wrapper for CreateConnection that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateConnectionOutcomeCallable CreateConnectionCallable(const CreateConnectionRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::CreateConnection, request);
}
/**
* An Async wrapper for CreateConnection that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateConnectionAsync(const CreateConnectionRequestT& request, const CreateConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::CreateConnection, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for CreateHost that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateHostOutcomeCallable CreateHostCallable(const CreateHostRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::CreateHost, request);
}
/**
* An Async wrapper for CreateHost that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateHostAsync(const CreateHostRequestT& request, const CreateHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::CreateHost, request, handler, context);
}
/**
* The connection to be deleted.
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(&CodeStarconnectionsClient::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(&CodeStarconnectionsClient::DeleteConnection, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for DeleteHost that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteHostOutcomeCallable DeleteHostCallable(const DeleteHostRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::DeleteHost, request);
}
/**
* An Async wrapper for DeleteHost that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteHostAsync(const DeleteHostRequestT& request, const DeleteHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::DeleteHost, request, handler, context);
}
/**
* 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;
/**
* 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(&CodeStarconnectionsClient::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(&CodeStarconnectionsClient::GetConnection, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for GetHost that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetHostOutcomeCallable GetHostCallable(const GetHostRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::GetHost, request);
}
/**
* An Async wrapper for GetHost that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetHostAsync(const GetHostRequestT& request, const GetHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::GetHost, request, handler, context);
}
/**
* Lists the connections associated with your account.
See Also:
* AWS
* API Reference
*/
virtual Model::ListConnectionsOutcome ListConnections(const Model::ListConnectionsRequest& request) const;
/**
* A Callable wrapper for ListConnections that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListConnectionsOutcomeCallable ListConnectionsCallable(const ListConnectionsRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::ListConnections, request);
}
/**
* An Async wrapper for ListConnections that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListConnectionsAsync(const ListConnectionsRequestT& request, const ListConnectionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::ListConnections, request, handler, context);
}
/**
* Lists the hosts associated with your account.
See Also:
AWS
* API Reference
*/
virtual Model::ListHostsOutcome ListHosts(const Model::ListHostsRequest& request) const;
/**
* A Callable wrapper for ListHosts that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListHostsOutcomeCallable ListHostsCallable(const ListHostsRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::ListHosts, request);
}
/**
* An Async wrapper for ListHosts that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListHostsAsync(const ListHostsRequestT& request, const ListHostsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::ListHosts, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::ListTagsForResource, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::TagResource, request, handler, context);
}
/**
* Removes tags from an AWS resource.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::UntagResource, request, handler, context);
}
/**
* Updates a specified host with the provided configurations.
See
* Also:
AWS
* API Reference
*/
virtual Model::UpdateHostOutcome UpdateHost(const Model::UpdateHostRequest& request) const;
/**
* A Callable wrapper for UpdateHost that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateHostOutcomeCallable UpdateHostCallable(const UpdateHostRequestT& request) const
{
return SubmitCallable(&CodeStarconnectionsClient::UpdateHost, request);
}
/**
* An Async wrapper for UpdateHost that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateHostAsync(const UpdateHostRequestT& request, const UpdateHostResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&CodeStarconnectionsClient::UpdateHost, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const CodeStarconnectionsClientConfiguration& clientConfiguration);
CodeStarconnectionsClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace CodeStarconnections
} // namespace Aws