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

software.amazon.awssdk.services.codebuild.DefaultCodeBuildClient Maven / Gradle / Ivy

Go to download

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

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.codebuild;

import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.codebuild.model.AccountLimitExceededException;
import software.amazon.awssdk.services.codebuild.model.BatchDeleteBuildsRequest;
import software.amazon.awssdk.services.codebuild.model.BatchDeleteBuildsResponse;
import software.amazon.awssdk.services.codebuild.model.BatchGetBuildBatchesRequest;
import software.amazon.awssdk.services.codebuild.model.BatchGetBuildBatchesResponse;
import software.amazon.awssdk.services.codebuild.model.BatchGetBuildsRequest;
import software.amazon.awssdk.services.codebuild.model.BatchGetBuildsResponse;
import software.amazon.awssdk.services.codebuild.model.BatchGetProjectsRequest;
import software.amazon.awssdk.services.codebuild.model.BatchGetProjectsResponse;
import software.amazon.awssdk.services.codebuild.model.BatchGetReportGroupsRequest;
import software.amazon.awssdk.services.codebuild.model.BatchGetReportGroupsResponse;
import software.amazon.awssdk.services.codebuild.model.BatchGetReportsRequest;
import software.amazon.awssdk.services.codebuild.model.BatchGetReportsResponse;
import software.amazon.awssdk.services.codebuild.model.CodeBuildException;
import software.amazon.awssdk.services.codebuild.model.CodeBuildRequest;
import software.amazon.awssdk.services.codebuild.model.CreateProjectRequest;
import software.amazon.awssdk.services.codebuild.model.CreateProjectResponse;
import software.amazon.awssdk.services.codebuild.model.CreateReportGroupRequest;
import software.amazon.awssdk.services.codebuild.model.CreateReportGroupResponse;
import software.amazon.awssdk.services.codebuild.model.CreateWebhookRequest;
import software.amazon.awssdk.services.codebuild.model.CreateWebhookResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteBuildBatchRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteBuildBatchResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteProjectRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteProjectResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteReportGroupRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteReportGroupResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteReportRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteReportResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteResourcePolicyRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteResourcePolicyResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteSourceCredentialsRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteSourceCredentialsResponse;
import software.amazon.awssdk.services.codebuild.model.DeleteWebhookRequest;
import software.amazon.awssdk.services.codebuild.model.DeleteWebhookResponse;
import software.amazon.awssdk.services.codebuild.model.DescribeCodeCoveragesRequest;
import software.amazon.awssdk.services.codebuild.model.DescribeCodeCoveragesResponse;
import software.amazon.awssdk.services.codebuild.model.DescribeTestCasesRequest;
import software.amazon.awssdk.services.codebuild.model.DescribeTestCasesResponse;
import software.amazon.awssdk.services.codebuild.model.GetReportGroupTrendRequest;
import software.amazon.awssdk.services.codebuild.model.GetReportGroupTrendResponse;
import software.amazon.awssdk.services.codebuild.model.GetResourcePolicyRequest;
import software.amazon.awssdk.services.codebuild.model.GetResourcePolicyResponse;
import software.amazon.awssdk.services.codebuild.model.ImportSourceCredentialsRequest;
import software.amazon.awssdk.services.codebuild.model.ImportSourceCredentialsResponse;
import software.amazon.awssdk.services.codebuild.model.InvalidInputException;
import software.amazon.awssdk.services.codebuild.model.InvalidateProjectCacheRequest;
import software.amazon.awssdk.services.codebuild.model.InvalidateProjectCacheResponse;
import software.amazon.awssdk.services.codebuild.model.ListBuildBatchesForProjectRequest;
import software.amazon.awssdk.services.codebuild.model.ListBuildBatchesForProjectResponse;
import software.amazon.awssdk.services.codebuild.model.ListBuildBatchesRequest;
import software.amazon.awssdk.services.codebuild.model.ListBuildBatchesResponse;
import software.amazon.awssdk.services.codebuild.model.ListBuildsForProjectRequest;
import software.amazon.awssdk.services.codebuild.model.ListBuildsForProjectResponse;
import software.amazon.awssdk.services.codebuild.model.ListBuildsRequest;
import software.amazon.awssdk.services.codebuild.model.ListBuildsResponse;
import software.amazon.awssdk.services.codebuild.model.ListCuratedEnvironmentImagesRequest;
import software.amazon.awssdk.services.codebuild.model.ListCuratedEnvironmentImagesResponse;
import software.amazon.awssdk.services.codebuild.model.ListProjectsRequest;
import software.amazon.awssdk.services.codebuild.model.ListProjectsResponse;
import software.amazon.awssdk.services.codebuild.model.ListReportGroupsRequest;
import software.amazon.awssdk.services.codebuild.model.ListReportGroupsResponse;
import software.amazon.awssdk.services.codebuild.model.ListReportsForReportGroupRequest;
import software.amazon.awssdk.services.codebuild.model.ListReportsForReportGroupResponse;
import software.amazon.awssdk.services.codebuild.model.ListReportsRequest;
import software.amazon.awssdk.services.codebuild.model.ListReportsResponse;
import software.amazon.awssdk.services.codebuild.model.ListSharedProjectsRequest;
import software.amazon.awssdk.services.codebuild.model.ListSharedProjectsResponse;
import software.amazon.awssdk.services.codebuild.model.ListSharedReportGroupsRequest;
import software.amazon.awssdk.services.codebuild.model.ListSharedReportGroupsResponse;
import software.amazon.awssdk.services.codebuild.model.ListSourceCredentialsRequest;
import software.amazon.awssdk.services.codebuild.model.ListSourceCredentialsResponse;
import software.amazon.awssdk.services.codebuild.model.OAuthProviderException;
import software.amazon.awssdk.services.codebuild.model.PutResourcePolicyRequest;
import software.amazon.awssdk.services.codebuild.model.PutResourcePolicyResponse;
import software.amazon.awssdk.services.codebuild.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.codebuild.model.ResourceNotFoundException;
import software.amazon.awssdk.services.codebuild.model.RetryBuildBatchRequest;
import software.amazon.awssdk.services.codebuild.model.RetryBuildBatchResponse;
import software.amazon.awssdk.services.codebuild.model.RetryBuildRequest;
import software.amazon.awssdk.services.codebuild.model.RetryBuildResponse;
import software.amazon.awssdk.services.codebuild.model.StartBuildBatchRequest;
import software.amazon.awssdk.services.codebuild.model.StartBuildBatchResponse;
import software.amazon.awssdk.services.codebuild.model.StartBuildRequest;
import software.amazon.awssdk.services.codebuild.model.StartBuildResponse;
import software.amazon.awssdk.services.codebuild.model.StopBuildBatchRequest;
import software.amazon.awssdk.services.codebuild.model.StopBuildBatchResponse;
import software.amazon.awssdk.services.codebuild.model.StopBuildRequest;
import software.amazon.awssdk.services.codebuild.model.StopBuildResponse;
import software.amazon.awssdk.services.codebuild.model.UpdateProjectRequest;
import software.amazon.awssdk.services.codebuild.model.UpdateProjectResponse;
import software.amazon.awssdk.services.codebuild.model.UpdateReportGroupRequest;
import software.amazon.awssdk.services.codebuild.model.UpdateReportGroupResponse;
import software.amazon.awssdk.services.codebuild.model.UpdateWebhookRequest;
import software.amazon.awssdk.services.codebuild.model.UpdateWebhookResponse;
import software.amazon.awssdk.services.codebuild.paginators.DescribeCodeCoveragesIterable;
import software.amazon.awssdk.services.codebuild.paginators.DescribeTestCasesIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesForProjectIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListBuildsForProjectIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListBuildsIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListProjectsIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListReportGroupsIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListReportsForReportGroupIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListReportsIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListSharedProjectsIterable;
import software.amazon.awssdk.services.codebuild.paginators.ListSharedReportGroupsIterable;
import software.amazon.awssdk.services.codebuild.transform.BatchDeleteBuildsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.BatchGetBuildBatchesRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.BatchGetBuildsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.BatchGetProjectsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.BatchGetReportGroupsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.BatchGetReportsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.CreateProjectRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.CreateReportGroupRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.CreateWebhookRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteBuildBatchRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteProjectRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteReportGroupRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteReportRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteSourceCredentialsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DeleteWebhookRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DescribeCodeCoveragesRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.DescribeTestCasesRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.GetReportGroupTrendRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.GetResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ImportSourceCredentialsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.InvalidateProjectCacheRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListBuildBatchesForProjectRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListBuildBatchesRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListBuildsForProjectRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListBuildsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListCuratedEnvironmentImagesRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListProjectsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListReportGroupsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListReportsForReportGroupRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListReportsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListSharedProjectsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListSharedReportGroupsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.ListSourceCredentialsRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.PutResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.RetryBuildBatchRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.RetryBuildRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.StartBuildBatchRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.StartBuildRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.StopBuildBatchRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.StopBuildRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.UpdateProjectRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.UpdateReportGroupRequestMarshaller;
import software.amazon.awssdk.services.codebuild.transform.UpdateWebhookRequestMarshaller;
import software.amazon.awssdk.utils.Logger;

/**
 * Internal implementation of {@link CodeBuildClient}.
 *
 * @see CodeBuildClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultCodeBuildClient implements CodeBuildClient {
    private static final Logger log = Logger.loggerFor(DefaultCodeBuildClient.class);

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultCodeBuildClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Deletes one or more builds. *

* * @param batchDeleteBuildsRequest * @return Result of the BatchDeleteBuilds operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchDeleteBuilds * @see AWS * API Documentation */ @Override public BatchDeleteBuildsResponse batchDeleteBuilds(BatchDeleteBuildsRequest batchDeleteBuildsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, BatchDeleteBuildsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchDeleteBuildsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchDeleteBuilds"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchDeleteBuilds").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchDeleteBuildsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchDeleteBuildsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves information about one or more batch builds. *

* * @param batchGetBuildBatchesRequest * @return Result of the BatchGetBuildBatches operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchGetBuildBatches * @see AWS * API Documentation */ @Override public BatchGetBuildBatchesResponse batchGetBuildBatches(BatchGetBuildBatchesRequest batchGetBuildBatchesRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchGetBuildBatchesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetBuildBatchesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetBuildBatches"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchGetBuildBatches").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchGetBuildBatchesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchGetBuildBatchesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about one or more builds. *

* * @param batchGetBuildsRequest * @return Result of the BatchGetBuilds operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchGetBuilds * @see AWS API * Documentation */ @Override public BatchGetBuildsResponse batchGetBuilds(BatchGetBuildsRequest batchGetBuildsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, BatchGetBuildsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetBuildsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetBuilds"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchGetBuilds").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchGetBuildsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchGetBuildsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about one or more build projects. *

* * @param batchGetProjectsRequest * @return Result of the BatchGetProjects operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchGetProjects * @see AWS API * Documentation */ @Override public BatchGetProjectsResponse batchGetProjects(BatchGetProjectsRequest batchGetProjectsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, BatchGetProjectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetProjectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetProjects"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchGetProjects").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchGetProjectsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchGetProjectsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns an array of report groups. *

* * @param batchGetReportGroupsRequest * @return Result of the BatchGetReportGroups operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchGetReportGroups * @see AWS * API Documentation */ @Override public BatchGetReportGroupsResponse batchGetReportGroups(BatchGetReportGroupsRequest batchGetReportGroupsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, BatchGetReportGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetReportGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetReportGroups"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchGetReportGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchGetReportGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchGetReportGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns an array of reports. *

* * @param batchGetReportsRequest * @return Result of the BatchGetReports operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.BatchGetReports * @see AWS API * Documentation */ @Override public BatchGetReportsResponse batchGetReports(BatchGetReportsRequest batchGetReportsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, BatchGetReportsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetReportsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetReports"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("BatchGetReports").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(batchGetReportsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new BatchGetReportsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a build project. *

* * @param createProjectRequest * @return Result of the CreateProject operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceAlreadyExistsException * The specified AWS resource cannot be created, because an AWS resource with the same settings already * exists. * @throws AccountLimitExceededException * An AWS service limit was exceeded for the calling AWS account. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.CreateProject * @see AWS API * Documentation */ @Override public CreateProjectResponse createProject(CreateProjectRequest createProjectRequest) throws InvalidInputException, ResourceAlreadyExistsException, AccountLimitExceededException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createProjectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProject"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateProject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a report group. A report group contains a collection of reports. *

* * @param createReportGroupRequest * @return Result of the CreateReportGroup operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceAlreadyExistsException * The specified AWS resource cannot be created, because an AWS resource with the same settings already * exists. * @throws AccountLimitExceededException * An AWS service limit was exceeded for the calling AWS account. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.CreateReportGroup * @see AWS * API Documentation */ @Override public CreateReportGroupResponse createReportGroup(CreateReportGroupRequest createReportGroupRequest) throws InvalidInputException, ResourceAlreadyExistsException, AccountLimitExceededException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateReportGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createReportGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReportGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateReportGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createReportGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateReportGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, * enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed to the repository. *

* *

* If you enable webhooks for an AWS CodeBuild project, and the project is used as a build step in AWS CodePipeline, * then two identical builds are created for each commit. One build is triggered through webhooks, and one through * AWS CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are * using AWS CodePipeline, we recommend that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, * clear the Webhook box. For more information, see step 5 in Change a * Build Project's Settings. *

*
* * @param createWebhookRequest * @return Result of the CreateWebhook operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws OAuthProviderException * There was a problem with the underlying OAuth provider. * @throws ResourceAlreadyExistsException * The specified AWS resource cannot be created, because an AWS resource with the same settings already * exists. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.CreateWebhook * @see AWS API * Documentation */ @Override public CreateWebhookResponse createWebhook(CreateWebhookRequest createWebhookRequest) throws InvalidInputException, OAuthProviderException, ResourceAlreadyExistsException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateWebhookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createWebhookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWebhook"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateWebhook").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createWebhookRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateWebhookRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a batch build. *

* * @param deleteBuildBatchRequest * @return Result of the DeleteBuildBatch operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteBuildBatch * @see AWS API * Documentation */ @Override public DeleteBuildBatchResponse deleteBuildBatch(DeleteBuildBatchRequest deleteBuildBatchRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteBuildBatchResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBuildBatchRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBuildBatch"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteBuildBatch").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteBuildBatchRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteBuildBatchRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a build project. When you delete a project, its builds are not deleted. *

* * @param deleteProjectRequest * @return Result of the DeleteProject operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteProject * @see AWS API * Documentation */ @Override public DeleteProjectResponse deleteProject(DeleteProjectRequest deleteProjectRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteProjectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteProject"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteProject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a report. *

* * @param deleteReportRequest * @return Result of the DeleteReport operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteReport * @see AWS API * Documentation */ @Override public DeleteReportResponse deleteReport(DeleteReportRequest deleteReportRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteReportResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReportRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReport"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteReport").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteReportRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReportRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a report group. Before you delete a report group, you must delete its reports. *

* * @param deleteReportGroupRequest * @return Result of the DeleteReportGroup operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteReportGroup * @see AWS * API Documentation */ @Override public DeleteReportGroupResponse deleteReportGroup(DeleteReportGroupRequest deleteReportGroupRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteReportGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReportGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReportGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteReportGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteReportGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteReportGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a resource policy that is identified by its resource ARN. *

* * @param deleteResourcePolicyRequest * @return Result of the DeleteResourcePolicy operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteResourcePolicy * @see AWS * API Documentation */ @Override public DeleteResourcePolicyResponse deleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteResourcePolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials. *

* * @param deleteSourceCredentialsRequest * @return Result of the DeleteSourceCredentials operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteSourceCredentials * @see AWS API Documentation */ @Override public DeleteSourceCredentialsResponse deleteSourceCredentials(DeleteSourceCredentialsRequest deleteSourceCredentialsRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSourceCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSourceCredentialsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSourceCredentials"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSourceCredentials").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteSourceCredentialsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteSourceCredentialsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, * stops AWS CodeBuild from rebuilding the source code every time a code change is pushed to the repository. *

* * @param deleteWebhookRequest * @return Result of the DeleteWebhook operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws OAuthProviderException * There was a problem with the underlying OAuth provider. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DeleteWebhook * @see AWS API * Documentation */ @Override public DeleteWebhookResponse deleteWebhook(DeleteWebhookRequest deleteWebhookRequest) throws InvalidInputException, ResourceNotFoundException, OAuthProviderException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteWebhookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteWebhookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteWebhook"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteWebhook").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteWebhookRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteWebhookRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves one or more code coverage reports. *

* * @param describeCodeCoveragesRequest * @return Result of the DescribeCodeCoverages operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DescribeCodeCoverages * @see AWS API Documentation */ @Override public DescribeCodeCoveragesResponse describeCodeCoverages(DescribeCodeCoveragesRequest describeCodeCoveragesRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCodeCoveragesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCodeCoveragesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCodeCoverages"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeCodeCoverages").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeCodeCoveragesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeCodeCoveragesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves one or more code coverage reports. *

*
*

* This is a variant of * {@link #describeCodeCoverages(software.amazon.awssdk.services.codebuild.model.DescribeCodeCoveragesRequest)} * 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.codebuild.paginators.DescribeCodeCoveragesIterable responses = client.describeCodeCoveragesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.DescribeCodeCoveragesIterable responses = client
     *             .describeCodeCoveragesPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.DescribeCodeCoveragesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.DescribeCodeCoveragesIterable responses = client.describeCodeCoveragesPaginator(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 #describeCodeCoverages(software.amazon.awssdk.services.codebuild.model.DescribeCodeCoveragesRequest)} * operation. *

* * @param describeCodeCoveragesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DescribeCodeCoverages * @see AWS API Documentation */ @Override public DescribeCodeCoveragesIterable describeCodeCoveragesPaginator(DescribeCodeCoveragesRequest describeCodeCoveragesRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new DescribeCodeCoveragesIterable(this, applyPaginatorUserAgent(describeCodeCoveragesRequest)); } /** *

* Returns a list of details about test cases for a report. *

* * @param describeTestCasesRequest * @return Result of the DescribeTestCases operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DescribeTestCases * @see AWS * API Documentation */ @Override public DescribeTestCasesResponse describeTestCases(DescribeTestCasesRequest describeTestCasesRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeTestCasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTestCasesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTestCases"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeTestCases").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeTestCasesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeTestCasesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of details about test cases for a report. *

*
*

* This is a variant of * {@link #describeTestCases(software.amazon.awssdk.services.codebuild.model.DescribeTestCasesRequest)} 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.codebuild.paginators.DescribeTestCasesIterable responses = client.describeTestCasesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.DescribeTestCasesIterable responses = client
     *             .describeTestCasesPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.DescribeTestCasesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.DescribeTestCasesIterable responses = client.describeTestCasesPaginator(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 #describeTestCases(software.amazon.awssdk.services.codebuild.model.DescribeTestCasesRequest)} * operation. *

* * @param describeTestCasesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.DescribeTestCases * @see AWS * API Documentation */ @Override public DescribeTestCasesIterable describeTestCasesPaginator(DescribeTestCasesRequest describeTestCasesRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { return new DescribeTestCasesIterable(this, applyPaginatorUserAgent(describeTestCasesRequest)); } /** * Invokes the GetReportGroupTrend operation. * * @param getReportGroupTrendRequest * @return Result of the GetReportGroupTrend operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.GetReportGroupTrend * @see AWS * API Documentation */ @Override public GetReportGroupTrendResponse getReportGroupTrend(GetReportGroupTrendRequest getReportGroupTrendRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetReportGroupTrendResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getReportGroupTrendRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetReportGroupTrend"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetReportGroupTrend").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getReportGroupTrendRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetReportGroupTrendRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a resource policy that is identified by its resource ARN. *

* * @param getResourcePolicyRequest * @return Result of the GetResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.GetResourcePolicy * @see AWS * API Documentation */ @Override public GetResourcePolicyResponse getResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest) throws ResourceNotFoundException, InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetResourcePolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a * GitHub, GitHub Enterprise, or Bitbucket repository. *

* * @param importSourceCredentialsRequest * @return Result of the ImportSourceCredentials operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws AccountLimitExceededException * An AWS service limit was exceeded for the calling AWS account. * @throws ResourceAlreadyExistsException * The specified AWS resource cannot be created, because an AWS resource with the same settings already * exists. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ImportSourceCredentials * @see AWS API Documentation */ @Override public ImportSourceCredentialsResponse importSourceCredentials(ImportSourceCredentialsRequest importSourceCredentialsRequest) throws InvalidInputException, AccountLimitExceededException, ResourceAlreadyExistsException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ImportSourceCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, importSourceCredentialsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportSourceCredentials"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ImportSourceCredentials").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(importSourceCredentialsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ImportSourceCredentialsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Resets the cache for a project. *

* * @param invalidateProjectCacheRequest * @return Result of the InvalidateProjectCache operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.InvalidateProjectCache * @see AWS API Documentation */ @Override public InvalidateProjectCacheResponse invalidateProjectCache(InvalidateProjectCacheRequest invalidateProjectCacheRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, InvalidateProjectCacheResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, invalidateProjectCacheRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "InvalidateProjectCache"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("InvalidateProjectCache").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(invalidateProjectCacheRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new InvalidateProjectCacheRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves the identifiers of your build batches in the current region. *

* * @param listBuildBatchesRequest * @return Result of the ListBuildBatches operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildBatches * @see AWS API * Documentation */ @Override public ListBuildBatchesResponse listBuildBatches(ListBuildBatchesRequest listBuildBatchesRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListBuildBatchesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBuildBatchesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBuildBatches"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListBuildBatches").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listBuildBatchesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListBuildBatchesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves the identifiers of your build batches in the current region. *

*
*

* This is a variant of * {@link #listBuildBatches(software.amazon.awssdk.services.codebuild.model.ListBuildBatchesRequest)} 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.codebuild.paginators.ListBuildBatchesIterable responses = client.listBuildBatchesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesIterable responses = client
     *             .listBuildBatchesPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListBuildBatchesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesIterable responses = client.listBuildBatchesPaginator(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 #listBuildBatches(software.amazon.awssdk.services.codebuild.model.ListBuildBatchesRequest)} operation. *

* * @param listBuildBatchesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildBatches * @see AWS API * Documentation */ @Override public ListBuildBatchesIterable listBuildBatchesPaginator(ListBuildBatchesRequest listBuildBatchesRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListBuildBatchesIterable(this, applyPaginatorUserAgent(listBuildBatchesRequest)); } /** *

* Retrieves the identifiers of the build batches for a specific project. *

* * @param listBuildBatchesForProjectRequest * @return Result of the ListBuildBatchesForProject operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildBatchesForProject * @see AWS API Documentation */ @Override public ListBuildBatchesForProjectResponse listBuildBatchesForProject( ListBuildBatchesForProjectRequest listBuildBatchesForProjectRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListBuildBatchesForProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBuildBatchesForProjectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBuildBatchesForProject"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListBuildBatchesForProject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listBuildBatchesForProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListBuildBatchesForProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves the identifiers of the build batches for a specific project. *

*
*

* This is a variant of * {@link #listBuildBatchesForProject(software.amazon.awssdk.services.codebuild.model.ListBuildBatchesForProjectRequest)} * 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.codebuild.paginators.ListBuildBatchesForProjectIterable responses = client.listBuildBatchesForProjectPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesForProjectIterable responses = client
     *             .listBuildBatchesForProjectPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListBuildBatchesForProjectResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListBuildBatchesForProjectIterable responses = client.listBuildBatchesForProjectPaginator(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 #listBuildBatchesForProject(software.amazon.awssdk.services.codebuild.model.ListBuildBatchesForProjectRequest)} * operation. *

* * @param listBuildBatchesForProjectRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildBatchesForProject * @see AWS API Documentation */ @Override public ListBuildBatchesForProjectIterable listBuildBatchesForProjectPaginator( ListBuildBatchesForProjectRequest listBuildBatchesForProjectRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { return new ListBuildBatchesForProjectIterable(this, applyPaginatorUserAgent(listBuildBatchesForProjectRequest)); } /** *

* Gets a list of build IDs, with each build ID representing a single build. *

* * @param listBuildsRequest * @return Result of the ListBuilds operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuilds * @see AWS API * Documentation */ @Override public ListBuildsResponse listBuilds(ListBuildsRequest listBuildsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListBuildsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBuildsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBuilds"); return clientHandler .execute(new ClientExecutionParams().withOperationName("ListBuilds") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(listBuildsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListBuildsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of build IDs, with each build ID representing a single build. *

*
*

* This is a variant of {@link #listBuilds(software.amazon.awssdk.services.codebuild.model.ListBuildsRequest)} * 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.codebuild.paginators.ListBuildsIterable responses = client.listBuildsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListBuildsIterable responses = client.listBuildsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListBuildsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListBuildsIterable responses = client.listBuildsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null 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 #listBuilds(software.amazon.awssdk.services.codebuild.model.ListBuildsRequest)} operation. *

* * @param listBuildsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuilds * @see AWS API * Documentation */ @Override public ListBuildsIterable listBuildsPaginator(ListBuildsRequest listBuildsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListBuildsIterable(this, applyPaginatorUserAgent(listBuildsRequest)); } /** *

* Gets a list of build IDs for the specified build project, with each build ID representing a single build. *

* * @param listBuildsForProjectRequest * @return Result of the ListBuildsForProject operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildsForProject * @see AWS * API Documentation */ @Override public ListBuildsForProjectResponse listBuildsForProject(ListBuildsForProjectRequest listBuildsForProjectRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListBuildsForProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBuildsForProjectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBuildsForProject"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListBuildsForProject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listBuildsForProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListBuildsForProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of build IDs for the specified build project, with each build ID representing a single build. *

*
*

* This is a variant of * {@link #listBuildsForProject(software.amazon.awssdk.services.codebuild.model.ListBuildsForProjectRequest)} * 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.codebuild.paginators.ListBuildsForProjectIterable responses = client.listBuildsForProjectPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListBuildsForProjectIterable responses = client
     *             .listBuildsForProjectPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListBuildsForProjectResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListBuildsForProjectIterable responses = client.listBuildsForProjectPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null 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 #listBuildsForProject(software.amazon.awssdk.services.codebuild.model.ListBuildsForProjectRequest)} * operation. *

* * @param listBuildsForProjectRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListBuildsForProject * @see AWS * API Documentation */ @Override public ListBuildsForProjectIterable listBuildsForProjectPaginator(ListBuildsForProjectRequest listBuildsForProjectRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { return new ListBuildsForProjectIterable(this, applyPaginatorUserAgent(listBuildsForProjectRequest)); } /** *

* Gets information about Docker images that are managed by AWS CodeBuild. *

* * @param listCuratedEnvironmentImagesRequest * @return Result of the ListCuratedEnvironmentImages 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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListCuratedEnvironmentImages * @see AWS API Documentation */ @Override public ListCuratedEnvironmentImagesResponse listCuratedEnvironmentImages( ListCuratedEnvironmentImagesRequest listCuratedEnvironmentImagesRequest) throws AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCuratedEnvironmentImagesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCuratedEnvironmentImagesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCuratedEnvironmentImages"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCuratedEnvironmentImages").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listCuratedEnvironmentImagesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCuratedEnvironmentImagesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of build project names, with each build project name representing a single build project. *

* * @param listProjectsRequest * @return Result of the ListProjects operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListProjects * @see AWS API * Documentation */ @Override public ListProjectsResponse listProjects(ListProjectsRequest listProjectsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListProjectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listProjectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListProjects"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListProjects").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listProjectsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListProjectsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of build project names, with each build project name representing a single build project. *

*
*

* This is a variant of {@link #listProjects(software.amazon.awssdk.services.codebuild.model.ListProjectsRequest)} * 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.codebuild.paginators.ListProjectsIterable responses = client.listProjectsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListProjectsIterable responses = client.listProjectsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListProjectsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListProjectsIterable responses = client.listProjectsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null 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 #listProjects(software.amazon.awssdk.services.codebuild.model.ListProjectsRequest)} operation. *

* * @param listProjectsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListProjects * @see AWS API * Documentation */ @Override public ListProjectsIterable listProjectsPaginator(ListProjectsRequest listProjectsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListProjectsIterable(this, applyPaginatorUserAgent(listProjectsRequest)); } /** *

* Gets a list ARNs for the report groups in the current AWS account. *

* * @param listReportGroupsRequest * @return Result of the ListReportGroups operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReportGroups * @see AWS API * Documentation */ @Override public ListReportGroupsResponse listReportGroups(ListReportGroupsRequest listReportGroupsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListReportGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listReportGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReportGroups"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListReportGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listReportGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListReportGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list ARNs for the report groups in the current AWS account. *

*
*

* This is a variant of * {@link #listReportGroups(software.amazon.awssdk.services.codebuild.model.ListReportGroupsRequest)} 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.codebuild.paginators.ListReportGroupsIterable responses = client.listReportGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListReportGroupsIterable responses = client
     *             .listReportGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListReportGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListReportGroupsIterable responses = client.listReportGroupsPaginator(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 #listReportGroups(software.amazon.awssdk.services.codebuild.model.ListReportGroupsRequest)} operation. *

* * @param listReportGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReportGroups * @see AWS API * Documentation */ @Override public ListReportGroupsIterable listReportGroupsPaginator(ListReportGroupsRequest listReportGroupsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListReportGroupsIterable(this, applyPaginatorUserAgent(listReportGroupsRequest)); } /** *

* Returns a list of ARNs for the reports in the current AWS account. *

* * @param listReportsRequest * @return Result of the ListReports operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReports * @see AWS API * Documentation */ @Override public ListReportsResponse listReports(ListReportsRequest listReportsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListReportsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listReportsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReports"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListReports").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listReportsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListReportsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of ARNs for the reports in the current AWS account. *

*
*

* This is a variant of {@link #listReports(software.amazon.awssdk.services.codebuild.model.ListReportsRequest)} * 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.codebuild.paginators.ListReportsIterable responses = client.listReportsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListReportsIterable responses = client.listReportsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListReportsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListReportsIterable responses = client.listReportsPaginator(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 #listReports(software.amazon.awssdk.services.codebuild.model.ListReportsRequest)} operation. *

* * @param listReportsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReports * @see AWS API * Documentation */ @Override public ListReportsIterable listReportsPaginator(ListReportsRequest listReportsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListReportsIterable(this, applyPaginatorUserAgent(listReportsRequest)); } /** *

* Returns a list of ARNs for the reports that belong to a ReportGroup. *

* * @param listReportsForReportGroupRequest * @return Result of the ListReportsForReportGroup operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReportsForReportGroup * @see AWS API Documentation */ @Override public ListReportsForReportGroupResponse listReportsForReportGroup( ListReportsForReportGroupRequest listReportsForReportGroupRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListReportsForReportGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listReportsForReportGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReportsForReportGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListReportsForReportGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listReportsForReportGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListReportsForReportGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of ARNs for the reports that belong to a ReportGroup. *

*
*

* This is a variant of * {@link #listReportsForReportGroup(software.amazon.awssdk.services.codebuild.model.ListReportsForReportGroupRequest)} * 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.codebuild.paginators.ListReportsForReportGroupIterable responses = client.listReportsForReportGroupPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListReportsForReportGroupIterable responses = client
     *             .listReportsForReportGroupPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListReportsForReportGroupResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListReportsForReportGroupIterable responses = client.listReportsForReportGroupPaginator(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 #listReportsForReportGroup(software.amazon.awssdk.services.codebuild.model.ListReportsForReportGroupRequest)} * operation. *

* * @param listReportsForReportGroupRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListReportsForReportGroup * @see AWS API Documentation */ @Override public ListReportsForReportGroupIterable listReportsForReportGroupPaginator( ListReportsForReportGroupRequest listReportsForReportGroupRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { return new ListReportsForReportGroupIterable(this, applyPaginatorUserAgent(listReportsForReportGroupRequest)); } /** *

* Gets a list of projects that are shared with other AWS accounts or users. *

* * @param listSharedProjectsRequest * @return Result of the ListSharedProjects operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListSharedProjects * @see AWS * API Documentation */ @Override public ListSharedProjectsResponse listSharedProjects(ListSharedProjectsRequest listSharedProjectsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSharedProjectsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSharedProjectsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSharedProjects"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListSharedProjects").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listSharedProjectsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSharedProjectsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of projects that are shared with other AWS accounts or users. *

*
*

* This is a variant of * {@link #listSharedProjects(software.amazon.awssdk.services.codebuild.model.ListSharedProjectsRequest)} 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.codebuild.paginators.ListSharedProjectsIterable responses = client.listSharedProjectsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListSharedProjectsIterable responses = client
     *             .listSharedProjectsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListSharedProjectsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListSharedProjectsIterable responses = client.listSharedProjectsPaginator(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 #listSharedProjects(software.amazon.awssdk.services.codebuild.model.ListSharedProjectsRequest)} * operation. *

* * @param listSharedProjectsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListSharedProjects * @see AWS * API Documentation */ @Override public ListSharedProjectsIterable listSharedProjectsPaginator(ListSharedProjectsRequest listSharedProjectsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListSharedProjectsIterable(this, applyPaginatorUserAgent(listSharedProjectsRequest)); } /** *

* Gets a list of report groups that are shared with other AWS accounts or users. *

* * @param listSharedReportGroupsRequest * @return Result of the ListSharedReportGroups operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListSharedReportGroups * @see AWS API Documentation */ @Override public ListSharedReportGroupsResponse listSharedReportGroups(ListSharedReportGroupsRequest listSharedReportGroupsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSharedReportGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSharedReportGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSharedReportGroups"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSharedReportGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listSharedReportGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSharedReportGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of report groups that are shared with other AWS accounts or users. *

*
*

* This is a variant of * {@link #listSharedReportGroups(software.amazon.awssdk.services.codebuild.model.ListSharedReportGroupsRequest)} * 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.codebuild.paginators.ListSharedReportGroupsIterable responses = client.listSharedReportGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.codebuild.paginators.ListSharedReportGroupsIterable responses = client
     *             .listSharedReportGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.codebuild.model.ListSharedReportGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.codebuild.paginators.ListSharedReportGroupsIterable responses = client.listSharedReportGroupsPaginator(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 #listSharedReportGroups(software.amazon.awssdk.services.codebuild.model.ListSharedReportGroupsRequest)} * operation. *

* * @param listSharedReportGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListSharedReportGroups * @see AWS API Documentation */ @Override public ListSharedReportGroupsIterable listSharedReportGroupsPaginator( ListSharedReportGroupsRequest listSharedReportGroupsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { return new ListSharedReportGroupsIterable(this, applyPaginatorUserAgent(listSharedReportGroupsRequest)); } /** *

* Returns a list of SourceCredentialsInfo objects. *

* * @param listSourceCredentialsRequest * @return Result of the ListSourceCredentials operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.ListSourceCredentials * @see AWS API Documentation */ @Override public ListSourceCredentialsResponse listSourceCredentials(ListSourceCredentialsRequest listSourceCredentialsRequest) throws InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSourceCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSourceCredentialsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSourceCredentials"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListSourceCredentials").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listSourceCredentialsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSourceCredentialsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Stores a resource policy for the ARN of a Project or ReportGroup object. *

* * @param putResourcePolicyRequest * @return Result of the PutResourcePolicy operation returned by the service. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws InvalidInputException * The input value that was provided is not valid. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.PutResourcePolicy * @see AWS * API Documentation */ @Override public PutResourcePolicyResponse putResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest) throws ResourceNotFoundException, InvalidInputException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PutResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, putResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("PutResourcePolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restarts a build. *

* * @param retryBuildRequest * @return Result of the RetryBuild operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws AccountLimitExceededException * An AWS service limit was exceeded for the calling AWS account. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.RetryBuild * @see AWS API * Documentation */ @Override public RetryBuildResponse retryBuild(RetryBuildRequest retryBuildRequest) throws InvalidInputException, ResourceNotFoundException, AccountLimitExceededException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RetryBuildResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, retryBuildRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RetryBuild"); return clientHandler .execute(new ClientExecutionParams().withOperationName("RetryBuild") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(retryBuildRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new RetryBuildRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restarts a failed batch build. Only batch builds that have failed can be retried. *

* * @param retryBuildBatchRequest * @return Result of the RetryBuildBatch operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.RetryBuildBatch * @see AWS API * Documentation */ @Override public RetryBuildBatchResponse retryBuildBatch(RetryBuildBatchRequest retryBuildBatchRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RetryBuildBatchResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, retryBuildBatchRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RetryBuildBatch"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RetryBuildBatch").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(retryBuildBatchRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RetryBuildBatchRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts running a build. *

* * @param startBuildRequest * @return Result of the StartBuild operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws AccountLimitExceededException * An AWS service limit was exceeded for the calling AWS account. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.StartBuild * @see AWS API * Documentation */ @Override public StartBuildResponse startBuild(StartBuildRequest startBuildRequest) throws InvalidInputException, ResourceNotFoundException, AccountLimitExceededException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StartBuildResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startBuildRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartBuild"); return clientHandler .execute(new ClientExecutionParams().withOperationName("StartBuild") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(startBuildRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartBuildRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts a batch build for a project. *

* * @param startBuildBatchRequest * @return Result of the StartBuildBatch operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.StartBuildBatch * @see AWS API * Documentation */ @Override public StartBuildBatchResponse startBuildBatch(StartBuildBatchRequest startBuildBatchRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StartBuildBatchResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startBuildBatchRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartBuildBatch"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StartBuildBatch").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startBuildBatchRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartBuildBatchRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Attempts to stop running a build. *

* * @param stopBuildRequest * @return Result of the StopBuild operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.StopBuild * @see AWS API * Documentation */ @Override public StopBuildResponse stopBuild(StopBuildRequest stopBuildRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StopBuildResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopBuildRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopBuild"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StopBuild").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(stopBuildRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new StopBuildRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Stops a running batch build. *

* * @param stopBuildBatchRequest * @return Result of the StopBuildBatch operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.StopBuildBatch * @see AWS API * Documentation */ @Override public StopBuildBatchResponse stopBuildBatch(StopBuildBatchRequest stopBuildBatchRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, StopBuildBatchResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopBuildBatchRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopBuildBatch"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StopBuildBatch").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(stopBuildBatchRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StopBuildBatchRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Changes the settings of a build project. *

* * @param updateProjectRequest * @return Result of the UpdateProject operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.UpdateProject * @see AWS API * Documentation */ @Override public UpdateProjectResponse updateProject(UpdateProjectRequest updateProjectRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateProjectResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateProjectRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateProject"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateProject").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateProjectRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateProjectRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a report group. *

* * @param updateReportGroupRequest * @return Result of the UpdateReportGroup operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.UpdateReportGroup * @see AWS * API Documentation */ @Override public UpdateReportGroupResponse updateReportGroup(UpdateReportGroupRequest updateReportGroupRequest) throws InvalidInputException, ResourceNotFoundException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateReportGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateReportGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateReportGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateReportGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateReportGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateReportGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the webhook associated with an AWS CodeBuild build project. *

* *

* If you use Bitbucket for your repository, rotateSecret is ignored. *

*
* * @param updateWebhookRequest * @return Result of the UpdateWebhook operation returned by the service. * @throws InvalidInputException * The input value that was provided is not valid. * @throws ResourceNotFoundException * The specified AWS resource cannot be found. * @throws OAuthProviderException * There was a problem with the underlying OAuth provider. * @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 CodeBuildException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CodeBuildClient.UpdateWebhook * @see AWS API * Documentation */ @Override public UpdateWebhookResponse updateWebhook(UpdateWebhookRequest updateWebhookRequest) throws InvalidInputException, ResourceNotFoundException, OAuthProviderException, AwsServiceException, SdkClientException, CodeBuildException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateWebhookResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateWebhookRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CodeBuild"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateWebhook"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateWebhook").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateWebhookRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateWebhookRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(CodeBuildException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("OAuthProviderException") .exceptionBuilderSupplier(OAuthProviderException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidInputException") .exceptionBuilderSupplier(InvalidInputException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccountLimitExceededException") .exceptionBuilderSupplier(AccountLimitExceededException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceAlreadyExistsException") .exceptionBuilderSupplier(ResourceAlreadyExistsException::builder).build()); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy