@Generated(value="software.amazon.awssdk:codegen") public interface CodeStarConnectionsAsyncClient extends SdkClient
builder()
method.
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.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider . |
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static CodeStarConnectionsAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
CodeStarConnectionsAsyncClient . |
static CodeStarConnectionsAsyncClient |
create()
Create a
CodeStarConnectionsAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<CreateConnectionResponse> |
createConnection(Consumer<CreateConnectionRequest.Builder> createConnectionRequest)
Creates a connection that can then be given to other AWS services like CodePipeline so that it can access
third-party code repositories.
|
default CompletableFuture<CreateConnectionResponse> |
createConnection(CreateConnectionRequest createConnectionRequest)
Creates a connection that can then be given to other AWS services like CodePipeline so that it can access
third-party code repositories.
|
default CompletableFuture<CreateHostResponse> |
createHost(Consumer<CreateHostRequest.Builder> createHostRequest)
Creates a resource that represents the infrastructure where a third-party provider is installed.
|
default CompletableFuture<CreateHostResponse> |
createHost(CreateHostRequest createHostRequest)
Creates a resource that represents the infrastructure where a third-party provider is installed.
|
default CompletableFuture<DeleteConnectionResponse> |
deleteConnection(Consumer<DeleteConnectionRequest.Builder> deleteConnectionRequest)
The connection to be deleted.
|
default CompletableFuture<DeleteConnectionResponse> |
deleteConnection(DeleteConnectionRequest deleteConnectionRequest)
The connection to be deleted.
|
default CompletableFuture<DeleteHostResponse> |
deleteHost(Consumer<DeleteHostRequest.Builder> deleteHostRequest)
The host to be deleted.
|
default CompletableFuture<DeleteHostResponse> |
deleteHost(DeleteHostRequest deleteHostRequest)
The host to be deleted.
|
default CompletableFuture<GetConnectionResponse> |
getConnection(Consumer<GetConnectionRequest.Builder> getConnectionRequest)
Returns the connection ARN and details such as status, owner, and provider type.
|
default CompletableFuture<GetConnectionResponse> |
getConnection(GetConnectionRequest getConnectionRequest)
Returns the connection ARN and details such as status, owner, and provider type.
|
default CompletableFuture<GetHostResponse> |
getHost(Consumer<GetHostRequest.Builder> getHostRequest)
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC
configuration.
|
default CompletableFuture<GetHostResponse> |
getHost(GetHostRequest getHostRequest)
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC
configuration.
|
default CompletableFuture<ListConnectionsResponse> |
listConnections(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)
Lists the connections associated with your account.
|
default CompletableFuture<ListConnectionsResponse> |
listConnections(ListConnectionsRequest listConnectionsRequest)
Lists the connections associated with your account.
|
default ListConnectionsPublisher |
listConnectionsPaginator(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)
Lists the connections associated with your account.
|
default ListConnectionsPublisher |
listConnectionsPaginator(ListConnectionsRequest listConnectionsRequest)
Lists the connections associated with your account.
|
default CompletableFuture<ListHostsResponse> |
listHosts(Consumer<ListHostsRequest.Builder> listHostsRequest)
Lists the hosts associated with your account.
|
default CompletableFuture<ListHostsResponse> |
listHosts(ListHostsRequest listHostsRequest)
Lists the hosts associated with your account.
|
default ListHostsPublisher |
listHostsPaginator(Consumer<ListHostsRequest.Builder> listHostsRequest)
Lists the hosts associated with your account.
|
default ListHostsPublisher |
listHostsPaginator(ListHostsRequest listHostsRequest)
Lists the hosts associated with your account.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Gets the set of key-value pairs (metadata) that are used to manage the resource.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Gets the set of key-value pairs (metadata) that are used to manage the resource.
|
default CompletableFuture<TagResourceResponse> |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Adds to or modifies the tags of the given resource.
|
default CompletableFuture<TagResourceResponse> |
tagResource(TagResourceRequest tagResourceRequest)
Adds to or modifies the tags of the given resource.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes tags from an AWS resource.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(UntagResourceRequest untagResourceRequest)
Removes tags from an AWS resource.
|
default CompletableFuture<UpdateHostResponse> |
updateHost(Consumer<UpdateHostRequest.Builder> updateHostRequest)
Updates a specified host with the provided configurations.
|
default CompletableFuture<UpdateHostResponse> |
updateHost(UpdateHostRequest updateHostRequest)
Updates a specified host with the provided configurations.
|
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.static CodeStarConnectionsAsyncClient create()
CodeStarConnectionsAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static CodeStarConnectionsAsyncClientBuilder builder()
CodeStarConnectionsAsyncClient
.default CompletableFuture<CreateConnectionResponse> createConnection(CreateConnectionRequest createConnectionRequest)
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.
createConnectionRequest
- default CompletableFuture<CreateConnectionResponse> createConnection(Consumer<CreateConnectionRequest.Builder> createConnectionRequest)
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.
This is a convenience which creates an instance of the CreateConnectionRequest.Builder
avoiding the need
to create one manually via CreateConnectionRequest.builder()
createConnectionRequest
- A Consumer
that will call methods on CreateConnectionInput.Builder
to create a request.default CompletableFuture<CreateHostResponse> createHost(CreateHostRequest createHostRequest)
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.
createHostRequest
- default CompletableFuture<CreateHostResponse> createHost(Consumer<CreateHostRequest.Builder> createHostRequest)
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.
This is a convenience which creates an instance of the CreateHostRequest.Builder
avoiding the need to
create one manually via CreateHostRequest.builder()
createHostRequest
- A Consumer
that will call methods on CreateHostInput.Builder
to create a request.default CompletableFuture<DeleteConnectionResponse> deleteConnection(DeleteConnectionRequest deleteConnectionRequest)
The connection to be deleted.
deleteConnectionRequest
- default CompletableFuture<DeleteConnectionResponse> deleteConnection(Consumer<DeleteConnectionRequest.Builder> deleteConnectionRequest)
The connection to be deleted.
This is a convenience which creates an instance of the DeleteConnectionRequest.Builder
avoiding the need
to create one manually via DeleteConnectionRequest.builder()
deleteConnectionRequest
- A Consumer
that will call methods on DeleteConnectionInput.Builder
to create a request.default CompletableFuture<DeleteHostResponse> deleteHost(DeleteHostRequest deleteHostRequest)
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.
deleteHostRequest
- default CompletableFuture<DeleteHostResponse> deleteHost(Consumer<DeleteHostRequest.Builder> deleteHostRequest)
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.
This is a convenience which creates an instance of the DeleteHostRequest.Builder
avoiding the need to
create one manually via DeleteHostRequest.builder()
deleteHostRequest
- A Consumer
that will call methods on DeleteHostInput.Builder
to create a request.default CompletableFuture<GetConnectionResponse> getConnection(GetConnectionRequest getConnectionRequest)
Returns the connection ARN and details such as status, owner, and provider type.
getConnectionRequest
- default CompletableFuture<GetConnectionResponse> getConnection(Consumer<GetConnectionRequest.Builder> getConnectionRequest)
Returns the connection ARN and details such as status, owner, and provider type.
This is a convenience which creates an instance of the GetConnectionRequest.Builder
avoiding the need to
create one manually via GetConnectionRequest.builder()
getConnectionRequest
- A Consumer
that will call methods on GetConnectionInput.Builder
to create a request.default CompletableFuture<GetHostResponse> getHost(GetHostRequest getHostRequest)
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
getHostRequest
- default CompletableFuture<GetHostResponse> getHost(Consumer<GetHostRequest.Builder> getHostRequest)
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
This is a convenience which creates an instance of the GetHostRequest.Builder
avoiding the need to create
one manually via GetHostRequest.builder()
getHostRequest
- A Consumer
that will call methods on GetHostInput.Builder
to create a request.default CompletableFuture<ListConnectionsResponse> listConnections(ListConnectionsRequest listConnectionsRequest)
Lists the connections associated with your account.
listConnectionsRequest
- default CompletableFuture<ListConnectionsResponse> listConnections(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)
Lists the connections associated with your account.
This is a convenience which creates an instance of the ListConnectionsRequest.Builder
avoiding the need
to create one manually via ListConnectionsRequest.builder()
listConnectionsRequest
- A Consumer
that will call methods on ListConnectionsInput.Builder
to create a request.default ListConnectionsPublisher listConnectionsPaginator(ListConnectionsRequest listConnectionsRequest)
Lists the connections associated with your account.
This is a variant of
listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsPublisher publisher = client.listConnectionsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsPublisher publisher = client.listConnectionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)
operation.
listConnectionsRequest
- default ListConnectionsPublisher listConnectionsPaginator(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)
Lists the connections associated with your account.
This is a variant of
listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsPublisher publisher = client.listConnectionsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsPublisher publisher = client.listConnectionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)
operation.
This is a convenience which creates an instance of the ListConnectionsRequest.Builder
avoiding the need
to create one manually via ListConnectionsRequest.builder()
listConnectionsRequest
- A Consumer
that will call methods on ListConnectionsInput.Builder
to create a request.default CompletableFuture<ListHostsResponse> listHosts(ListHostsRequest listHostsRequest)
Lists the hosts associated with your account.
listHostsRequest
- default CompletableFuture<ListHostsResponse> listHosts(Consumer<ListHostsRequest.Builder> listHostsRequest)
Lists the hosts associated with your account.
This is a convenience which creates an instance of the ListHostsRequest.Builder
avoiding the need to
create one manually via ListHostsRequest.builder()
listHostsRequest
- A Consumer
that will call methods on ListHostsInput.Builder
to create a request.default ListHostsPublisher listHostsPaginator(ListHostsRequest listHostsRequest)
Lists the hosts associated with your account.
This is a variant of
listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)
operation. The
return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.codestarconnections.paginators.ListHostsPublisher publisher = client.listHostsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.codestarconnections.paginators.ListHostsPublisher publisher = client.listHostsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)
operation.
listHostsRequest
- default ListHostsPublisher listHostsPaginator(Consumer<ListHostsRequest.Builder> listHostsRequest)
Lists the hosts associated with your account.
This is a variant of
listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)
operation. The
return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.codestarconnections.paginators.ListHostsPublisher publisher = client.listHostsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.codestarconnections.paginators.ListHostsPublisher publisher = client.listHostsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)
operation.
This is a convenience which creates an instance of the ListHostsRequest.Builder
avoiding the need to
create one manually via ListHostsRequest.builder()
listHostsRequest
- A Consumer
that will call methods on ListHostsInput.Builder
to create a request.default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Gets the set of key-value pairs (metadata) that are used to manage the resource.
listTagsForResourceRequest
- default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Gets the set of key-value pairs (metadata) that are used to manage the resource.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder
avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest
- A Consumer
that will call methods on ListTagsForResourceInput.Builder
to create a request.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
tagResourceRequest
- default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
This is a convenience which creates an instance of the TagResourceRequest.Builder
avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest
- A Consumer
that will call methods on TagResourceInput.Builder
to create a request.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)
Removes tags from an AWS resource.
untagResourceRequest
- default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes tags from an AWS resource.
This is a convenience which creates an instance of the UntagResourceRequest.Builder
avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest
- A Consumer
that will call methods on UntagResourceInput.Builder
to create a request.default CompletableFuture<UpdateHostResponse> updateHost(UpdateHostRequest updateHostRequest)
Updates a specified host with the provided configurations.
updateHostRequest
- default CompletableFuture<UpdateHostResponse> updateHost(Consumer<UpdateHostRequest.Builder> updateHostRequest)
Updates a specified host with the provided configurations.
This is a convenience which creates an instance of the UpdateHostRequest.Builder
avoiding the need to
create one manually via UpdateHostRequest.builder()
updateHostRequest
- A Consumer
that will call methods on UpdateHostInput.Builder
to create a request.