com.amazonaws.services.codebuild

## Class AWSCodeBuildClient

- java.lang.Object
- - com.amazonaws.AmazonWebServiceClient
  - - com.amazonaws.services.codebuild.AWSCodeBuildClient

All Implemented Interfaces:
  AWSCodeBuild

Direct Known Subclasses:
  AWSCodeBuildAsyncClient

    @ThreadSafe
    public class AWSCodeBuildClient
    extends AmazonWebServiceClient
    implements AWSCodeBuild

Client for accessing AWS CodeBuild. All service calls made using this client are blocking, and will not return until the service call completes.

<fullname>AWS CodeBuild</fullname>

AWS CodeBuild is a fully-managed build service in the cloud. AWS CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. AWS CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for the most popular programming languages and build tools such as Apach Maven, Gradle, and more. You can also fully customize build environments in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically to meet peak build requests, and you pay only for the build time you consume. For more information about AWS CodeBuild, see the AWS CodeBuild User Guide.

AWS CodeBuild supports these operations:

- `BatchGetProjects`: Gets information about one or more build projects. A build project defines how AWS CodeBuild will run a build. This includes information such as where to get the source code to build, the build environment to use, the build commands to run, and where to store the build output. A build environment represents a combination of operating system, programming language runtime, and tools that AWS CodeBuild will use to run a build. Also, you can add tags to build projects to help manage your resources and costs.

- `CreateProject`: Creates a build project.

- `DeleteProject`: Deletes a build project.

- `ListProjects`: Gets a list of build project names, with each build project name representing a single build project.

- `UpdateProject`: Changes the settings of an existing build project.

- `BatchGetBuilds`: Gets information about one or more builds.

- `ListBuilds`: Gets a list of build IDs, with each build ID representing a single build.

- `ListBuildsForProject`: Gets a list of build IDs for the specified build project, with each build ID representing a single build.

- `StartBuild`: Starts running a build.

- `StopBuild`: Attempts to stop running a build.

- `ListCuratedEnvironmentImages`: Gets information about Docker images that are managed by AWS CodeBuild.

### Field Summary

Fields
`protected static ClientConfigurationFactory` `configFactory` Client configuration factory providing ClientConfigurations tailored to this client

### Fields inherited from class com.amazonaws.AmazonWebServiceClient

`client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset`

### Fields inherited from interface com.amazonaws.services.codebuild.AWSCodeBuild

`ENDPOINT_PREFIX`

### Constructor Summary

Constructors
Constructor and Description
`AWSCodeBuildClient()` Constructs a new client to invoke service methods on AWS CodeBuild.
`AWSCodeBuildClient(AWSCredentials awsCredentials)` Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials.
`AWSCodeBuildClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials and client configuration options.
`AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider)` Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider.
`AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider and client configuration options.
`AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)` Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider, client configuration options, and request metric collector.
`AWSCodeBuildClient(ClientConfiguration clientConfiguration)` Constructs a new client to invoke service methods on AWS CodeBuild.

### Method Summary

All Methods Instance Methods Concrete Methods
`BatchGetBuildsResult` `batchGetBuilds(BatchGetBuildsRequest batchGetBuildsRequest)` Gets information about one or more builds.
`BatchGetProjectsResult` `batchGetProjects(BatchGetProjectsRequest batchGetProjectsRequest)` Gets information about one or more build projects.
`CreateProjectResult` `createProject(CreateProjectRequest createProjectRequest)` Creates a build project.
`DeleteProjectResult` `deleteProject(DeleteProjectRequest deleteProjectRequest)` Deletes a build project.
`ResponseMetadata` `getCachedResponseMetadata(AmazonWebServiceRequest request)` Returns additional metadata for a previously executed successful, request, typically used for debugging issues where a service isn't acting as expected.
`ListBuildsResult` `listBuilds(ListBuildsRequest listBuildsRequest)` Gets a list of build IDs, with each build ID representing a single build.
`ListBuildsForProjectResult` `listBuildsForProject(ListBuildsForProjectRequest listBuildsForProjectRequest)` Gets a list of build IDs for the specified build project, with each build ID representing a single build.
`ListCuratedEnvironmentImagesResult` `listCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest listCuratedEnvironmentImagesRequest)` Gets information about Docker images that are managed by AWS CodeBuild.
`ListProjectsResult` `listProjects(ListProjectsRequest listProjectsRequest)` Gets a list of build project names, with each build project name representing a single build project.
`StartBuildResult` `startBuild(StartBuildRequest startBuildRequest)` Starts running a build.
`StopBuildResult` `stopBuild(StopBuildRequest stopBuildRequest)` Attempts to stop running a build.
`UpdateProjectResult` `updateProject(UpdateProjectRequest updateProjectRequest)` Changes the settings of an existing build project.

### Methods inherited from class com.amazonaws.AmazonWebServiceClient

`addRequestHandler, addRequestHandler, beforeMarshalling, calculateCRC32FromCompressedData, checkMutability, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, createSignerProvider, endClientExecution, endClientExecution, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerProvider, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, makeImmutable, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, useStrictHostNameVerification, withEndpoint, withRegion, withRegion, withTimeOffset`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.amazonaws.services.codebuild.AWSCodeBuild

`setEndpoint, setRegion, shutdown`

### Field Detail

#### configFactory

    protected static final ClientConfigurationFactory configFactory

Client configuration factory providing ClientConfigurations tailored to this client

### Constructor Detail

#### AWSCodeBuildClient

    public AWSCodeBuildClient()

Constructs a new client to invoke service methods on AWS CodeBuild. A credentials provider chain will be used that searches for credentials in this order:

- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

See Also:
  `DefaultAWSCredentialsProviderChain`

#### AWSCodeBuildClient

    public AWSCodeBuildClient(ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on AWS CodeBuild. A credentials provider chain will be used that searches for credentials in this order:

- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `clientConfiguration` - The client configuration options controlling how this client connects to AWS CodeBuild (ex: proxy settings, retry counts, etc.).
See Also:
  `DefaultAWSCredentialsProviderChain`

#### AWSCodeBuildClient

    public AWSCodeBuildClient(AWSCredentials awsCredentials)

Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials.

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `awsCredentials` - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.

#### AWSCodeBuildClient

    public AWSCodeBuildClient(AWSCredentials awsCredentials,
                              ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials and client configuration options.

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `awsCredentials` - The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to AWS CodeBuild (ex: proxy settings, retry counts, etc.).

#### AWSCodeBuildClient

    public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider)

Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider.

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.

#### AWSCodeBuildClient

    public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider,
                              ClientConfiguration clientConfiguration)

Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider and client configuration options.

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to AWS CodeBuild (ex: proxy settings, retry counts, etc.).

#### AWSCodeBuildClient

    public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider,
                              ClientConfiguration clientConfiguration,
                              RequestMetricCollector requestMetricCollector)

Constructs a new client to invoke service methods on AWS CodeBuild using the specified AWS account credentials provider, client configuration options, and request metric collector.

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
  `awsCredentialsProvider` - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
  `clientConfiguration` - The client configuration options controlling how this client connects to AWS CodeBuild (ex: proxy settings, retry counts, etc.).
  `requestMetricCollector` - optional request metric collector

### Method Detail

#### batchGetBuilds

    public BatchGetBuildsResult batchGetBuilds(BatchGetBuildsRequest batchGetBuildsRequest)

Gets information about one or more builds.

Specified by:
  `batchGetBuilds` in interface `AWSCodeBuild`
Parameters:
  `batchGetBuildsRequest` -
Returns:
  Result of the BatchGetBuilds operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.

#### batchGetProjects

    public BatchGetProjectsResult batchGetProjects(BatchGetProjectsRequest batchGetProjectsRequest)

Gets information about one or more build projects.

Specified by:
  `batchGetProjects` in interface `AWSCodeBuild`
Parameters:
  `batchGetProjectsRequest` -
Returns:
  Result of the BatchGetProjects operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.

#### createProject

    public CreateProjectResult createProject(CreateProjectRequest createProjectRequest)

Creates a build project.

Specified by:
  `createProject` in interface `AWSCodeBuild`
Parameters:
  `createProjectRequest` -
Returns:
  Result of the CreateProject operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.
  `ResourceAlreadyExistsException` - The specified AWS resource cannot be created, because an AWS resource with the same settings already exists.
  `AccountLimitExceededException` - An AWS service limit was exceeded for the calling AWS account.

#### deleteProject

    public DeleteProjectResult deleteProject(DeleteProjectRequest deleteProjectRequest)

Deletes a build project.

Specified by:
  `deleteProject` in interface `AWSCodeBuild`
Parameters:
  `deleteProjectRequest` -
Returns:
  Result of the DeleteProject operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.

#### listBuilds

    public ListBuildsResult listBuilds(ListBuildsRequest listBuildsRequest)

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

Specified by:
  `listBuilds` in interface `AWSCodeBuild`
Parameters:
  `listBuildsRequest` -
Returns:
  Result of the ListBuilds operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.

#### listBuildsForProject

    public ListBuildsForProjectResult listBuildsForProject(ListBuildsForProjectRequest listBuildsForProjectRequest)

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

Specified by:
  `listBuildsForProject` in interface `AWSCodeBuild`
Parameters:
  `listBuildsForProjectRequest` -
Returns:
  Result of the ListBuildsForProject operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.
  `ResourceNotFoundException` - The specified AWS resource cannot be found.

#### listCuratedEnvironmentImages

    public ListCuratedEnvironmentImagesResult listCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest listCuratedEnvironmentImagesRequest)

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

Specified by:
  `listCuratedEnvironmentImages` in interface `AWSCodeBuild`
Parameters:
  `listCuratedEnvironmentImagesRequest` -
Returns:
  Result of the ListCuratedEnvironmentImages operation returned by the service.

#### listProjects

    public ListProjectsResult listProjects(ListProjectsRequest listProjectsRequest)

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

Specified by:
  `listProjects` in interface `AWSCodeBuild`
Parameters:
  `listProjectsRequest` -
Returns:
  Result of the ListProjects operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.

#### startBuild

    public StartBuildResult startBuild(StartBuildRequest startBuildRequest)

Starts running a build.

Specified by:
  `startBuild` in interface `AWSCodeBuild`
Parameters:
  `startBuildRequest` -
Returns:
  Result of the StartBuild operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.
  `ResourceNotFoundException` - The specified AWS resource cannot be found.
  `AccountLimitExceededException` - An AWS service limit was exceeded for the calling AWS account.

#### stopBuild

    public StopBuildResult stopBuild(StopBuildRequest stopBuildRequest)

Attempts to stop running a build.

<note>

Completed builds cannot be stopped.

</note>

Specified by:
  `stopBuild` in interface `AWSCodeBuild`
Parameters:
  `stopBuildRequest` -
Returns:
  Result of the StopBuild operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.
  `ResourceNotFoundException` - The specified AWS resource cannot be found.

#### updateProject

    public UpdateProjectResult updateProject(UpdateProjectRequest updateProjectRequest)

Changes the settings of an existing build project.

Specified by:
  `updateProject` in interface `AWSCodeBuild`
Parameters:
  `updateProjectRequest` -
Returns:
  Result of the UpdateProject operation returned by the service.
Throws:
  `InvalidInputException` - The input value that was provided is not valid.
  `ResourceNotFoundException` - The specified AWS resource cannot be found.

#### getCachedResponseMetadata

    public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)

Returns additional metadata for a previously executed successful, request, typically used for debugging issues where a service isn't acting as expected. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.

Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.

Specified by:
  `getCachedResponseMetadata` in interface `AWSCodeBuild`
Parameters:
  `request` - The originally executed request
Returns:
  The response metadata for the specified request, or null if none is available.