Class CfnProject

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:48.805Z") @Stability(Stable) public class CfnProject extends CfnResource implements IInspectable, ITaggable
The AWS::CodeBuild::Project resource configures how AWS CodeBuild builds your source code.

For example, it tells CodeBuild where to get the source code and which build environment to use.

To unset or remove a project value via CFN, explicitly provide the attribute with value as empty input.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codebuild.*;
 CfnProject cfnProject = CfnProject.Builder.create(this, "MyCfnProject")
         .artifacts(ArtifactsProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .artifactIdentifier("artifactIdentifier")
                 .encryptionDisabled(false)
                 .location("location")
                 .name("name")
                 .namespaceType("namespaceType")
                 .overrideArtifactName(false)
                 .packaging("packaging")
                 .path("path")
                 .build())
         .environment(EnvironmentProperty.builder()
                 .computeType("computeType")
                 .image("image")
                 .type("type")
                 // the properties below are optional
                 .certificate("certificate")
                 .environmentVariables(List.of(EnvironmentVariableProperty.builder()
                         .name("name")
                         .value("value")
                         // the properties below are optional
                         .type("type")
                         .build()))
                 .fleet(ProjectFleetProperty.builder()
                         .fleetArn("fleetArn")
                         .build())
                 .imagePullCredentialsType("imagePullCredentialsType")
                 .privilegedMode(false)
                 .registryCredential(RegistryCredentialProperty.builder()
                         .credential("credential")
                         .credentialProvider("credentialProvider")
                         .build())
                 .build())
         .serviceRole("serviceRole")
         .source(SourceProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .auth(SourceAuthProperty.builder()
                         .type("type")
                         // the properties below are optional
                         .resource("resource")
                         .build())
                 .buildSpec("buildSpec")
                 .buildStatusConfig(BuildStatusConfigProperty.builder()
                         .context("context")
                         .targetUrl("targetUrl")
                         .build())
                 .gitCloneDepth(123)
                 .gitSubmodulesConfig(GitSubmodulesConfigProperty.builder()
                         .fetchSubmodules(false)
                         .build())
                 .insecureSsl(false)
                 .location("location")
                 .reportBuildStatus(false)
                 .sourceIdentifier("sourceIdentifier")
                 .build())
         // the properties below are optional
         .badgeEnabled(false)
         .buildBatchConfig(ProjectBuildBatchConfigProperty.builder()
                 .batchReportMode("batchReportMode")
                 .combineArtifacts(false)
                 .restrictions(BatchRestrictionsProperty.builder()
                         .computeTypesAllowed(List.of("computeTypesAllowed"))
                         .maximumBuildsAllowed(123)
                         .build())
                 .serviceRole("serviceRole")
                 .timeoutInMins(123)
                 .build())
         .cache(ProjectCacheProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .location("location")
                 .modes(List.of("modes"))
                 .build())
         .concurrentBuildLimit(123)
         .description("description")
         .encryptionKey("encryptionKey")
         .fileSystemLocations(List.of(ProjectFileSystemLocationProperty.builder()
                 .identifier("identifier")
                 .location("location")
                 .mountPoint("mountPoint")
                 .type("type")
                 // the properties below are optional
                 .mountOptions("mountOptions")
                 .build()))
         .logsConfig(LogsConfigProperty.builder()
                 .cloudWatchLogs(CloudWatchLogsConfigProperty.builder()
                         .status("status")
                         // the properties below are optional
                         .groupName("groupName")
                         .streamName("streamName")
                         .build())
                 .s3Logs(S3LogsConfigProperty.builder()
                         .status("status")
                         // the properties below are optional
                         .encryptionDisabled(false)
                         .location("location")
                         .build())
                 .build())
         .name("name")
         .queuedTimeoutInMinutes(123)
         .resourceAccessRole("resourceAccessRole")
         .secondaryArtifacts(List.of(ArtifactsProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .artifactIdentifier("artifactIdentifier")
                 .encryptionDisabled(false)
                 .location("location")
                 .name("name")
                 .namespaceType("namespaceType")
                 .overrideArtifactName(false)
                 .packaging("packaging")
                 .path("path")
                 .build()))
         .secondarySources(List.of(SourceProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .auth(SourceAuthProperty.builder()
                         .type("type")
                         // the properties below are optional
                         .resource("resource")
                         .build())
                 .buildSpec("buildSpec")
                 .buildStatusConfig(BuildStatusConfigProperty.builder()
                         .context("context")
                         .targetUrl("targetUrl")
                         .build())
                 .gitCloneDepth(123)
                 .gitSubmodulesConfig(GitSubmodulesConfigProperty.builder()
                         .fetchSubmodules(false)
                         .build())
                 .insecureSsl(false)
                 .location("location")
                 .reportBuildStatus(false)
                 .sourceIdentifier("sourceIdentifier")
                 .build()))
         .secondarySourceVersions(List.of(ProjectSourceVersionProperty.builder()
                 .sourceIdentifier("sourceIdentifier")
                 // the properties below are optional
                 .sourceVersion("sourceVersion")
                 .build()))
         .sourceVersion("sourceVersion")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timeoutInMinutes(123)
         .triggers(ProjectTriggersProperty.builder()
                 .buildType("buildType")
                 .filterGroups(List.of(List.of(WebhookFilterProperty.builder()
                         .pattern("pattern")
                         .type("type")
                         // the properties below are optional
                         .excludeMatchedPattern(false)
                         .build())))
                 .scopeConfiguration(ScopeConfigurationProperty.builder()
                         .name("name")
                         .build())
                 .webhook(false)
                 .build())
         .visibility("visibility")
         .vpcConfig(VpcConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .vpcId("vpcId")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnProject

      protected CfnProject(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnProject

      protected CfnProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnProject

      @Stability(Stable) public CfnProject(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnProjectProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the AWS CodeBuild project, such as arn:aws:codebuild:us-west-2:123456789012:project/myProjectName .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getArtifacts

      @Stability(Stable) @NotNull public Object getArtifacts()
      Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
    • setArtifacts

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

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

      @Stability(Stable) @NotNull public Object getEnvironment()
      The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
    • setEnvironment

      @Stability(Stable) public void setEnvironment(@NotNull IResolvable value)
      The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
    • setEnvironment

      @Stability(Stable) public void setEnvironment(@NotNull CfnProject.EnvironmentProperty value)
      The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
    • getServiceRole

      @Stability(Stable) @NotNull public String getServiceRole()
      The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
    • setServiceRole

      @Stability(Stable) public void setServiceRole(@NotNull String value)
      The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
    • getSource

      @Stability(Stable) @NotNull public Object getSource()
      The source code settings for the project, such as the source code's repository type and location.
    • setSource

      @Stability(Stable) public void setSource(@NotNull IResolvable value)
      The source code settings for the project, such as the source code's repository type and location.
    • setSource

      @Stability(Stable) public void setSource(@NotNull CfnProject.SourceProperty value)
      The source code settings for the project, such as the source code's repository type and location.
    • getBadgeEnabled

      @Stability(Stable) @Nullable public Object getBadgeEnabled()
      Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
    • setBadgeEnabled

      @Stability(Stable) public void setBadgeEnabled(@Nullable Boolean value)
      Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
    • setBadgeEnabled

      @Stability(Stable) public void setBadgeEnabled(@Nullable IResolvable value)
      Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
    • getBuildBatchConfig

      @Stability(Stable) @Nullable public Object getBuildBatchConfig()
      A ProjectBuildBatchConfig object that defines the batch build options for the project.
    • setBuildBatchConfig

      @Stability(Stable) public void setBuildBatchConfig(@Nullable IResolvable value)
      A ProjectBuildBatchConfig object that defines the batch build options for the project.
    • setBuildBatchConfig

      @Stability(Stable) public void setBuildBatchConfig(@Nullable CfnProject.ProjectBuildBatchConfigProperty value)
      A ProjectBuildBatchConfig object that defines the batch build options for the project.
    • getCache

      @Stability(Stable) @Nullable public Object getCache()
      Settings that AWS CodeBuild uses to store and reuse build dependencies.
    • setCache

      @Stability(Stable) public void setCache(@Nullable IResolvable value)
      Settings that AWS CodeBuild uses to store and reuse build dependencies.
    • setCache

      @Stability(Stable) public void setCache(@Nullable CfnProject.ProjectCacheProperty value)
      Settings that AWS CodeBuild uses to store and reuse build dependencies.
    • getConcurrentBuildLimit

      @Stability(Stable) @Nullable public Number getConcurrentBuildLimit()
      The maximum number of concurrent builds that are allowed for this project.
    • setConcurrentBuildLimit

      @Stability(Stable) public void setConcurrentBuildLimit(@Nullable Number value)
      The maximum number of concurrent builds that are allowed for this project.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description that makes the build project easy to identify.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description that makes the build project easy to identify.
    • getEncryptionKey

      @Stability(Stable) @Nullable public String getEncryptionKey()
      The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
    • setEncryptionKey

      @Stability(Stable) public void setEncryptionKey(@Nullable String value)
      The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
    • getFileSystemLocations

      @Stability(Stable) @Nullable public Object getFileSystemLocations()
      An array of ProjectFileSystemLocation objects for a CodeBuild build project.
    • setFileSystemLocations

      @Stability(Stable) public void setFileSystemLocations(@Nullable IResolvable value)
      An array of ProjectFileSystemLocation objects for a CodeBuild build project.
    • setFileSystemLocations

      @Stability(Stable) public void setFileSystemLocations(@Nullable List<Object> value)
      An array of ProjectFileSystemLocation objects for a CodeBuild build project.
    • getLogsConfig

      @Stability(Stable) @Nullable public Object getLogsConfig()
      Information about logs for the build project.
    • setLogsConfig

      @Stability(Stable) public void setLogsConfig(@Nullable IResolvable value)
      Information about logs for the build project.
    • setLogsConfig

      @Stability(Stable) public void setLogsConfig(@Nullable CfnProject.LogsConfigProperty value)
      Information about logs for the build project.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the build project.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the build project.
    • getQueuedTimeoutInMinutes

      @Stability(Stable) @Nullable public Number getQueuedTimeoutInMinutes()
      The number of minutes a build is allowed to be queued before it times out.
    • setQueuedTimeoutInMinutes

      @Stability(Stable) public void setQueuedTimeoutInMinutes(@Nullable Number value)
      The number of minutes a build is allowed to be queued before it times out.
    • getResourceAccessRole

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

      @Stability(Stable) public void setResourceAccessRole(@Nullable String value)
      The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
    • getSecondaryArtifacts

      @Stability(Stable) @Nullable public Object getSecondaryArtifacts()
      A list of Artifacts objects.
    • setSecondaryArtifacts

      @Stability(Stable) public void setSecondaryArtifacts(@Nullable IResolvable value)
      A list of Artifacts objects.
    • setSecondaryArtifacts

      @Stability(Stable) public void setSecondaryArtifacts(@Nullable List<Object> value)
      A list of Artifacts objects.
    • getSecondarySources

      @Stability(Stable) @Nullable public Object getSecondarySources()
      An array of ProjectSource objects.
    • setSecondarySources

      @Stability(Stable) public void setSecondarySources(@Nullable IResolvable value)
      An array of ProjectSource objects.
    • setSecondarySources

      @Stability(Stable) public void setSecondarySources(@Nullable List<Object> value)
      An array of ProjectSource objects.
    • getSecondarySourceVersions

      @Stability(Stable) @Nullable public Object getSecondarySourceVersions()
      An array of ProjectSourceVersion objects.
    • setSecondarySourceVersions

      @Stability(Stable) public void setSecondarySourceVersions(@Nullable IResolvable value)
      An array of ProjectSourceVersion objects.
    • setSecondarySourceVersions

      @Stability(Stable) public void setSecondarySourceVersions(@Nullable List<Object> value)
      An array of ProjectSourceVersion objects.
    • getSourceVersion

      @Stability(Stable) @Nullable public String getSourceVersion()
      A version of the build input to be built for this project.
    • setSourceVersion

      @Stability(Stable) public void setSourceVersion(@Nullable String value)
      A version of the build input to be built for this project.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
    • getTimeoutInMinutes

      @Stability(Stable) @Nullable public Number getTimeoutInMinutes()
      How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
    • setTimeoutInMinutes

      @Stability(Stable) public void setTimeoutInMinutes(@Nullable Number value)
      How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
    • getTriggers

      @Stability(Stable) @Nullable public Object getTriggers()
      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.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable IResolvable value)
      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.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable CfnProject.ProjectTriggersProperty value)
      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.
    • getVisibility

      @Stability(Stable) @Nullable public String getVisibility()
      Specifies the visibility of the project's builds.

      Possible values are:.

    • setVisibility

      @Stability(Stable) public void setVisibility(@Nullable String value)
      Specifies the visibility of the project's builds.

      Possible values are:.

    • getVpcConfig

      @Stability(Stable) @Nullable public Object getVpcConfig()
      VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable IResolvable value)
      VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
    • setVpcConfig

      @Stability(Stable) public void setVpcConfig(@Nullable CfnProject.VpcConfigProperty value)
      VpcConfig specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.