Class CfnProject.Builder

java.lang.Object
software.amazon.awscdk.services.codebuild.CfnProject.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnProject>
Enclosing class:
CfnProject

@Stability(Stable) public static final class CfnProject.Builder extends Object implements software.amazon.jsii.Builder<CfnProject>
A fluent builder for CfnProject.
  • Method Details

    • create

      @Stability(Stable) public static CfnProject.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnProject.Builder.
    • artifacts

      @Stability(Stable) public CfnProject.Builder artifacts(IResolvable artifacts)
      Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.

      Parameters:
      artifacts - Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build. This parameter is required.
      Returns:
      this
    • artifacts

      @Stability(Stable) public CfnProject.Builder artifacts(CfnProject.ArtifactsProperty artifacts)
      Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.

      Parameters:
      artifacts - Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build. This parameter is required.
      Returns:
      this
    • environment

      @Stability(Stable) public CfnProject.Builder environment(IResolvable environment)
      The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.

      Parameters:
      environment - The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. This parameter is required.
      Returns:
      this
    • environment

      @Stability(Stable) public CfnProject.Builder environment(CfnProject.EnvironmentProperty environment)
      The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.

      Parameters:
      environment - The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. This parameter is required.
      Returns:
      this
    • serviceRole

      @Stability(Stable) public CfnProject.Builder serviceRole(String serviceRole)
      The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

      Parameters:
      serviceRole - The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. This parameter is required.
      Returns:
      this
    • source

      @Stability(Stable) public CfnProject.Builder source(CfnProject.SourceProperty source)
      The source code settings for the project, such as the source code's repository type and location.

      Parameters:
      source - The source code settings for the project, such as the source code's repository type and location. This parameter is required.
      Returns:
      this
    • source

      @Stability(Stable) public CfnProject.Builder source(IResolvable source)
      The source code settings for the project, such as the source code's repository type and location.

      Parameters:
      source - The source code settings for the project, such as the source code's repository type and location. This parameter is required.
      Returns:
      this
    • badgeEnabled

      @Stability(Stable) public CfnProject.Builder badgeEnabled(Boolean badgeEnabled)
      Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.

      For more information, see Build Badges Sample in the AWS CodeBuild User Guide .

      Including build badges with your project is currently not supported if the source type is CodePipeline. If you specify CODEPIPELINE for the Source property, do not specify the BadgeEnabled property.

      Parameters:
      badgeEnabled - Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. This parameter is required.
      Returns:
      this
    • badgeEnabled

      @Stability(Stable) public CfnProject.Builder badgeEnabled(IResolvable badgeEnabled)
      Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.

      For more information, see Build Badges Sample in the AWS CodeBuild User Guide .

      Including build badges with your project is currently not supported if the source type is CodePipeline. If you specify CODEPIPELINE for the Source property, do not specify the BadgeEnabled property.

      Parameters:
      badgeEnabled - Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. This parameter is required.
      Returns:
      this
    • buildBatchConfig

      @Stability(Stable) public CfnProject.Builder buildBatchConfig(IResolvable buildBatchConfig)
      A ProjectBuildBatchConfig object that defines the batch build options for the project.

      Parameters:
      buildBatchConfig - A ProjectBuildBatchConfig object that defines the batch build options for the project. This parameter is required.
      Returns:
      this
    • buildBatchConfig

      @Stability(Stable) public CfnProject.Builder buildBatchConfig(CfnProject.ProjectBuildBatchConfigProperty buildBatchConfig)
      A ProjectBuildBatchConfig object that defines the batch build options for the project.

      Parameters:
      buildBatchConfig - A ProjectBuildBatchConfig object that defines the batch build options for the project. This parameter is required.
      Returns:
      this
    • cache

      @Stability(Stable) public CfnProject.Builder cache(IResolvable cache)
      Settings that AWS CodeBuild uses to store and reuse build dependencies.

      Parameters:
      cache - Settings that AWS CodeBuild uses to store and reuse build dependencies. This parameter is required.
      Returns:
      this
    • cache

      @Stability(Stable) public CfnProject.Builder cache(CfnProject.ProjectCacheProperty cache)
      Settings that AWS CodeBuild uses to store and reuse build dependencies.

      Parameters:
      cache - Settings that AWS CodeBuild uses to store and reuse build dependencies. This parameter is required.
      Returns:
      this
    • concurrentBuildLimit

      @Stability(Stable) public CfnProject.Builder concurrentBuildLimit(Number concurrentBuildLimit)
      The maximum number of concurrent builds that are allowed for this project.

      New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.

      Parameters:
      concurrentBuildLimit - The maximum number of concurrent builds that are allowed for this project. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnProject.Builder description(String description)
      A description that makes the build project easy to identify.

      Parameters:
      description - A description that makes the build project easy to identify. This parameter is required.
      Returns:
      this
    • encryptionKey

      @Stability(Stable) public CfnProject.Builder encryptionKey(String encryptionKey)
      The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.

      You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.

      You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/<alias-name> ). If you don't specify a value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon S3).

      Parameters:
      encryptionKey - The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. This parameter is required.
      Returns:
      this
    • fileSystemLocations

      @Stability(Stable) public CfnProject.Builder fileSystemLocations(IResolvable fileSystemLocations)
      An array of ProjectFileSystemLocation objects for a CodeBuild build project.

      A ProjectFileSystemLocation object specifies the identifier , location , mountOptions , mountPoint , and type of a file system created using Amazon Elastic File System.

      Parameters:
      fileSystemLocations - An array of ProjectFileSystemLocation objects for a CodeBuild build project. This parameter is required.
      Returns:
      this
    • fileSystemLocations

      @Stability(Stable) public CfnProject.Builder fileSystemLocations(List<? extends Object> fileSystemLocations)
      An array of ProjectFileSystemLocation objects for a CodeBuild build project.

      A ProjectFileSystemLocation object specifies the identifier , location , mountOptions , mountPoint , and type of a file system created using Amazon Elastic File System.

      Parameters:
      fileSystemLocations - An array of ProjectFileSystemLocation objects for a CodeBuild build project. This parameter is required.
      Returns:
      this
    • logsConfig

      @Stability(Stable) public CfnProject.Builder logsConfig(IResolvable logsConfig)
      Information about logs for the build project.

      A project can create logs in CloudWatch Logs, an S3 bucket, or both.

      Parameters:
      logsConfig - Information about logs for the build project. This parameter is required.
      Returns:
      this
    • logsConfig

      @Stability(Stable) public CfnProject.Builder logsConfig(CfnProject.LogsConfigProperty logsConfig)
      Information about logs for the build project.

      A project can create logs in CloudWatch Logs, an S3 bucket, or both.

      Parameters:
      logsConfig - Information about logs for the build project. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnProject.Builder name(String name)
      The name of the build project.

      The name must be unique across all of the projects in your AWS account .

      Parameters:
      name - The name of the build project. This parameter is required.
      Returns:
      this
    • queuedTimeoutInMinutes

      @Stability(Stable) public CfnProject.Builder queuedTimeoutInMinutes(Number queuedTimeoutInMinutes)
      The number of minutes a build is allowed to be queued before it times out.

      Parameters:
      queuedTimeoutInMinutes - The number of minutes a build is allowed to be queued before it times out. This parameter is required.
      Returns:
      this
    • resourceAccessRole

      @Stability(Stable) public CfnProject.Builder resourceAccessRole(String resourceAccessRole)
      The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.

      Parameters:
      resourceAccessRole - The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds. This parameter is required.
      Returns:
      this
    • secondaryArtifacts

      @Stability(Stable) public CfnProject.Builder secondaryArtifacts(IResolvable secondaryArtifacts)
      A list of Artifacts objects.

      Each artifacts object specifies output settings that the project generates during a build.

      Parameters:
      secondaryArtifacts - A list of Artifacts objects. This parameter is required.
      Returns:
      this
    • secondaryArtifacts

      @Stability(Stable) public CfnProject.Builder secondaryArtifacts(List<? extends Object> secondaryArtifacts)
      A list of Artifacts objects.

      Each artifacts object specifies output settings that the project generates during a build.

      Parameters:
      secondaryArtifacts - A list of Artifacts objects. This parameter is required.
      Returns:
      this
    • secondarySources

      @Stability(Stable) public CfnProject.Builder secondarySources(IResolvable secondarySources)
      An array of ProjectSource objects.

      Parameters:
      secondarySources - An array of ProjectSource objects. This parameter is required.
      Returns:
      this
    • secondarySources

      @Stability(Stable) public CfnProject.Builder secondarySources(List<? extends Object> secondarySources)
      An array of ProjectSource objects.

      Parameters:
      secondarySources - An array of ProjectSource objects. This parameter is required.
      Returns:
      this
    • secondarySourceVersions

      @Stability(Stable) public CfnProject.Builder secondarySourceVersions(IResolvable secondarySourceVersions)
      An array of ProjectSourceVersion objects.

      If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).

      Parameters:
      secondarySourceVersions - An array of ProjectSourceVersion objects. This parameter is required.
      Returns:
      this
    • secondarySourceVersions

      @Stability(Stable) public CfnProject.Builder secondarySourceVersions(List<? extends Object> secondarySourceVersions)
      An array of ProjectSourceVersion objects.

      If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).

      Parameters:
      secondarySourceVersions - An array of ProjectSourceVersion objects. This parameter is required.
      Returns:
      this
    • sourceVersion

      @Stability(Stable) public CfnProject.Builder sourceVersion(String sourceVersion)
      A version of the build input to be built for this project.

      If not specified, the latest version is used. If specified, it must be one of:

      • For CodeCommit: the commit ID, branch, or Git tag to use.
      • For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25 ). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
      • For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
      • For Amazon S3: the version ID of the object that represents the build input ZIP file to use.

      If sourceVersion is specified at the build level, then that version takes precedence over this sourceVersion (at the project level).

      For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .

      Parameters:
      sourceVersion - A version of the build input to be built for this project. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnProject.Builder tags(List<? extends CfnTag> tags)
      An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.

      These tags are available for use by AWS services that support AWS CodeBuild build project tags.

      Parameters:
      tags - An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project. This parameter is required.
      Returns:
      this
    • timeoutInMinutes

      @Stability(Stable) public CfnProject.Builder timeoutInMinutes(Number timeoutInMinutes)
      How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.

      The default is 60 minutes.

      Parameters:
      timeoutInMinutes - How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. This parameter is required.
      Returns:
      this
    • triggers

      @Stability(Stable) public CfnProject.Builder triggers(CfnProject.ProjectTriggersProperty triggers)
      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.

      Parameters:
      triggers - 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. This parameter is required.
      Returns:
      this
    • triggers

      @Stability(Stable) public CfnProject.Builder triggers(IResolvable triggers)
      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.

      Parameters:
      triggers - 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. This parameter is required.
      Returns:
      this
    • visibility

      @Stability(Stable) public CfnProject.Builder visibility(String visibility)
      Specifies the visibility of the project's builds. Possible values are:.

      • PUBLIC_READ - The project builds are visible to the public.
      • PRIVATE - The project builds are not visible to the public.

      Parameters:
      visibility - Specifies the visibility of the project's builds. Possible values are:. This parameter is required.
      Returns:
      this
    • vpcConfig

      @Stability(Stable) public CfnProject.Builder vpcConfig(IResolvable vpcConfig)
      VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.

      For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .

      Parameters:
      vpcConfig - VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC. This parameter is required.
      Returns:
      this
    • vpcConfig

      @Stability(Stable) public CfnProject.Builder vpcConfig(CfnProject.VpcConfigProperty vpcConfig)
      VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.

      For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .

      Parameters:
      vpcConfig - VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnProject build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnProject>
      Returns:
      a newly built instance of CfnProject.