@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. 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 runs 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 is a
representation of operating system, programming language runtime, and tools that AWS CodeBuild uses to run a build.
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
or Bitbucket repository, enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed
to the repository.
UpdateWebhook: Changes the settings of an existing webhook.
DeleteProject: Deletes a build project.
DeleteWebhook: 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.
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.
DeleteSourceCredentials: Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
ImportSourceCredentials: Imports the source repository credentials for an AWS CodeBuild project that has
its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
ListSourceCredentials: Returns a list of SourceCredentialsInfo objects. Each
SourceCredentialsInfo object includes the authentication type, token ARN, and type of source provider
for one set of credentials.
LOGGING_AWS_REQUEST_METRICENDPOINT_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 or Bitbucket repository,
enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.
|
DeleteProjectResult |
deleteProject(DeleteProjectRequest request)
Deletes a build project.
|
DeleteSourceCredentialsResult |
deleteSourceCredentials(DeleteSourceCredentialsRequest request)
Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
|
DeleteWebhookResult |
deleteWebhook(DeleteWebhookRequest request)
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.
|
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.
|
ImportSourceCredentialsResult |
importSourceCredentials(ImportSourceCredentialsRequest request)
Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a
GitHub, GitHub Enterprise, or Bitbucket repository.
|
InvalidateProjectCacheResult |
invalidateProjectCache(InvalidateProjectCacheRequest request)
Resets the cache for a project.
|
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.
|
ListSourceCredentialsResult |
listSourceCredentials(ListSourceCredentialsRequest request)
Returns a list of
SourceCredentialsInfo objects. |
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.
|
UpdateWebhookResult |
updateWebhook(UpdateWebhookRequest request)
Updates the webhook associated with an AWS CodeBuild build project.
|
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffsetequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetEndpoint, 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 AWSCodeBuildbatchDeleteBuildsRequest - InvalidInputException - The input value that was provided is not valid.public BatchGetBuildsResult batchGetBuilds(BatchGetBuildsRequest request)
Gets information about builds.
batchGetBuilds in interface AWSCodeBuildbatchGetBuildsRequest - InvalidInputException - The input value that was provided is not valid.AWSCodeBuild client = AWSCodeBuildClientBuilder.standard().build();
BatchGetBuildsRequest request = new BatchGetBuildsRequest().withIds("codebuild-demo-project:9b0ac37f-d19e-4254-9079-f47e9a389eEX",
"codebuild-demo-project:b79a46f7-1473-4636-a23f-da9c45c208EX");
BatchGetBuildsResult response = client.batchGetBuilds(request);public BatchGetProjectsResult batchGetProjects(BatchGetProjectsRequest request)
Gets information about build projects.
batchGetProjects in interface AWSCodeBuildbatchGetProjectsRequest - InvalidInputException - The input value that was provided is not valid.public CreateProjectResult createProject(CreateProjectRequest request)
Creates a build project.
createProject in interface AWSCodeBuildcreateProjectRequest - 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 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.
createWebhook in interface AWSCodeBuildcreateWebhookRequest - 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 AWSCodeBuilddeleteProjectRequest - InvalidInputException - The input value that was provided is not valid.public DeleteSourceCredentialsResult deleteSourceCredentials(DeleteSourceCredentialsRequest request)
Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.
deleteSourceCredentials in interface AWSCodeBuilddeleteSourceCredentialsRequest - InvalidInputException - The input value that was provided is not valid.ResourceNotFoundException - The specified AWS resource cannot be found.public DeleteWebhookResult deleteWebhook(DeleteWebhookRequest request)
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.
deleteWebhook in interface AWSCodeBuilddeleteWebhookRequest - 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 ImportSourceCredentialsResult importSourceCredentials(ImportSourceCredentialsRequest request)
Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.
importSourceCredentials in interface AWSCodeBuildimportSourceCredentialsRequest - InvalidInputException - The input value that was provided is not valid.AccountLimitExceededException - An AWS service limit was exceeded for the calling AWS account.ResourceAlreadyExistsException - The specified AWS resource cannot be created, because an AWS resource with the same settings already
exists.public InvalidateProjectCacheResult invalidateProjectCache(InvalidateProjectCacheRequest request)
Resets the cache for a project.
invalidateProjectCache in interface AWSCodeBuildinvalidateProjectCacheRequest - InvalidInputException - The input value that was provided is not valid.ResourceNotFoundException - The specified AWS resource cannot be found.public ListBuildsResult listBuilds(ListBuildsRequest request)
Gets a list of build IDs, with each build ID representing a single build.
listBuilds in interface AWSCodeBuildlistBuildsRequest - 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 AWSCodeBuildlistBuildsForProjectRequest - 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 AWSCodeBuildlistCuratedEnvironmentImagesRequest - 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 AWSCodeBuildlistProjectsRequest - InvalidInputException - The input value that was provided is not valid.public ListSourceCredentialsResult listSourceCredentials(ListSourceCredentialsRequest request)
Returns a list of SourceCredentialsInfo objects.
listSourceCredentials in interface AWSCodeBuildlistSourceCredentialsRequest - public StartBuildResult startBuild(StartBuildRequest request)
Starts running a build.
startBuild in interface AWSCodeBuildstartBuildRequest - 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 AWSCodeBuildstopBuildRequest - 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 AWSCodeBuildupdateProjectRequest - InvalidInputException - The input value that was provided is not valid.ResourceNotFoundException - The specified AWS resource cannot be found.public UpdateWebhookResult updateWebhook(UpdateWebhookRequest request)
Updates the webhook associated with an AWS CodeBuild build project.
If you use Bitbucket for your repository, rotateSecret is ignored.
updateWebhook in interface AWSCodeBuildupdateWebhookRequest - 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 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 AWSCodeBuildrequest - The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.