Class CfnProjectProps.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • artifacts

      @Stability(Stable) public CfnProjectProps.Builder artifacts(IResolvable artifacts)
      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 CfnProjectProps.Builder artifacts(CfnProject.ArtifactsProperty artifacts)
      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 CfnProjectProps.Builder environment(IResolvable 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 CfnProjectProps.Builder environment(CfnProject.EnvironmentProperty 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 CfnProjectProps.Builder serviceRole(String serviceRole)
      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 CfnProjectProps.Builder source(IResolvable source)
      Sets the value of CfnProjectProps.getSource()
      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 CfnProjectProps.Builder source(CfnProject.SourceProperty source)
      Sets the value of CfnProjectProps.getSource()
      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 CfnProjectProps.Builder badgeEnabled(Boolean badgeEnabled)
      Parameters:
      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.

      Returns:
      this
    • badgeEnabled

      @Stability(Stable) public CfnProjectProps.Builder badgeEnabled(IResolvable badgeEnabled)
      Parameters:
      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.

      Returns:
      this
    • buildBatchConfig

      @Stability(Stable) public CfnProjectProps.Builder buildBatchConfig(IResolvable buildBatchConfig)
      Parameters:
      buildBatchConfig - A ProjectBuildBatchConfig object that defines the batch build options for the project.
      Returns:
      this
    • buildBatchConfig

      @Stability(Stable) public CfnProjectProps.Builder buildBatchConfig(CfnProject.ProjectBuildBatchConfigProperty buildBatchConfig)
      Parameters:
      buildBatchConfig - A ProjectBuildBatchConfig object that defines the batch build options for the project.
      Returns:
      this
    • cache

      @Stability(Stable) public CfnProjectProps.Builder cache(IResolvable cache)
      Sets the value of CfnProjectProps.getCache()
      Parameters:
      cache - Settings that AWS CodeBuild uses to store and reuse build dependencies.
      Returns:
      this
    • cache

      @Stability(Stable) public CfnProjectProps.Builder cache(CfnProject.ProjectCacheProperty cache)
      Sets the value of CfnProjectProps.getCache()
      Parameters:
      cache - Settings that AWS CodeBuild uses to store and reuse build dependencies.
      Returns:
      this
    • concurrentBuildLimit

      @Stability(Stable) public CfnProjectProps.Builder concurrentBuildLimit(Number concurrentBuildLimit)
      Parameters:
      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.
      Returns:
      this
    • description

      @Stability(Stable) public CfnProjectProps.Builder description(String description)
      Parameters:
      description - A description that makes the build project easy to identify.
      Returns:
      this
    • encryptionKey

      @Stability(Stable) public CfnProjectProps.Builder encryptionKey(String encryptionKey)
      Parameters:
      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).

      Returns:
      this
    • fileSystemLocations

      @Stability(Stable) public CfnProjectProps.Builder fileSystemLocations(IResolvable fileSystemLocations)
      Parameters:
      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.
      Returns:
      this
    • fileSystemLocations

      @Stability(Stable) public CfnProjectProps.Builder fileSystemLocations(List<? extends Object> fileSystemLocations)
      Parameters:
      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.
      Returns:
      this
    • logsConfig

      @Stability(Stable) public CfnProjectProps.Builder logsConfig(IResolvable logsConfig)
      Parameters:
      logsConfig - Information about logs for the build project. A project can create logs in CloudWatch Logs, an S3 bucket, or both.
      Returns:
      this
    • logsConfig

      @Stability(Stable) public CfnProjectProps.Builder logsConfig(CfnProject.LogsConfigProperty logsConfig)
      Parameters:
      logsConfig - Information about logs for the build project. A project can create logs in CloudWatch Logs, an S3 bucket, or both.
      Returns:
      this
    • name

      @Stability(Stable) public CfnProjectProps.Builder name(String name)
      Sets the value of CfnProjectProps.getName()
      Parameters:
      name - The name of the build project. The name must be unique across all of the projects in your AWS account .
      Returns:
      this
    • queuedTimeoutInMinutes

      @Stability(Stable) public CfnProjectProps.Builder queuedTimeoutInMinutes(Number queuedTimeoutInMinutes)
      Parameters:
      queuedTimeoutInMinutes - The number of minutes a build is allowed to be queued before it times out.
      Returns:
      this
    • resourceAccessRole

      @Stability(Stable) public CfnProjectProps.Builder resourceAccessRole(String resourceAccessRole)
      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.
      Returns:
      this
    • secondaryArtifacts

      @Stability(Stable) public CfnProjectProps.Builder secondaryArtifacts(IResolvable secondaryArtifacts)
      Parameters:
      secondaryArtifacts - A list of Artifacts objects. Each artifacts object specifies output settings that the project generates during a build.
      Returns:
      this
    • secondaryArtifacts

      @Stability(Stable) public CfnProjectProps.Builder secondaryArtifacts(List<? extends Object> secondaryArtifacts)
      Parameters:
      secondaryArtifacts - A list of Artifacts objects. Each artifacts object specifies output settings that the project generates during a build.
      Returns:
      this
    • secondarySources

      @Stability(Stable) public CfnProjectProps.Builder secondarySources(IResolvable secondarySources)
      Parameters:
      secondarySources - An array of ProjectSource objects.
      Returns:
      this
    • secondarySources

      @Stability(Stable) public CfnProjectProps.Builder secondarySources(List<? extends Object> secondarySources)
      Parameters:
      secondarySources - An array of ProjectSource objects.
      Returns:
      this
    • secondarySourceVersions

      @Stability(Stable) public CfnProjectProps.Builder secondarySourceVersions(IResolvable secondarySourceVersions)
      Parameters:
      secondarySourceVersions - An array of ProjectSourceVersion objects. If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).
      Returns:
      this
    • secondarySourceVersions

      @Stability(Stable) public CfnProjectProps.Builder secondarySourceVersions(List<? extends Object> secondarySourceVersions)
      Parameters:
      secondarySourceVersions - An array of ProjectSourceVersion objects. If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).
      Returns:
      this
    • sourceVersion

      @Stability(Stable) public CfnProjectProps.Builder sourceVersion(String sourceVersion)
      Parameters:
      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 .

      Returns:
      this
    • tags

      @Stability(Stable) public CfnProjectProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnProjectProps.getTags()
      Parameters:
      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.
      Returns:
      this
    • timeoutInMinutes

      @Stability(Stable) public CfnProjectProps.Builder timeoutInMinutes(Number timeoutInMinutes)
      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. The default is 60 minutes.
      Returns:
      this
    • triggers

      @Stability(Stable) public CfnProjectProps.Builder triggers(IResolvable triggers)
      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.
      Returns:
      this
    • triggers

      @Stability(Stable) public CfnProjectProps.Builder triggers(CfnProject.ProjectTriggersProperty triggers)
      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.
      Returns:
      this
    • visibility

      @Stability(Stable) public CfnProjectProps.Builder visibility(String visibility)
      Parameters:
      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.
      Returns:
      this
    • vpcConfig

      @Stability(Stable) public CfnProjectProps.Builder vpcConfig(IResolvable vpcConfig)
      Parameters:
      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 .
      Returns:
      this
    • vpcConfig

      @Stability(Stable) public CfnProjectProps.Builder vpcConfig(CfnProject.VpcConfigProperty vpcConfig)
      Parameters:
      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 .
      Returns:
      this
    • build

      @Stability(Stable) public CfnProjectProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnProjectProps>
      Returns:
      a new instance of CfnProjectProps
      Throws:
      NullPointerException - if any required attribute was not provided