ProjectProps

class aws_cdk.aws_codebuild.ProjectProps(*, allow_all_outbound=None, badge=None, build_spec=None, cache=None, description=None, encryption_key=None, environment=None, environment_variables=None, file_system_locations=None, grant_report_group_permissions=None, project_name=None, role=None, security_groups=None, subnet_selection=None, timeout=None, vpc=None, artifacts=None, secondary_artifacts=None, secondary_sources=None, source=None)

Bases: aws_cdk.aws_codebuild.CommonProjectProps

__init__(*, allow_all_outbound=None, badge=None, build_spec=None, cache=None, description=None, encryption_key=None, environment=None, environment_variables=None, file_system_locations=None, grant_report_group_permissions=None, project_name=None, role=None, security_groups=None, subnet_selection=None, timeout=None, vpc=None, artifacts=None, secondary_artifacts=None, secondary_sources=None, source=None)
Parameters
  • allow_all_outbound (Optional[bool]) – Whether to allow the CodeBuild to send all network traffic. If set to false, you must individually add traffic rules to allow the CodeBuild project to connect to network targets. Only used if ‘vpc’ is supplied. Default: true

  • badge (Optional[bool]) – 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. Default: false

  • build_spec (Optional[BuildSpec]) – Filename or contents of buildspec in JSON format. Default: - Empty buildspec.

  • cache (Optional[Cache]) – Caching strategy to use. Default: Cache.none

  • description (Optional[str]) – A description of the project. Use the description to identify the purpose of the project. Default: - No description.

  • encryption_key (Optional[IKey]) – Encryption key to use to read and write artifacts. Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used.

  • environment (Optional[BuildEnvironment]) – Build environment to use for the build. Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0

  • environment_variables (Optional[Mapping[str, BuildEnvironmentVariable]]) – Additional environment variables to add to the build environment. Default: - No additional environment variables are specified.

  • file_system_locations (Optional[List[IFileSystemLocation]]) – An 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. Default: - no file system locations

  • grant_report_group_permissions (Optional[bool]) – Add permissions to this project’s role to create and use test report groups with name starting with the name of this project. That is the standard report group that gets created when a simple name (in contrast to an ARN) is used in the ‘reports’ section of the buildspec of this project. This is usually harmless, but you can turn these off if you don’t plan on using test reports in this project. Default: true

  • project_name (Optional[str]) – The physical, human-readable name of the CodeBuild Project. Default: - Name is automatically generated.

  • role (Optional[IRole]) – Service Role to assume while running the build. Default: - A role will be created.

  • security_groups (Optional[List[ISecurityGroup]]) – What security group to associate with the codebuild project’s network interfaces. If no security group is identified, one will be created automatically. Only used if ‘vpc’ is supplied. Default: - Security group will be automatically created.

  • subnet_selection (Optional[SubnetSelection]) – Where to place the network interfaces within the VPC. Only used if ‘vpc’ is supplied. Default: - All private subnets.

  • timeout (Optional[Duration]) – The number of minutes after which AWS CodeBuild stops the build if it’s not complete. For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide. Default: Duration.hours(1)

  • vpc (Optional[IVpc]) – VPC network to place codebuild network interfaces. Specify this if the codebuild project needs to access resources in a VPC. Default: - No VPC is specified.

  • artifacts (Optional[IArtifacts]) – Defines where build artifacts will be stored. Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts. Default: NoArtifacts

  • secondary_artifacts (Optional[List[IArtifacts]]) – The secondary artifacts for the Project. Can also be added after the Project has been created by using the {@link Project#addSecondaryArtifact} method. Default: - No secondary artifacts.

  • secondary_sources (Optional[List[ISource]]) – The secondary sources for the Project. Can be also added after the Project has been created by using the {@link Project#addSecondarySource} method. Default: - No secondary sources.

  • source (Optional[ISource]) – The source of the build. Note: if {@link NoSource} is given as the source, then you need to provide an explicit buildSpec. Default: - NoSource

Return type

None

Attributes

allow_all_outbound

Whether to allow the CodeBuild to send all network traffic.

If set to false, you must individually add traffic rules to allow the CodeBuild project to connect to network targets.

Only used if ‘vpc’ is supplied.

default :default: true

Return type

Optional[bool]

artifacts

Defines where build artifacts will be stored.

Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts.

default :default: NoArtifacts

Return type

Optional[IArtifacts]

badge

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.

default :default: false

Return type

Optional[bool]

build_spec

Filename or contents of buildspec in JSON format.

default :default: - Empty buildspec.

see :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example

Return type

Optional[BuildSpec]

cache

Caching strategy to use.

default :default: Cache.none

Return type

Optional[Cache]

description

A description of the project.

Use the description to identify the purpose of the project.

default :default: - No description.

Return type

Optional[str]

encryption_key

Encryption key to use to read and write artifacts.

default :default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used.

Return type

Optional[IKey]

environment

Build environment to use for the build.

default :default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0

Return type

Optional[BuildEnvironment]

environment_variables

Additional environment variables to add to the build environment.

default :default: - No additional environment variables are specified.

Return type

Optional[Mapping[str, BuildEnvironmentVariable]]

file_system_locations

An 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.

default :default: - no file system locations

Return type

Optional[List[IFileSystemLocation]]

grant_report_group_permissions

Add permissions to this project’s role to create and use test report groups with name starting with the name of this project.

That is the standard report group that gets created when a simple name (in contrast to an ARN) is used in the ‘reports’ section of the buildspec of this project. This is usually harmless, but you can turn these off if you don’t plan on using test reports in this project.

default :default: true

see :see: https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html

Return type

Optional[bool]

project_name

The physical, human-readable name of the CodeBuild Project.

default :default: - Name is automatically generated.

Return type

Optional[str]

role

Service Role to assume while running the build.

default :default: - A role will be created.

Return type

Optional[IRole]

secondary_artifacts

The secondary artifacts for the Project.

Can also be added after the Project has been created by using the {@link Project#addSecondaryArtifact} method.

default :default: - No secondary artifacts.

see :see: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html

Return type

Optional[List[IArtifacts]]

secondary_sources

The secondary sources for the Project.

Can be also added after the Project has been created by using the {@link Project#addSecondarySource} method.

default :default: - No secondary sources.

see :see: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html

Return type

Optional[List[ISource]]

security_groups

What security group to associate with the codebuild project’s network interfaces.

If no security group is identified, one will be created automatically.

Only used if ‘vpc’ is supplied.

default :default: - Security group will be automatically created.

Return type

Optional[List[ISecurityGroup]]

source

The source of the build.

Note: if {@link NoSource} is given as the source, then you need to provide an explicit buildSpec.

default :default: - NoSource

Return type

Optional[ISource]

subnet_selection

Where to place the network interfaces within the VPC.

Only used if ‘vpc’ is supplied.

default :default: - All private subnets.

Return type

Optional[SubnetSelection]

timeout

The number of minutes after which AWS CodeBuild stops the build if it’s not complete.

For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide.

default :default: Duration.hours(1)

Return type

Optional[Duration]

vpc

VPC network to place codebuild network interfaces.

Specify this if the codebuild project needs to access resources in a VPC.

default :default: - No VPC is specified.

Return type

Optional[IVpc]