Interface CodeStarConnectionsClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface CodeStarConnectionsClient extends AwsClient
Service client for accessing AWS CodeStar connections. This can be created using the staticbuilder()method.AWS CodeStar Connections This Amazon Web Services CodeStar Connections API Reference provides descriptions and usage examples of the operations and data types for the Amazon Web Services CodeStar Connections API. You can use the connections API to work with connections and installations.
Connections are configurations that you use to connect Amazon Web Services 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 Amazon Web Services CodeStar Connections by calling the following:
-
ListTagsForResource, which gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in Amazon Web Services CodeStar Connections.
-
TagResource, which adds or updates tags for a resource in Amazon Web Services CodeStar Connections.
-
UntagResource, which removes tags for a resource in Amazon Web Services CodeStar Connections.
For information about how to use Amazon Web Services CodeStar Connections, see the Developer Tools User Guide.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static CodeStarConnectionsClientBuilderbuilder()Create a builder that can be used to configure and create aCodeStarConnectionsClient.static CodeStarConnectionsClientcreate()Create aCodeStarConnectionsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateConnectionResponsecreateConnection(Consumer<CreateConnectionRequest.Builder> createConnectionRequest)Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so that it can access third-party code repositories.default CreateConnectionResponsecreateConnection(CreateConnectionRequest createConnectionRequest)Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so that it can access third-party code repositories.default CreateHostResponsecreateHost(Consumer<CreateHostRequest.Builder> createHostRequest)Creates a resource that represents the infrastructure where a third-party provider is installed.default CreateHostResponsecreateHost(CreateHostRequest createHostRequest)Creates a resource that represents the infrastructure where a third-party provider is installed.default DeleteConnectionResponsedeleteConnection(Consumer<DeleteConnectionRequest.Builder> deleteConnectionRequest)The connection to be deleted.default DeleteConnectionResponsedeleteConnection(DeleteConnectionRequest deleteConnectionRequest)The connection to be deleted.default DeleteHostResponsedeleteHost(Consumer<DeleteHostRequest.Builder> deleteHostRequest)The host to be deleted.default DeleteHostResponsedeleteHost(DeleteHostRequest deleteHostRequest)The host to be deleted.default GetConnectionResponsegetConnection(Consumer<GetConnectionRequest.Builder> getConnectionRequest)Returns the connection ARN and details such as status, owner, and provider type.default GetConnectionResponsegetConnection(GetConnectionRequest getConnectionRequest)Returns the connection ARN and details such as status, owner, and provider type.default GetHostResponsegetHost(Consumer<GetHostRequest.Builder> getHostRequest)Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.default GetHostResponsegetHost(GetHostRequest getHostRequest)Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.default ListConnectionsResponselistConnections(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)Lists the connections associated with your account.default ListConnectionsResponselistConnections(ListConnectionsRequest listConnectionsRequest)Lists the connections associated with your account.default ListConnectionsIterablelistConnectionsPaginator(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest)Lists the connections associated with your account.default ListConnectionsIterablelistConnectionsPaginator(ListConnectionsRequest listConnectionsRequest)Lists the connections associated with your account.default ListHostsResponselistHosts(Consumer<ListHostsRequest.Builder> listHostsRequest)Lists the hosts associated with your account.default ListHostsResponselistHosts(ListHostsRequest listHostsRequest)Lists the hosts associated with your account.default ListHostsIterablelistHostsPaginator(Consumer<ListHostsRequest.Builder> listHostsRequest)Lists the hosts associated with your account.default ListHostsIterablelistHostsPaginator(ListHostsRequest listHostsRequest)Lists the hosts associated with your account.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Gets the set of key-value pairs (metadata) that are used to manage the resource.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Gets the set of key-value pairs (metadata) that are used to manage the resource.default CodeStarConnectionsServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)Adds to or modifies the tags of the given resource.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)Adds to or modifies the tags of the given resource.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Removes tags from an Amazon Web Services resource.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Removes tags from an Amazon Web Services resource.default UpdateHostResponseupdateHost(Consumer<UpdateHostRequest.Builder> updateHostRequest)Updates a specified host with the provided configurations.default UpdateHostResponseupdateHost(UpdateHostRequest updateHostRequest)Updates a specified host with the provided configurations.-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createConnection
default CreateConnectionResponse createConnection(CreateConnectionRequest createConnectionRequest) throws LimitExceededException, ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Creates a connection that can then be given to other Amazon Web Services 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.
- Parameters:
createConnectionRequest-- Returns:
- Result of the CreateConnection operation returned by the service.
- Throws:
LimitExceededException- Exceeded the maximum limit for connections.ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createConnection
default CreateConnectionResponse createConnection(Consumer<CreateConnectionRequest.Builder> createConnectionRequest) throws LimitExceededException, ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Creates a connection that can then be given to other Amazon Web Services 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.Builderavoiding the need to create one manually viaCreateConnectionRequest.builder()- Parameters:
createConnectionRequest- AConsumerthat will call methods onCreateConnectionRequest.Builderto create a request.- Returns:
- Result of the CreateConnection operation returned by the service.
- Throws:
LimitExceededException- Exceeded the maximum limit for connections.ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createHost
default CreateHostResponse createHost(CreateHostRequest createHostRequest) throws LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.
- Parameters:
createHostRequest-- Returns:
- Result of the CreateHost operation returned by the service.
- Throws:
LimitExceededException- Exceeded the maximum limit for connections.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createHost
default CreateHostResponse createHost(Consumer<CreateHostRequest.Builder> createHostRequest) throws LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.Builderavoiding the need to create one manually viaCreateHostRequest.builder()- Parameters:
createHostRequest- AConsumerthat will call methods onCreateHostRequest.Builderto create a request.- Returns:
- Result of the CreateHost operation returned by the service.
- Throws:
LimitExceededException- Exceeded the maximum limit for connections.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteConnection
default DeleteConnectionResponse deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
The connection to be deleted.
- Parameters:
deleteConnectionRequest-- Returns:
- Result of the DeleteConnection operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteConnection
default DeleteConnectionResponse deleteConnection(Consumer<DeleteConnectionRequest.Builder> deleteConnectionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
The connection to be deleted.
This is a convenience which creates an instance of the
DeleteConnectionRequest.Builderavoiding the need to create one manually viaDeleteConnectionRequest.builder()- Parameters:
deleteConnectionRequest- AConsumerthat will call methods onDeleteConnectionRequest.Builderto create a request.- Returns:
- Result of the DeleteConnection operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteHost
default DeleteHostResponse deleteHost(DeleteHostRequest deleteHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.
- Parameters:
deleteHostRequest-- Returns:
- Result of the DeleteHost operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteHost
default DeleteHostResponse deleteHost(Consumer<DeleteHostRequest.Builder> deleteHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.Builderavoiding the need to create one manually viaDeleteHostRequest.builder()- Parameters:
deleteHostRequest- AConsumerthat will call methods onDeleteHostRequest.Builderto create a request.- Returns:
- Result of the DeleteHost operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getConnection
default GetConnectionResponse getConnection(GetConnectionRequest getConnectionRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Returns the connection ARN and details such as status, owner, and provider type.
- Parameters:
getConnectionRequest-- Returns:
- Result of the GetConnection operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getConnection
default GetConnectionResponse getConnection(Consumer<GetConnectionRequest.Builder> getConnectionRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Returns the connection ARN and details such as status, owner, and provider type.
This is a convenience which creates an instance of the
GetConnectionRequest.Builderavoiding the need to create one manually viaGetConnectionRequest.builder()- Parameters:
getConnectionRequest- AConsumerthat will call methods onGetConnectionRequest.Builderto create a request.- Returns:
- Result of the GetConnection operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getHost
default GetHostResponse getHost(GetHostRequest getHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.
- Parameters:
getHostRequest-- Returns:
- Result of the GetHost operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getHost
default GetHostResponse getHost(Consumer<GetHostRequest.Builder> getHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.Builderavoiding the need to create one manually viaGetHostRequest.builder()- Parameters:
getHostRequest- AConsumerthat will call methods onGetHostRequest.Builderto create a request.- Returns:
- Result of the GetHost operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listConnections
default ListConnectionsResponse listConnections(ListConnectionsRequest listConnectionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Lists the connections associated with your account.
- Parameters:
listConnectionsRequest-- Returns:
- Result of the ListConnections operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listConnections
default ListConnectionsResponse listConnections(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Lists the connections associated with your account.
This is a convenience which creates an instance of the
ListConnectionsRequest.Builderavoiding the need to create one manually viaListConnectionsRequest.builder()- Parameters:
listConnectionsRequest- AConsumerthat will call methods onListConnectionsRequest.Builderto create a request.- Returns:
- Result of the ListConnections operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listConnectionsPaginator
default ListConnectionsIterable listConnectionsPaginator(ListConnectionsRequest listConnectionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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 iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client .listConnectionsPaginator(request); for (software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request); responses.iterator().forEachRemaining(....);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.- Parameters:
listConnectionsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listConnectionsPaginator
default ListConnectionsIterable listConnectionsPaginator(Consumer<ListConnectionsRequest.Builder> listConnectionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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 iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client .listConnectionsPaginator(request); for (software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request); responses.iterator().forEachRemaining(....);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.Builderavoiding the need to create one manually viaListConnectionsRequest.builder()- Parameters:
listConnectionsRequest- AConsumerthat will call methods onListConnectionsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listHosts
default ListHostsResponse listHosts(ListHostsRequest listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException
Lists the hosts associated with your account.
- Parameters:
listHostsRequest-- Returns:
- Result of the ListHosts operation returned by the service.
- Throws:
SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listHosts
default ListHostsResponse listHosts(Consumer<ListHostsRequest.Builder> listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException
Lists the hosts associated with your account.
This is a convenience which creates an instance of the
ListHostsRequest.Builderavoiding the need to create one manually viaListHostsRequest.builder()- Parameters:
listHostsRequest- AConsumerthat will call methods onListHostsRequest.Builderto create a request.- Returns:
- Result of the ListHosts operation returned by the service.
- Throws:
SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listHostsPaginator
default ListHostsIterable listHostsPaginator(ListHostsRequest listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException
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 iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client .listHostsPaginator(request); for (software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request); responses.iterator().forEachRemaining(....);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.- Parameters:
listHostsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listHostsPaginator
default ListHostsIterable listHostsPaginator(Consumer<ListHostsRequest.Builder> listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException
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 iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client .listHostsPaginator(request); for (software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request); responses.iterator().forEachRemaining(....);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.Builderavoiding the need to create one manually viaListHostsRequest.builder()- Parameters:
listHostsRequest- AConsumerthat will call methods onListHostsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Gets the set of key-value pairs (metadata) that are used to manage the resource.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.LimitExceededException- Exceeded the maximum limit for connections.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException
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.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.LimitExceededException- Exceeded the maximum limit for connections.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Removes tags from an Amazon Web Services resource.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Removes tags from an Amazon Web Services resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateHost
default UpdateHostResponse updateHost(UpdateHostRequest updateHostRequest) throws ConflictException, ResourceNotFoundException, ResourceUnavailableException, UnsupportedOperationException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Updates a specified host with the provided configurations.
- Parameters:
updateHostRequest-- Returns:
- Result of the UpdateHost operation returned by the service.
- Throws:
ConflictException- Two conflicting operations have been made on the same resource.ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.UnsupportedOperationException- The operation is not supported. Check the connection status and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.UnsupportedOperationExceptionAwsServiceException- See Also:
- AWS API Documentation
-
updateHost
default UpdateHostResponse updateHost(Consumer<UpdateHostRequest.Builder> updateHostRequest) throws ConflictException, ResourceNotFoundException, ResourceUnavailableException, UnsupportedOperationException, AwsServiceException, SdkClientException, CodeStarConnectionsException
Updates a specified host with the provided configurations.
This is a convenience which creates an instance of the
UpdateHostRequest.Builderavoiding the need to create one manually viaUpdateHostRequest.builder()- Parameters:
updateHostRequest- AConsumerthat will call methods onUpdateHostRequest.Builderto create a request.- Returns:
- Result of the UpdateHost operation returned by the service.
- Throws:
ConflictException- Two conflicting operations have been made on the same resource.ResourceNotFoundException- Resource not found. Verify the connection resource ARN and try again.ResourceUnavailableException- Resource not found. Verify the ARN for the host resource and try again.UnsupportedOperationException- The operation is not supported. Check the connection status and try again.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.CodeStarConnectionsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.UnsupportedOperationExceptionAwsServiceException- See Also:
- AWS API Documentation
-
create
static CodeStarConnectionsClient create()
Create aCodeStarConnectionsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static CodeStarConnectionsClientBuilder builder()
Create a builder that can be used to configure and create aCodeStarConnectionsClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default CodeStarConnectionsServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-