CfnProjectProps Struct
Properties for defining a CfnProject.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const cfnProjectProps: codebuild.CfnProjectProps = {
artifacts: {
type: 'type',
// the properties below are optional
artifactIdentifier: 'artifactIdentifier',
encryptionDisabled: false,
location: 'location',
name: 'name',
namespaceType: 'namespaceType',
overrideArtifactName: false,
packaging: 'packaging',
path: 'path',
},
environment: {
computeType: 'computeType',
image: 'image',
type: 'type',
// the properties below are optional
certificate: 'certificate',
dockerServer: {
computeType: 'computeType',
// the properties below are optional
securityGroupIds: ['securityGroupIds'],
},
environmentVariables: [{
name: 'name',
value: 'value',
// the properties below are optional
type: 'type',
}],
fleet: {
fleetArn: 'fleetArn',
},
hostKernel: 'hostKernel',
imagePullCredentialsType: 'imagePullCredentialsType',
privilegedMode: false,
registryCredential: {
credential: 'credential',
credentialProvider: 'credentialProvider',
},
},
serviceRole: 'serviceRole',
source: {
type: 'type',
// the properties below are optional
auth: {
type: 'type',
// the properties below are optional
resource: 'resource',
},
buildSpec: 'buildSpec',
buildStatusConfig: {
context: 'context',
targetUrl: 'targetUrl',
},
gitCloneDepth: 123,
gitSubmodulesConfig: {
fetchSubmodules: false,
},
insecureSsl: false,
location: 'location',
reportBuildStatus: false,
sourceIdentifier: 'sourceIdentifier',
},
// the properties below are optional
autoRetryLimit: 123,
badgeEnabled: false,
buildBatchConfig: {
batchReportMode: 'batchReportMode',
combineArtifacts: false,
restrictions: {
computeTypesAllowed: ['computeTypesAllowed'],
maximumBuildsAllowed: 123,
},
serviceRole: 'serviceRole',
timeoutInMins: 123,
},
cache: {
type: 'type',
// the properties below are optional
cacheNamespace: 'cacheNamespace',
location: 'location',
modes: ['modes'],
},
concurrentBuildLimit: 123,
description: 'description',
encryptionKey: 'encryptionKey',
fileSystemLocations: [{
identifier: 'identifier',
location: 'location',
mountPoint: 'mountPoint',
type: 'type',
// the properties below are optional
mountOptions: 'mountOptions',
}],
logsConfig: {
cloudWatchLogs: {
status: 'status',
// the properties below are optional
groupName: 'groupName',
streamName: 'streamName',
},
s3Logs: {
status: 'status',
// the properties below are optional
encryptionDisabled: false,
location: 'location',
},
},
name: 'name',
queuedTimeoutInMinutes: 123,
resourceAccessRole: 'resourceAccessRole',
secondaryArtifacts: [{
type: 'type',
// the properties below are optional
artifactIdentifier: 'artifactIdentifier',
encryptionDisabled: false,
location: 'location',
name: 'name',
namespaceType: 'namespaceType',
overrideArtifactName: false,
packaging: 'packaging',
path: 'path',
}],
secondarySources: [{
type: 'type',
// the properties below are optional
auth: {
type: 'type',
// the properties below are optional
resource: 'resource',
},
buildSpec: 'buildSpec',
buildStatusConfig: {
context: 'context',
targetUrl: 'targetUrl',
},
gitCloneDepth: 123,
gitSubmodulesConfig: {
fetchSubmodules: false,
},
insecureSsl: false,
location: 'location',
reportBuildStatus: false,
sourceIdentifier: 'sourceIdentifier',
}],
secondarySourceVersions: [{
sourceIdentifier: 'sourceIdentifier',
// the properties below are optional
sourceVersion: 'sourceVersion',
}],
sourceVersion: 'sourceVersion',
tags: [{
key: 'key',
value: 'value',
}],
timeoutInMinutes: 123,
triggers: {
buildType: 'buildType',
filterGroups: [[{
pattern: 'pattern',
type: 'type',
// the properties below are optional
excludeMatchedPattern: false,
}]],
pullRequestBuildPolicy: {
requiresCommentApproval: 'requiresCommentApproval',
// the properties below are optional
approverRoles: ['approverRoles'],
},
scopeConfiguration: {
name: 'name',
// the properties below are optional
domain: 'domain',
scope: 'scope',
},
webhook: false,
},
visibility: 'visibility',
vpcConfig: {
securityGroupIds: ['securityGroupIds'],
subnets: ['subnets'],
vpcId: 'vpcId',
},
};
Properties
artifactsIResolvable | CfnProject.ArtifactsPropertyartifactstyping.Union[IResolvable, ArtifactsProperty]artifactsIResolvableArtifactsIResolvableArtifactsinterface{}required#autoRetryLimitnumberauto_retry_limitint | floatautoRetryLimitNumberAutoRetryLimitdoubleAutoRetryLimit*float64#badgeEnabledboolean | IResolvablebadge_enabledtyping.Union[bool, IResolvable]badgeEnabledBooleanBadgeEnabledboolBadgeEnabledinterface{}#notes
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
CODEPIPELINEfor theSourceproperty, do not specify theBadgeEnabledproperty.
buildBatchConfigIResolvable | CfnProject.ProjectBuildBatchConfigPropertybuild_batch_configtyping.Union[IResolvable, ProjectBuildBatchConfigProperty]buildBatchConfigIResolvableBuildBatchConfigIResolvableBuildBatchConfiginterface{}#cacheIResolvable | CfnProject.ProjectCachePropertycachetyping.Union[IResolvable, ProjectCacheProperty]cacheIResolvableCacheIResolvableCacheinterface{}#concurrentBuildLimitnumberconcurrent_build_limitint | floatconcurrentBuildLimitNumberConcurrentBuildLimitdoubleConcurrentBuildLimit*float64#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.
notes
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).
environmentIResolvable | CfnProject.EnvironmentPropertyenvironmenttyping.Union[IResolvable, EnvironmentProperty]environmentIResolvableEnvironmentIResolvableEnvironmentinterface{}required#fileSystemLocationsIResolvable | IResolvable | CfnProject.ProjectFileSystemLocationProperty[]file_system_locationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectFileSystemLocationProperty]]]fileSystemLocationsIResolvableFileSystemLocationsIResolvableFileSystemLocationsinterface{}#A ProjectFileSystemLocation object specifies the identifier , location , mountOptions , mountPoint , and type of a file system created using Amazon Elastic File System.
logsConfigIResolvable | CfnProject.LogsConfigPropertylogs_configtyping.Union[IResolvable, LogsConfigProperty]logsConfigIResolvableLogsConfigIResolvableLogsConfiginterface{}#A project can create logs in CloudWatch Logs, an S3 bucket, or both.
The name must be unique across all of the projects in your AWS account .
queuedTimeoutInMinutesnumberqueued_timeout_in_minutesint | floatqueuedTimeoutInMinutesNumberQueuedTimeoutInMinutesdoubleQueuedTimeoutInMinutes*float64#resourceAccessRolestringresource_access_rolestrresourceAccessRoleStringResourceAccessRolestringResourceAccessRole*string#secondaryArtifactsIResolvable | IResolvable | CfnProject.ArtifactsProperty[]secondary_artifactstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ArtifactsProperty]]]secondaryArtifactsIResolvableSecondaryArtifactsIResolvableSecondaryArtifactsinterface{}#Each artifacts object specifies output settings that the project generates during a build.
secondarySourcesIResolvable | IResolvable | CfnProject.SourceProperty[]secondary_sourcestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SourceProperty]]]secondarySourcesIResolvableSecondarySourcesIResolvableSecondarySourcesinterface{}#secondarySourceVersionsIResolvable | IResolvable | CfnProject.ProjectSourceVersionProperty[]secondary_source_versionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectSourceVersionProperty]]]secondarySourceVersionsIResolvableSecondarySourceVersionsIResolvableSecondarySourceVersionsinterface{}#If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).
sourceIResolvable | CfnProject.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}required#notes
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 examplepr/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 GitLab: the commit ID, branch, or Git tag to use.
- 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 .
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
timeoutInMinutesnumbertimeout_in_minutesint | floattimeoutInMinutesNumberTimeoutInMinutesdoubleTimeoutInMinutes*float64#The default is 60 minutes.
triggersIResolvable | CfnProject.ProjectTriggersPropertytriggerstyping.Union[IResolvable, ProjectTriggersProperty]triggersIResolvableTriggersIResolvableTriggersinterface{}#- PUBLIC_READ - The project builds are visible to the public.
- PRIVATE - The project builds are not visible to the public.
vpcConfigIResolvable | CfnProject.VpcConfigPropertyvpc_configtyping.Union[IResolvable, VpcConfigProperty]vpcConfigIResolvableVpcConfigIResolvableVpcConfiginterface{}#For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .