@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSCodeBuildClient extends AmazonWebServiceClient implements AWSCodeBuild
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 Apache 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:
BatchDeleteBuilds
: Deletes one or more builds.
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.
CreateWebhook
: For an existing AWS CodeBuild build project that has its source code stored in a GitHub
repository, enables AWS CodeBuild to begin automatically rebuilding the source code every time a code change is
pushed to the repository.
DeleteProject
: Deletes a build project.
DeleteWebhook
: For an existing AWS CodeBuild build project that has its source code stored in a GitHub
repository, stops AWS CodeBuild from automatically rebuilding the source code every time a code change is pushed to
the repository.
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.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSCodeBuildClient()
Deprecated.
|
AWSCodeBuildClient(AWSCredentials awsCredentials)
Deprecated.
use
AwsClientBuilder.withCredentials(AWSCredentialsProvider) for example:
AWSCodeBuildClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build(); |
AWSCodeBuildClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
|
AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
|
AWSCodeBuildClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
BatchDeleteBuildsResult |
batchDeleteBuilds(BatchDeleteBuildsRequest request)
Deletes one or more builds.
|
BatchGetBuildsResult |
batchGetBuilds(BatchGetBuildsRequest request)
Gets information about builds.
|
BatchGetProjectsResult |
batchGetProjects(BatchGetProjectsRequest request)
Gets information about build projects.
|
static AWSCodeBuildClientBuilder |
builder() |
CreateProjectResult |
createProject(CreateProjectRequest request)
Creates a build project.
|
CreateWebhookResult |
createWebhook(CreateWebhookRequest request)
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS
CodeBuild to begin automatically rebuilding the source code every time a code change is pushed to the repository.
|
DeleteProjectResult |
deleteProject(DeleteProjectRequest request)
Deletes a build project.
|
DeleteWebhookResult |
deleteWebhook(DeleteWebhookRequest request)
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, stops AWS
CodeBuild from automatically rebuilding the source code every time a code change is pushed to the repository.
|
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 request)
Gets a list of build IDs, with each build ID representing a single build.
|
ListBuildsForProjectResult |
listBuildsForProject(ListBuildsForProjectRequest request)
Gets a list of build IDs for the specified build project, with each build ID representing a single build.
|
ListCuratedEnvironmentImagesResult |
listCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest request)
Gets information about Docker images that are managed by AWS CodeBuild.
|
ListProjectsResult |
listProjects(ListProjectsRequest request)
Gets a list of build project names, with each build project name representing a single build project.
|
StartBuildResult |
startBuild(StartBuildRequest request)
Starts running a build.
|
StopBuildResult |
stopBuild(StopBuildRequest request)
Attempts to stop running a build.
|
UpdateProjectResult |
updateProject(UpdateProjectRequest request)
Changes the settings of a build project.
|
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
@Deprecated public AWSCodeBuildClient()
AWSCodeBuildClientBuilder.defaultClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AWSCodeBuildClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this client connects to AWS CodeBuild (ex: proxy
settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
@Deprecated public AWSCodeBuildClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
for example:
AWSCodeBuildClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.@Deprecated public AWSCodeBuildClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
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.).@Deprecated public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.@Deprecated public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
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.).@Deprecated public AWSCodeBuildClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsClientBuilder.withMetricsCollector(RequestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
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 collectorpublic static AWSCodeBuildClientBuilder builder()
public BatchDeleteBuildsResult batchDeleteBuilds(BatchDeleteBuildsRequest request)
Deletes one or more builds.
batchDeleteBuilds
in interface AWSCodeBuild
batchDeleteBuildsRequest
- InvalidInputException
- The input value that was provided is not valid.public BatchGetBuildsResult batchGetBuilds(BatchGetBuildsRequest request)
Gets information about builds.
batchGetBuilds
in interface AWSCodeBuild
batchGetBuildsRequest
- InvalidInputException
- The input value that was provided is not valid.public BatchGetProjectsResult batchGetProjects(BatchGetProjectsRequest request)
Gets information about build projects.
batchGetProjects
in interface AWSCodeBuild
batchGetProjectsRequest
- InvalidInputException
- The input value that was provided is not valid.public CreateProjectResult createProject(CreateProjectRequest request)
Creates a build project.
createProject
in interface AWSCodeBuild
createProjectRequest
- 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.public CreateWebhookResult createWebhook(CreateWebhookRequest request)
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS CodeBuild to begin automatically 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 will be created for each commit. One build is triggered through webhooks, and one through AWS CodePipeline. Because billing is on a per-build basis, you will be billed for both builds. Therefore, if you are using AWS CodePipeline, we recommend that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear the Webhook box. For more information, see step 9 in Change a Build Project’s Settings.
createWebhook
in interface AWSCodeBuild
createWebhookRequest
- InvalidInputException
- The input value that was provided is not valid.OAuthProviderException
- There was a problem with the underlying OAuth provider.ResourceAlreadyExistsException
- The specified AWS resource cannot be created, because an AWS resource with the same settings already
exists.ResourceNotFoundException
- The specified AWS resource cannot be found.public DeleteProjectResult deleteProject(DeleteProjectRequest request)
Deletes a build project.
deleteProject
in interface AWSCodeBuild
deleteProjectRequest
- InvalidInputException
- The input value that was provided is not valid.public DeleteWebhookResult deleteWebhook(DeleteWebhookRequest request)
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, stops AWS CodeBuild from automatically rebuilding the source code every time a code change is pushed to the repository.
deleteWebhook
in interface AWSCodeBuild
deleteWebhookRequest
- InvalidInputException
- The input value that was provided is not valid.ResourceNotFoundException
- The specified AWS resource cannot be found.OAuthProviderException
- There was a problem with the underlying OAuth provider.public ListBuildsResult listBuilds(ListBuildsRequest request)
Gets a list of build IDs, with each build ID representing a single build.
listBuilds
in interface AWSCodeBuild
listBuildsRequest
- InvalidInputException
- The input value that was provided is not valid.public ListBuildsForProjectResult listBuildsForProject(ListBuildsForProjectRequest request)
Gets a list of build IDs for the specified build project, with each build ID representing a single build.
listBuildsForProject
in interface AWSCodeBuild
listBuildsForProjectRequest
- InvalidInputException
- The input value that was provided is not valid.ResourceNotFoundException
- The specified AWS resource cannot be found.public ListCuratedEnvironmentImagesResult listCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest request)
Gets information about Docker images that are managed by AWS CodeBuild.
listCuratedEnvironmentImages
in interface AWSCodeBuild
listCuratedEnvironmentImagesRequest
- public ListProjectsResult listProjects(ListProjectsRequest request)
Gets a list of build project names, with each build project name representing a single build project.
listProjects
in interface AWSCodeBuild
listProjectsRequest
- InvalidInputException
- The input value that was provided is not valid.public StartBuildResult startBuild(StartBuildRequest request)
Starts running a build.
startBuild
in interface AWSCodeBuild
startBuildRequest
- 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.public StopBuildResult stopBuild(StopBuildRequest request)
Attempts to stop running a build.
stopBuild
in interface AWSCodeBuild
stopBuildRequest
- InvalidInputException
- The input value that was provided is not valid.ResourceNotFoundException
- The specified AWS resource cannot be found.public UpdateProjectResult updateProject(UpdateProjectRequest request)
Changes the settings of a build project.
updateProject
in interface AWSCodeBuild
updateProjectRequest
- InvalidInputException
- The input value that was provided is not valid.ResourceNotFoundException
- The specified AWS resource cannot be found.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
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.
getCachedResponseMetadata
in interface AWSCodeBuild
request
- The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.