AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Interface for accessing CodeBuild

CodeBuild

CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. 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 CodeBuild to use your own build tools. CodeBuild scales automatically to meet peak build requests. You pay only for the build time you consume. For more information about CodeBuild, see the CodeBuild User Guide.

Inheritance Hierarchy

Amazon.CodeBuild.IAmazonCodeBuild

Namespace: Amazon.CodeBuild
Assembly: AWSSDK.CodeBuild.dll
Version: 3.x.y.z

Syntax

C#
public interface IAmazonCodeBuild
         IAmazonService, IDisposable

The IAmazonCodeBuild type exposes the following members

Properties

NameTypeDescription
Public Property Paginators Amazon.CodeBuild.Model.ICodeBuildPaginatorFactory

Paginators for the service

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method BatchDeleteBuilds(BatchDeleteBuildsRequest)

Deletes one or more builds.

Public Method BatchDeleteBuildsAsync(BatchDeleteBuildsRequest, CancellationToken)

Deletes one or more builds.

Public Method BatchGetBuildBatches(BatchGetBuildBatchesRequest)

Retrieves information about one or more batch builds.

Public Method BatchGetBuildBatchesAsync(BatchGetBuildBatchesRequest, CancellationToken)

Retrieves information about one or more batch builds.

Public Method BatchGetBuilds(BatchGetBuildsRequest)

Gets information about one or more builds.

Public Method BatchGetBuildsAsync(BatchGetBuildsRequest, CancellationToken)

Gets information about one or more builds.

Public Method BatchGetFleets(BatchGetFleetsRequest)

Gets information about one or more compute fleets.

Public Method BatchGetFleetsAsync(BatchGetFleetsRequest, CancellationToken)

Gets information about one or more compute fleets.

Public Method BatchGetProjects(BatchGetProjectsRequest)

Gets information about one or more build projects.

Public Method BatchGetProjectsAsync(BatchGetProjectsRequest, CancellationToken)

Gets information about one or more build projects.

Public Method BatchGetReportGroups(BatchGetReportGroupsRequest)

Returns an array of report groups.

Public Method BatchGetReportGroupsAsync(BatchGetReportGroupsRequest, CancellationToken)

Returns an array of report groups.

Public Method BatchGetReports(BatchGetReportsRequest)

Returns an array of reports.

Public Method BatchGetReportsAsync(BatchGetReportsRequest, CancellationToken)

Returns an array of reports.

Public Method CreateFleet(CreateFleetRequest)

Creates a compute fleet.

Public Method CreateFleetAsync(CreateFleetRequest, CancellationToken)

Creates a compute fleet.

Public Method CreateProject(CreateProjectRequest)

Creates a build project.

Public Method CreateProjectAsync(CreateProjectRequest, CancellationToken)

Creates a build project.

Public Method CreateReportGroup(CreateReportGroupRequest)

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

Public Method CreateReportGroupAsync(CreateReportGroupRequest, CancellationToken)

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

Public Method CreateWebhook(CreateWebhookRequest)

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

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

Public Method CreateWebhookAsync(CreateWebhookRequest, CancellationToken)

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

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

Public Method DeleteBuildBatch(DeleteBuildBatchRequest)

Deletes a batch build.

Public Method DeleteBuildBatchAsync(DeleteBuildBatchRequest, CancellationToken)

Deletes a batch build.

Public Method DeleteFleet(DeleteFleetRequest)

Deletes a compute fleet. When you delete a compute fleet, its builds are not deleted.

Public Method DeleteFleetAsync(DeleteFleetRequest, CancellationToken)

Deletes a compute fleet. When you delete a compute fleet, its builds are not deleted.

Public Method DeleteProject(DeleteProjectRequest)

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

Public Method DeleteProjectAsync(DeleteProjectRequest, CancellationToken)

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

Public Method DeleteReport(DeleteReportRequest)

Deletes a report.

Public Method DeleteReportAsync(DeleteReportRequest, CancellationToken)

Deletes a report.

Public Method DeleteReportGroup(DeleteReportGroupRequest)

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

Public Method DeleteReportGroupAsync(DeleteReportGroupRequest, CancellationToken)

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

Public Method DeleteResourcePolicy(DeleteResourcePolicyRequest)

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

Public Method DeleteResourcePolicyAsync(DeleteResourcePolicyRequest, CancellationToken)

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

Public Method DeleteSourceCredentials(DeleteSourceCredentialsRequest)

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

Public Method DeleteSourceCredentialsAsync(DeleteSourceCredentialsRequest, CancellationToken)

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

Public Method DeleteWebhook(DeleteWebhookRequest)

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

Public Method DeleteWebhookAsync(DeleteWebhookRequest, CancellationToken)

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

Public Method DescribeCodeCoverages(DescribeCodeCoveragesRequest)

Retrieves one or more code coverage reports.

Public Method DescribeCodeCoveragesAsync(DescribeCodeCoveragesRequest, CancellationToken)

Retrieves one or more code coverage reports.

Public Method DescribeTestCases(DescribeTestCasesRequest)

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

Public Method DescribeTestCasesAsync(DescribeTestCasesRequest, CancellationToken)

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

Public Method DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

Returns the endpoint that will be used for a particular request.

Public Method GetReportGroupTrend(GetReportGroupTrendRequest)

Analyzes and accumulates test report values for the specified test reports.

Public Method GetReportGroupTrendAsync(GetReportGroupTrendRequest, CancellationToken)

Analyzes and accumulates test report values for the specified test reports.

Public Method GetResourcePolicy(GetResourcePolicyRequest)

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

Public Method GetResourcePolicyAsync(GetResourcePolicyRequest, CancellationToken)

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

Public Method ImportSourceCredentials(ImportSourceCredentialsRequest)

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

Public Method ImportSourceCredentialsAsync(ImportSourceCredentialsRequest, CancellationToken)

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

Public Method InvalidateProjectCache(InvalidateProjectCacheRequest)

Resets the cache for a project.

Public Method InvalidateProjectCacheAsync(InvalidateProjectCacheRequest, CancellationToken)

Resets the cache for a project.

Public Method ListBuildBatches(ListBuildBatchesRequest)

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

Public Method ListBuildBatchesAsync(ListBuildBatchesRequest, CancellationToken)

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

Public Method ListBuildBatchesForProject(ListBuildBatchesForProjectRequest)

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

Public Method ListBuildBatchesForProjectAsync(ListBuildBatchesForProjectRequest, CancellationToken)

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

Public Method ListBuilds(ListBuildsRequest)

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

Public Method ListBuildsAsync(ListBuildsRequest, CancellationToken)

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

Public Method ListBuildsForProject(ListBuildsForProjectRequest)

Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.

Public Method ListBuildsForProjectAsync(ListBuildsForProjectRequest, CancellationToken)

Gets a list of build identifiers for the specified build project, with each build identifier representing a single build.

Public Method ListCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest)

Gets information about Docker images that are managed by CodeBuild.

Public Method ListCuratedEnvironmentImagesAsync(ListCuratedEnvironmentImagesRequest, CancellationToken)

Gets information about Docker images that are managed by CodeBuild.

Public Method ListFleets(ListFleetsRequest)

Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.

Public Method ListFleetsAsync(ListFleetsRequest, CancellationToken)

Gets a list of compute fleet names with each compute fleet name representing a single compute fleet.

Public Method ListProjects(ListProjectsRequest)

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

Public Method ListProjectsAsync(ListProjectsRequest, CancellationToken)

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

Public Method ListReportGroups(ListReportGroupsRequest)

Gets a list ARNs for the report groups in the current Amazon Web Services account.

Public Method ListReportGroupsAsync(ListReportGroupsRequest, CancellationToken)

Gets a list ARNs for the report groups in the current Amazon Web Services account.

Public Method ListReports(ListReportsRequest)

Returns a list of ARNs for the reports in the current Amazon Web Services account.

Public Method ListReportsAsync(ListReportsRequest, CancellationToken)

Returns a list of ARNs for the reports in the current Amazon Web Services account.

Public Method ListReportsForReportGroup(ListReportsForReportGroupRequest)

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

Public Method ListReportsForReportGroupAsync(ListReportsForReportGroupRequest, CancellationToken)

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

Public Method ListSharedProjects(ListSharedProjectsRequest)

Gets a list of projects that are shared with other Amazon Web Services accounts or users.

Public Method ListSharedProjectsAsync(ListSharedProjectsRequest, CancellationToken)

Gets a list of projects that are shared with other Amazon Web Services accounts or users.

Public Method ListSharedReportGroups(ListSharedReportGroupsRequest)

Gets a list of report groups that are shared with other Amazon Web Services accounts or users.

Public Method ListSharedReportGroupsAsync(ListSharedReportGroupsRequest, CancellationToken)

Gets a list of report groups that are shared with other Amazon Web Services accounts or users.

Public Method ListSourceCredentials(ListSourceCredentialsRequest)

Returns a list of SourceCredentialsInfo objects.

Public Method ListSourceCredentialsAsync(ListSourceCredentialsRequest, CancellationToken)

Returns a list of SourceCredentialsInfo objects.

Public Method PutResourcePolicy(PutResourcePolicyRequest)

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

Public Method PutResourcePolicyAsync(PutResourcePolicyRequest, CancellationToken)

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

Public Method RetryBuild(RetryBuildRequest)

Restarts a build.

Public Method RetryBuildAsync(RetryBuildRequest, CancellationToken)

Restarts a build.

Public Method RetryBuildBatch(RetryBuildBatchRequest)

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

Public Method RetryBuildBatchAsync(RetryBuildBatchRequest, CancellationToken)

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

Public Method StartBuild(StartBuildRequest)

Starts running a build with the settings defined in the project. These setting include: how to run a build, where to get the source code, which build environment to use, which build commands to run, and where to store the build output.

You can also start a build run by overriding some of the build settings in the project. The overrides only apply for that specific start build request. The settings in the project are unaltered.

Public Method StartBuildAsync(StartBuildRequest, CancellationToken)

Starts running a build with the settings defined in the project. These setting include: how to run a build, where to get the source code, which build environment to use, which build commands to run, and where to store the build output.

You can also start a build run by overriding some of the build settings in the project. The overrides only apply for that specific start build request. The settings in the project are unaltered.

Public Method StartBuildBatch(StartBuildBatchRequest)

Starts a batch build for a project.

Public Method StartBuildBatchAsync(StartBuildBatchRequest, CancellationToken)

Starts a batch build for a project.

Public Method StopBuild(StopBuildRequest)

Attempts to stop running a build.

Public Method StopBuildAsync(StopBuildRequest, CancellationToken)

Attempts to stop running a build.

Public Method StopBuildBatch(StopBuildBatchRequest)

Stops a running batch build.

Public Method StopBuildBatchAsync(StopBuildBatchRequest, CancellationToken)

Stops a running batch build.

Public Method UpdateFleet(UpdateFleetRequest)

Updates a compute fleet.

Public Method UpdateFleetAsync(UpdateFleetRequest, CancellationToken)

Updates a compute fleet.

Public Method UpdateProject(UpdateProjectRequest)

Changes the settings of a build project.

Public Method UpdateProjectAsync(UpdateProjectRequest, CancellationToken)

Changes the settings of a build project.

Public Method UpdateProjectVisibility(UpdateProjectVisibilityRequest)

Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the general public. For more information, see Public build projects in the CodeBuild User Guide.

The following should be kept in mind when making your projects public:

  • All of a project's build results, logs, and artifacts, including builds that were run when the project was private, are available to the general public.

  • All build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs. Some best practice are:

    • Do not store sensitive values in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to store sensitive values.

    • Follow Best practices for using webhooks in the CodeBuild User Guide to limit which entities can trigger a build, and do not store the buildspec in the project itself, to ensure that your webhooks are as secure as possible.

  • A malicious user can use public builds to distribute malicious artifacts. We recommend that you review all pull requests to verify that the pull request is a legitimate change. We also recommend that you validate any artifacts with their checksums to make sure that the correct artifacts are being downloaded.

Public Method UpdateProjectVisibilityAsync(UpdateProjectVisibilityRequest, CancellationToken)

Changes the public visibility for a project. The project's build results, logs, and artifacts are available to the general public. For more information, see Public build projects in the CodeBuild User Guide.

The following should be kept in mind when making your projects public:

  • All of a project's build results, logs, and artifacts, including builds that were run when the project was private, are available to the general public.

  • All build logs and artifacts are available to the public. Environment variables, source code, and other sensitive information may have been output to the build logs and artifacts. You must be careful about what information is output to the build logs. Some best practice are:

    • Do not store sensitive values in environment variables. We recommend that you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to store sensitive values.

    • Follow Best practices for using webhooks in the CodeBuild User Guide to limit which entities can trigger a build, and do not store the buildspec in the project itself, to ensure that your webhooks are as secure as possible.

  • A malicious user can use public builds to distribute malicious artifacts. We recommend that you review all pull requests to verify that the pull request is a legitimate change. We also recommend that you validate any artifacts with their checksums to make sure that the correct artifacts are being downloaded.

Public Method UpdateReportGroup(UpdateReportGroupRequest)

Updates a report group.

Public Method UpdateReportGroupAsync(UpdateReportGroupRequest, CancellationToken)

Updates a report group.

Public Method UpdateWebhook(UpdateWebhookRequest)

Updates the webhook associated with an CodeBuild build project.

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

Public Method UpdateWebhookAsync(UpdateWebhookRequest, CancellationToken)

Updates the webhook associated with an CodeBuild build project.

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

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5