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.

Implementation for accessing CodeBuild AWS CodeBuild

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:

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.CodeBuild.AmazonCodeBuildClient

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

Syntax

C#
public class AmazonCodeBuildClient : AmazonServiceClient
         IAmazonCodeBuild, IAmazonService, IDisposable

The AmazonCodeBuildClient type exposes the following members

Constructors

NameDescription
Public Method AmazonCodeBuildClient()

Constructs AmazonCodeBuildClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonCodeBuildClient(RegionEndpoint)

Constructs AmazonCodeBuildClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonCodeBuildClient(AmazonCodeBuildConfig)

Constructs AmazonCodeBuildClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonCodeBuildClient(AWSCredentials)

Constructs AmazonCodeBuildClient with AWS Credentials

Public Method AmazonCodeBuildClient(AWSCredentials, RegionEndpoint)

Constructs AmazonCodeBuildClient with AWS Credentials

Public Method AmazonCodeBuildClient(AWSCredentials, AmazonCodeBuildConfig)

Constructs AmazonCodeBuildClient with AWS Credentials and an AmazonCodeBuildClient Configuration object.

Public Method AmazonCodeBuildClient(string, string)

Constructs AmazonCodeBuildClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonCodeBuildClient(string, string, RegionEndpoint)

Constructs AmazonCodeBuildClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonCodeBuildClient(string, string, AmazonCodeBuildConfig)

Constructs AmazonCodeBuildClient with AWS Access Key ID, AWS Secret Key and an AmazonCodeBuildClient Configuration object.

Public Method AmazonCodeBuildClient(string, string, string)

Constructs AmazonCodeBuildClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonCodeBuildClient(string, string, string, RegionEndpoint)

Constructs AmazonCodeBuildClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonCodeBuildClient(string, string, string, AmazonCodeBuildConfig)

Constructs AmazonCodeBuildClient with AWS Access Key ID, AWS Secret Key and an AmazonCodeBuildClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.

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)

Initiates the asynchronous execution of the BatchDeleteBuilds operation.

Public Method BatchGetBuilds(BatchGetBuildsRequest)

Gets information about builds.

Public Method BatchGetBuildsAsync(BatchGetBuildsRequest, CancellationToken)

Initiates the asynchronous execution of the BatchGetBuilds operation.

Public Method BatchGetProjects(BatchGetProjectsRequest)

Gets information about build projects.

Public Method BatchGetProjectsAsync(BatchGetProjectsRequest, CancellationToken)

Initiates the asynchronous execution of the BatchGetProjects operation.

Public Method CreateProject(CreateProjectRequest)

Creates a build project.

Public Method CreateProjectAsync(CreateProjectRequest, CancellationToken)

Initiates the asynchronous execution of the CreateProject operation.

Public Method CreateWebhook(CreateWebhookRequest)

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.

Public Method CreateWebhookAsync(CreateWebhookRequest, CancellationToken)

Initiates the asynchronous execution of the CreateWebhook operation.

Public Method DeleteProject(DeleteProjectRequest)

Deletes a build project.

Public Method DeleteProjectAsync(DeleteProjectRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteProject operation.

Public Method DeleteWebhook(DeleteWebhookRequest)

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.

Public Method DeleteWebhookAsync(DeleteWebhookRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteWebhook operation.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method ListBuilds(ListBuildsRequest)

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

Public Method ListBuildsAsync(ListBuildsRequest, CancellationToken)

Initiates the asynchronous execution of the ListBuilds operation.

Public Method ListBuildsForProject(ListBuildsForProjectRequest)

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

Public Method ListBuildsForProjectAsync(ListBuildsForProjectRequest, CancellationToken)

Initiates the asynchronous execution of the ListBuildsForProject operation.

Public Method ListCuratedEnvironmentImages(ListCuratedEnvironmentImagesRequest)

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

Public Method ListCuratedEnvironmentImagesAsync(ListCuratedEnvironmentImagesRequest, CancellationToken)

Initiates the asynchronous execution of the ListCuratedEnvironmentImages operation.

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)

Initiates the asynchronous execution of the ListProjects operation.

Public Method StartBuild(StartBuildRequest)

Starts running a build.

Public Method StartBuildAsync(StartBuildRequest, CancellationToken)

Initiates the asynchronous execution of the StartBuild operation.

Public Method StopBuild(StopBuildRequest)

Attempts to stop running a build.

Public Method StopBuildAsync(StopBuildRequest, CancellationToken)

Initiates the asynchronous execution of the StopBuild operation.

Public Method UpdateProject(UpdateProjectRequest)

Changes the settings of a build project.

Public Method UpdateProjectAsync(UpdateProjectRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateProject operation.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms