All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.codestarconnections.CodeStarConnectionsClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for CodeStar connections module holds the client classes that are used for communicating with CodeStar connections.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.codestarconnections;

import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.regions.ServiceMetadata;
import software.amazon.awssdk.services.codestarconnections.model.CodeStarConnectionsException;
import software.amazon.awssdk.services.codestarconnections.model.ConflictException;
import software.amazon.awssdk.services.codestarconnections.model.CreateConnectionRequest;
import software.amazon.awssdk.services.codestarconnections.model.CreateConnectionResponse;
import software.amazon.awssdk.services.codestarconnections.model.CreateHostRequest;
import software.amazon.awssdk.services.codestarconnections.model.CreateHostResponse;
import software.amazon.awssdk.services.codestarconnections.model.DeleteConnectionRequest;
import software.amazon.awssdk.services.codestarconnections.model.DeleteConnectionResponse;
import software.amazon.awssdk.services.codestarconnections.model.DeleteHostRequest;
import software.amazon.awssdk.services.codestarconnections.model.DeleteHostResponse;
import software.amazon.awssdk.services.codestarconnections.model.GetConnectionRequest;
import software.amazon.awssdk.services.codestarconnections.model.GetConnectionResponse;
import software.amazon.awssdk.services.codestarconnections.model.GetHostRequest;
import software.amazon.awssdk.services.codestarconnections.model.GetHostResponse;
import software.amazon.awssdk.services.codestarconnections.model.LimitExceededException;
import software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest;
import software.amazon.awssdk.services.codestarconnections.model.ListConnectionsResponse;
import software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest;
import software.amazon.awssdk.services.codestarconnections.model.ListHostsResponse;
import software.amazon.awssdk.services.codestarconnections.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.codestarconnections.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.codestarconnections.model.ResourceNotFoundException;
import software.amazon.awssdk.services.codestarconnections.model.ResourceUnavailableException;
import software.amazon.awssdk.services.codestarconnections.model.TagResourceRequest;
import software.amazon.awssdk.services.codestarconnections.model.TagResourceResponse;
import software.amazon.awssdk.services.codestarconnections.model.UntagResourceRequest;
import software.amazon.awssdk.services.codestarconnections.model.UntagResourceResponse;
import software.amazon.awssdk.services.codestarconnections.model.UpdateHostRequest;
import software.amazon.awssdk.services.codestarconnections.model.UpdateHostResponse;
import software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable;
import software.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable;

/**
 * Service client for accessing AWS CodeStar connections. This can be created using the static {@link #builder()}
 * method.
 *
 * 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. *

*/ @Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface CodeStarConnectionsClient extends SdkClient { String SERVICE_NAME = "codestar-connections"; /** * Value for looking up the service's metadata from the * {@link software.amazon.awssdk.regions.ServiceMetadataProvider}. */ String SERVICE_METADATA_ID = "codestar-connections"; /** * Create a {@link CodeStarConnectionsClient} with the region loaded from the * {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the * {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}. */ static CodeStarConnectionsClient create() { return builder().build(); } /** * Create a builder that can be used to configure and create a {@link CodeStarConnectionsClient}. */ static CodeStarConnectionsClientBuilder builder() { return new DefaultCodeStarConnectionsClientBuilder(); } /** *

* 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. *

* * @param createConnectionRequest * @return Result of the CreateConnection operation returned by the service. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.CreateConnection * @see AWS API Documentation */ default CreateConnectionResponse createConnection(CreateConnectionRequest createConnectionRequest) throws LimitExceededException, ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link CreateConnectionRequest.Builder} avoiding the need * to create one manually via {@link CreateConnectionRequest#builder()} *

* * @param createConnectionRequest * A {@link Consumer} that will call methods on {@link CreateConnectionInput.Builder} to create a request. * @return Result of the CreateConnection operation returned by the service. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.CreateConnection * @see AWS API Documentation */ default CreateConnectionResponse createConnection(Consumer createConnectionRequest) throws LimitExceededException, ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return createConnection(CreateConnectionRequest.builder().applyMutation(createConnectionRequest).build()); } /** *

* 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. *

*
* * @param createHostRequest * @return Result of the CreateHost operation returned by the service. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.CreateHost * @see AWS API Documentation */ default CreateHostResponse createHost(CreateHostRequest createHostRequest) throws LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link CreateHostRequest.Builder} avoiding the need to * create one manually via {@link CreateHostRequest#builder()} *

* * @param createHostRequest * A {@link Consumer} that will call methods on {@link CreateHostInput.Builder} to create a request. * @return Result of the CreateHost operation returned by the service. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.CreateHost * @see AWS API Documentation */ default CreateHostResponse createHost(Consumer createHostRequest) throws LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return createHost(CreateHostRequest.builder().applyMutation(createHostRequest).build()); } /** *

* The connection to be deleted. *

* * @param deleteConnectionRequest * @return Result of the DeleteConnection operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.DeleteConnection * @see AWS API Documentation */ default DeleteConnectionResponse deleteConnection(DeleteConnectionRequest deleteConnectionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* The connection to be deleted. *

*
*

* This is a convenience which creates an instance of the {@link DeleteConnectionRequest.Builder} avoiding the need * to create one manually via {@link DeleteConnectionRequest#builder()} *

* * @param deleteConnectionRequest * A {@link Consumer} that will call methods on {@link DeleteConnectionInput.Builder} to create a request. * @return Result of the DeleteConnection operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.DeleteConnection * @see AWS API Documentation */ default DeleteConnectionResponse deleteConnection(Consumer deleteConnectionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return deleteConnection(DeleteConnectionRequest.builder().applyMutation(deleteConnectionRequest).build()); } /** *

* 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. *

*
* * @param deleteHostRequest * @return Result of the DeleteHost operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.DeleteHost * @see AWS API Documentation */ default DeleteHostResponse deleteHost(DeleteHostRequest deleteHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link DeleteHostRequest.Builder} avoiding the need to * create one manually via {@link DeleteHostRequest#builder()} *

* * @param deleteHostRequest * A {@link Consumer} that will call methods on {@link DeleteHostInput.Builder} to create a request. * @return Result of the DeleteHost operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.DeleteHost * @see AWS API Documentation */ default DeleteHostResponse deleteHost(Consumer deleteHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return deleteHost(DeleteHostRequest.builder().applyMutation(deleteHostRequest).build()); } /** *

* Returns the connection ARN and details such as status, owner, and provider type. *

* * @param getConnectionRequest * @return Result of the GetConnection operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.GetConnection * @see AWS API Documentation */ default GetConnectionResponse getConnection(GetConnectionRequest getConnectionRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Returns the connection ARN and details such as status, owner, and provider type. *

*
*

* This is a convenience which creates an instance of the {@link GetConnectionRequest.Builder} avoiding the need to * create one manually via {@link GetConnectionRequest#builder()} *

* * @param getConnectionRequest * A {@link Consumer} that will call methods on {@link GetConnectionInput.Builder} to create a request. * @return Result of the GetConnection operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.GetConnection * @see AWS API Documentation */ default GetConnectionResponse getConnection(Consumer getConnectionRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return getConnection(GetConnectionRequest.builder().applyMutation(getConnectionRequest).build()); } /** *

* Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC * configuration. *

* * @param getHostRequest * @return Result of the GetHost operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.GetHost * @see AWS * API Documentation */ default GetHostResponse getHost(GetHostRequest getHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link GetHostRequest.Builder} avoiding the need to create * one manually via {@link GetHostRequest#builder()} *

* * @param getHostRequest * A {@link Consumer} that will call methods on {@link GetHostInput.Builder} to create a request. * @return Result of the GetHost operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.GetHost * @see AWS * API Documentation */ default GetHostResponse getHost(Consumer getHostRequest) throws ResourceNotFoundException, ResourceUnavailableException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return getHost(GetHostRequest.builder().applyMutation(getHostRequest).build()); } /** *

* Lists the connections associated with your account. *

* * @param listConnectionsRequest * @return Result of the ListConnections 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListConnections * @see AWS API Documentation */ default ListConnectionsResponse listConnections(ListConnectionsRequest listConnectionsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Lists the connections associated with your account. *

*
*

* This is a convenience which creates an instance of the {@link ListConnectionsRequest.Builder} avoiding the need * to create one manually via {@link ListConnectionsRequest#builder()} *

* * @param listConnectionsRequest * A {@link Consumer} that will call methods on {@link ListConnectionsInput.Builder} to create a request. * @return Result of the ListConnections 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListConnections * @see AWS API Documentation */ default ListConnectionsResponse listConnections(Consumer listConnectionsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { return listConnections(ListConnectionsRequest.builder().applyMutation(listConnectionsRequest).build()); } /** *

* Lists the connections associated with your account. *

*
*

* This is a variant of * {@link #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 * *
     * {@code
     * software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @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 directly * *
     * {@code
     * software.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 * {@link #listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)} * operation. *

* * @param listConnectionsRequest * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListConnections * @see AWS API Documentation */ default ListConnectionsIterable listConnectionsPaginator(ListConnectionsRequest listConnectionsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Lists the connections associated with your account. *

*
*

* This is a variant of * {@link #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 * *
     * {@code
     * software.amazon.awssdk.services.codestarconnections.paginators.ListConnectionsIterable responses = client.listConnectionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @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 directly * *
     * {@code
     * software.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 * {@link #listConnections(software.amazon.awssdk.services.codestarconnections.model.ListConnectionsRequest)} * operation. *

*

* This is a convenience which creates an instance of the {@link ListConnectionsRequest.Builder} avoiding the need * to create one manually via {@link ListConnectionsRequest#builder()} *

* * @param listConnectionsRequest * A {@link Consumer} that will call methods on {@link ListConnectionsInput.Builder} to create a request. * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListConnections * @see AWS API Documentation */ default ListConnectionsIterable listConnectionsPaginator(Consumer listConnectionsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { return listConnectionsPaginator(ListConnectionsRequest.builder().applyMutation(listConnectionsRequest).build()); } /** *

* Lists the hosts associated with your account. *

* * @param listHostsRequest * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListHosts * @see AWS API Documentation */ default ListHostsResponse listHosts(ListHostsRequest listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Lists the hosts associated with your account. *

*
*

* This is a convenience which creates an instance of the {@link ListHostsRequest.Builder} avoiding the need to * create one manually via {@link ListHostsRequest#builder()} *

* * @param listHostsRequest * A {@link Consumer} that will call methods on {@link ListHostsInput.Builder} to create a request. * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListHosts * @see AWS API Documentation */ default ListHostsResponse listHosts(Consumer listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { return listHosts(ListHostsRequest.builder().applyMutation(listHostsRequest).build()); } /** *

* Lists the hosts associated with your account. *

*
*

* This is a variant of * {@link #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 * *
     * {@code
     * software.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @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 directly * *
     * {@code
     * software.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 * {@link #listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)} operation. *

* * @param listHostsRequest * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListHosts * @see AWS API Documentation */ default ListHostsIterable listHostsPaginator(ListHostsRequest listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Lists the hosts associated with your account. *

*
*

* This is a variant of * {@link #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 * *
     * {@code
     * software.amazon.awssdk.services.codestarconnections.paginators.ListHostsIterable responses = client.listHostsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @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 directly * *
     * {@code
     * software.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 * {@link #listHosts(software.amazon.awssdk.services.codestarconnections.model.ListHostsRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListHostsRequest.Builder} avoiding the need to * create one manually via {@link ListHostsRequest#builder()} *

* * @param listHostsRequest * A {@link Consumer} that will call methods on {@link ListHostsInput.Builder} to create a request. * @return 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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListHosts * @see AWS API Documentation */ default ListHostsIterable listHostsPaginator(Consumer listHostsRequest) throws AwsServiceException, SdkClientException, CodeStarConnectionsException { return listHostsPaginator(ListHostsRequest.builder().applyMutation(listHostsRequest).build()); } /** *

* Gets the set of key-value pairs (metadata) that are used to manage the resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListTagsForResource * @see AWS API Documentation */ default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link ListTagsForResourceRequest.Builder} avoiding the * need to create one manually via {@link ListTagsForResourceRequest#builder()} *

* * @param listTagsForResourceRequest * A {@link Consumer} that will call methods on {@link ListTagsForResourceInput.Builder} to create a request. * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.ListTagsForResource * @see AWS API Documentation */ default ListTagsForResourceResponse listTagsForResource( Consumer listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return listTagsForResource(ListTagsForResourceRequest.builder().applyMutation(listTagsForResourceRequest).build()); } /** *

* Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.TagResource * @see AWS API Documentation */ default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* 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 {@link TagResourceRequest.Builder} avoiding the need to * create one manually via {@link TagResourceRequest#builder()} *

* * @param tagResourceRequest * A {@link Consumer} that will call methods on {@link TagResourceInput.Builder} to create a request. * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws LimitExceededException * Exceeded the maximum limit for connections. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.TagResource * @see AWS API Documentation */ default TagResourceResponse tagResource(Consumer tagResourceRequest) throws ResourceNotFoundException, LimitExceededException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return tagResource(TagResourceRequest.builder().applyMutation(tagResourceRequest).build()); } /** *

* Removes tags from an AWS resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.UntagResource * @see AWS API Documentation */ default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Removes tags from an AWS resource. *

*
*

* This is a convenience which creates an instance of the {@link UntagResourceRequest.Builder} avoiding the need to * create one manually via {@link UntagResourceRequest#builder()} *

* * @param untagResourceRequest * A {@link Consumer} that will call methods on {@link UntagResourceInput.Builder} to create a request. * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.UntagResource * @see AWS API Documentation */ default UntagResourceResponse untagResource(Consumer untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return untagResource(UntagResourceRequest.builder().applyMutation(untagResourceRequest).build()); } /** *

* Updates a specified host with the provided configurations. *

* * @param updateHostRequest * @return Result of the UpdateHost operation returned by the service. * @throws ConflictException * Two conflicting operations have been made on the same resource. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @throws UnsupportedOperationException * The operation is not supported. Check the connection status and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.UpdateHost * @see AWS API Documentation */ default UpdateHostResponse updateHost(UpdateHostRequest updateHostRequest) throws ConflictException, ResourceNotFoundException, ResourceUnavailableException, software.amazon.awssdk.services.codestarconnections.model.UnsupportedOperationException, AwsServiceException, SdkClientException, CodeStarConnectionsException { throw new UnsupportedOperationException(); } /** *

* Updates a specified host with the provided configurations. *

*
*

* This is a convenience which creates an instance of the {@link UpdateHostRequest.Builder} avoiding the need to * create one manually via {@link UpdateHostRequest#builder()} *

* * @param updateHostRequest * A {@link Consumer} that will call methods on {@link UpdateHostInput.Builder} to create a request. * @return Result of the UpdateHost operation returned by the service. * @throws ConflictException * Two conflicting operations have been made on the same resource. * @throws ResourceNotFoundException * Resource not found. Verify the connection resource ARN and try again. * @throws ResourceUnavailableException * Resource not found. Verify the ARN for the host resource and try again. * @throws UnsupportedOperationException * The operation is not supported. Check the connection status and try again. * @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. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CodeStarConnectionsException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeStarConnectionsClient.UpdateHost * @see AWS API Documentation */ default UpdateHostResponse updateHost(Consumer updateHostRequest) throws ConflictException, ResourceNotFoundException, ResourceUnavailableException, software.amazon.awssdk.services.codestarconnections.model.UnsupportedOperationException, AwsServiceException, SdkClientException, CodeStarConnectionsException { return updateHost(UpdateHostRequest.builder().applyMutation(updateHostRequest).build()); } static ServiceMetadata serviceMetadata() { return ServiceMetadata.of(SERVICE_METADATA_ID); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy