CfnProject
- class aws_cdk.aws_codebuild.CfnProject(scope, id, *, artifacts, environment, service_role, source, auto_retry_limit=None, badge_enabled=None, build_batch_config=None, cache=None, concurrent_build_limit=None, description=None, encryption_key=None, file_system_locations=None, logs_config=None, name=None, queued_timeout_in_minutes=None, resource_access_role=None, secondary_artifacts=None, secondary_sources=None, secondary_source_versions=None, source_version=None, tags=None, timeout_in_minutes=None, triggers=None, visibility=None, vpc_config=None)
Bases:
CfnResourceThe
AWS::CodeBuild::Projectresource 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. .. epigraph:
To unset or remove a project value via CFN, explicitly provide the attribute with value as empty input.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
- CloudformationResource:
AWS::CodeBuild::Project
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild cfn_project = codebuild.CfnProject(self, "MyCfnProject", artifacts=codebuild.CfnProject.ArtifactsProperty( type="type", # the properties below are optional artifact_identifier="artifactIdentifier", encryption_disabled=False, location="location", name="name", namespace_type="namespaceType", override_artifact_name=False, packaging="packaging", path="path" ), environment=codebuild.CfnProject.EnvironmentProperty( compute_type="computeType", image="image", type="type", # the properties below are optional certificate="certificate", docker_server=codebuild.CfnProject.DockerServerProperty( compute_type="computeType", # the properties below are optional security_group_ids=["securityGroupIds"] ), environment_variables=[codebuild.CfnProject.EnvironmentVariableProperty( name="name", value="value", # the properties below are optional type="type" )], fleet=codebuild.CfnProject.ProjectFleetProperty( fleet_arn="fleetArn" ), image_pull_credentials_type="imagePullCredentialsType", privileged_mode=False, registry_credential=codebuild.CfnProject.RegistryCredentialProperty( credential="credential", credential_provider="credentialProvider" ) ), service_role="serviceRole", source=codebuild.CfnProject.SourceProperty( type="type", # the properties below are optional auth=codebuild.CfnProject.SourceAuthProperty( type="type", # the properties below are optional resource="resource" ), build_spec="buildSpec", build_status_config=codebuild.CfnProject.BuildStatusConfigProperty( context="context", target_url="targetUrl" ), git_clone_depth=123, git_submodules_config=codebuild.CfnProject.GitSubmodulesConfigProperty( fetch_submodules=False ), insecure_ssl=False, location="location", report_build_status=False, source_identifier="sourceIdentifier" ), # the properties below are optional auto_retry_limit=123, badge_enabled=False, build_batch_config=codebuild.CfnProject.ProjectBuildBatchConfigProperty( batch_report_mode="batchReportMode", combine_artifacts=False, restrictions=codebuild.CfnProject.BatchRestrictionsProperty( compute_types_allowed=["computeTypesAllowed"], maximum_builds_allowed=123 ), service_role="serviceRole", timeout_in_mins=123 ), cache=codebuild.CfnProject.ProjectCacheProperty( type="type", # the properties below are optional cache_namespace="cacheNamespace", location="location", modes=["modes"] ), concurrent_build_limit=123, description="description", encryption_key="encryptionKey", file_system_locations=[codebuild.CfnProject.ProjectFileSystemLocationProperty( identifier="identifier", location="location", mount_point="mountPoint", type="type", # the properties below are optional mount_options="mountOptions" )], logs_config=codebuild.CfnProject.LogsConfigProperty( cloud_watch_logs=codebuild.CfnProject.CloudWatchLogsConfigProperty( status="status", # the properties below are optional group_name="groupName", stream_name="streamName" ), s3_logs=codebuild.CfnProject.S3LogsConfigProperty( status="status", # the properties below are optional encryption_disabled=False, location="location" ) ), name="name", queued_timeout_in_minutes=123, resource_access_role="resourceAccessRole", secondary_artifacts=[codebuild.CfnProject.ArtifactsProperty( type="type", # the properties below are optional artifact_identifier="artifactIdentifier", encryption_disabled=False, location="location", name="name", namespace_type="namespaceType", override_artifact_name=False, packaging="packaging", path="path" )], secondary_sources=[codebuild.CfnProject.SourceProperty( type="type", # the properties below are optional auth=codebuild.CfnProject.SourceAuthProperty( type="type", # the properties below are optional resource="resource" ), build_spec="buildSpec", build_status_config=codebuild.CfnProject.BuildStatusConfigProperty( context="context", target_url="targetUrl" ), git_clone_depth=123, git_submodules_config=codebuild.CfnProject.GitSubmodulesConfigProperty( fetch_submodules=False ), insecure_ssl=False, location="location", report_build_status=False, source_identifier="sourceIdentifier" )], secondary_source_versions=[codebuild.CfnProject.ProjectSourceVersionProperty( source_identifier="sourceIdentifier", # the properties below are optional source_version="sourceVersion" )], source_version="sourceVersion", tags=[CfnTag( key="key", value="value" )], timeout_in_minutes=123, triggers=codebuild.CfnProject.ProjectTriggersProperty( build_type="buildType", filter_groups=[[codebuild.CfnProject.WebhookFilterProperty( pattern="pattern", type="type", # the properties below are optional exclude_matched_pattern=False )]], pull_request_build_policy=codebuild.CfnProject.PullRequestBuildPolicyProperty( requires_comment_approval="requiresCommentApproval", # the properties below are optional approver_roles=["approverRoles"] ), scope_configuration=codebuild.CfnProject.ScopeConfigurationProperty( name="name", # the properties below are optional domain="domain", scope="scope" ), webhook=False ), visibility="visibility", vpc_config=codebuild.CfnProject.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"], vpc_id="vpcId" ) )
- Parameters:
scope (
Construct) – Scope in which this resource is defined.id (
str) – Construct identifier for this resource (unique in its scope).artifacts (
Union[IResolvable,ArtifactsProperty,Dict[str,Any]]) –Artifactsis a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.environment (
Union[IResolvable,EnvironmentProperty,Dict[str,Any]]) – The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.service_role (
str) – The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.source (
Union[IResolvable,SourceProperty,Dict[str,Any]]) – The source code settings for the project, such as the source code’s repository type and location.auto_retry_limit (
Union[int,float,None])badge_enabled (
Union[bool,IResolvable,None]) – 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 . .. epigraph:: Including build badges with your project is currently not supported if the source type is CodePipeline. If you specifyCODEPIPELINEfor theSourceproperty, do not specify theBadgeEnabledproperty.build_batch_config (
Union[IResolvable,ProjectBuildBatchConfigProperty,Dict[str,Any],None]) – AProjectBuildBatchConfigobject that defines the batch build options for the project.cache (
Union[IResolvable,ProjectCacheProperty,Dict[str,Any],None]) – Settings that AWS CodeBuild uses to store and reuse build dependencies.concurrent_build_limit (
Union[int,float,None]) – 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.description (
Optional[str]) – A description that makes the build project easy to identify.encryption_key (
Optional[str]) – The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. .. epigraph:: 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 formatalias/<alias-name>). If you don’t specify a value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon S3).file_system_locations (
Union[IResolvable,Sequence[Union[IResolvable,ProjectFileSystemLocationProperty,Dict[str,Any]]],None]) – An array ofProjectFileSystemLocationobjects for a CodeBuild build project. AProjectFileSystemLocationobject specifies theidentifier,location,mountOptions,mountPoint, andtypeof a file system created using Amazon Elastic File System.logs_config (
Union[IResolvable,LogsConfigProperty,Dict[str,Any],None]) – Information about logs for the build project. A project can create logs in CloudWatch Logs, an S3 bucket, or both.name (
Optional[str]) – The name of the build project. The name must be unique across all of the projects in your AWS account .queued_timeout_in_minutes (
Union[int,float,None]) – The number of minutes a build is allowed to be queued before it times out.resource_access_role (
Optional[str]) – The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project’s builds.secondary_artifacts (
Union[IResolvable,Sequence[Union[IResolvable,ArtifactsProperty,Dict[str,Any]]],None]) – A list ofArtifactsobjects. Each artifacts object specifies output settings that the project generates during a build.secondary_sources (
Union[IResolvable,Sequence[Union[IResolvable,SourceProperty,Dict[str,Any]]],None]) – An array ofProjectSourceobjects.secondary_source_versions (
Union[IResolvable,Sequence[Union[IResolvable,ProjectSourceVersionProperty,Dict[str,Any]]],None]) – An array ofProjectSourceVersionobjects. IfsecondarySourceVersionsis specified at the build level, then they take over thesesecondarySourceVersions(at the project level).source_version (
Optional[str]) – 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 formatpr/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. IfsourceVersionis specified at the build level, then that version takes precedence over thissourceVersion(at the project level). For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .tags (
Optional[Sequence[Union[CfnTag,Dict[str,Any]]]]) – 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.timeout_in_minutes (
Union[int,float,None]) – 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. The default is 60 minutes.triggers (
Union[IResolvable,ProjectTriggersProperty,Dict[str,Any],None]) – 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.visibility (
Optional[str]) – 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.vpc_config (
Union[IResolvable,VpcConfigProperty,Dict[str,Any],None]) –VpcConfigspecifies 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 .
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined).- Parameters:
path (
str) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource)- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource)- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str)value (
Any)
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverrideor prefixpathwith “Properties.” (i.e.Properties.TopicName).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.in the property name, prefix with a\. In most programming languages you will need to write this as"\\."because the\itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
valueargument toaddOverridewill not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value).- Parameters:
property_path (
str) – The path of the property.value (
Any) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional[RemovalPolicy])apply_to_update_replace_policy (
Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str) – The name of the attribute.type_hint (
Optional[ResolutionTypeHint])
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str)- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List[Union[Stack,CfnResource]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List[CfnResource]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource)- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource) – The dependency to replace.new_target (
CfnResource) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::CodeBuild::Project'
- artifacts
Artifactsis a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
- attr_arn
The ARN of the AWS CodeBuild project, such as
arn:aws:codebuild:us-west-2:123456789012:project/myProjectName.- CloudformationAttribute:
Arn
- attr_id
Id
- Type:
cloudformationAttribute
- auto_retry_limit
- badge_enabled
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project’s build badge.
- build_batch_config
A
ProjectBuildBatchConfigobject that defines the batch build options for the project.
- cache
Settings that AWS CodeBuild uses to store and reuse build dependencies.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- concurrent_build_limit
The maximum number of concurrent builds that are allowed for this project.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- description
A description that makes the build project easy to identify.
- encryption_key
The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
- environment
The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
- file_system_locations
An array of
ProjectFileSystemLocationobjects for a CodeBuild build project.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId).- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- logs_config
Information about logs for the build project.
- name
The name of the build project.
- node
The tree node.
- project_ref
A reference to a Project resource.
- queued_timeout_in_minutes
The number of minutes a build is allowed to be queued before it times out.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref }).
- resource_access_role
The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project’s builds.
- secondary_artifacts
A list of
Artifactsobjects.
- secondary_source_versions
An array of
ProjectSourceVersionobjects.
- secondary_sources
An array of
ProjectSourceobjects.
- service_role
The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
- source
The source code settings for the project, such as the source code’s repository type and location.
- source_version
A version of the build input to be built for this project.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
Tag Manager which manages the tags for this resource.
- tags_raw
An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
- timeout_in_minutes
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.
- 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.
- visibility
Specifies the visibility of the project’s builds.
Possible values are:.
- vpc_config
VpcConfigspecifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
Static Methods
- classmethod is_cfn_element(x)
Returns
trueif a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceofto allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any)- Return type:
bool- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any)- Return type:
bool
- classmethod is_construct(x)
Checks if
xis a construct.Use this method instead of
instanceofto properly detectConstructinstances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the classConstructin each copy of theconstructslibrary is seen as a different class, and an instance of one class will not test asinstanceofthe other class.npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructslibrary can be accidentally installed, andinstanceofwill behave unpredictably. It is safest to avoid usinginstanceof, and using this type-testing method instead.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsConstruct.
ArtifactsProperty
- class CfnProject.ArtifactsProperty(*, type, artifact_identifier=None, encryption_disabled=None, location=None, name=None, namespace_type=None, override_artifact_name=None, packaging=None, path=None)
Bases:
objectArtifactsis a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.- Parameters:
type (
str) – The type of build output artifact. Valid values include:. -CODEPIPELINE: The build project has build output generated through CodePipeline. .. epigraph:: TheCODEPIPELINEtype is not supported forsecondaryArtifacts. -NO_ARTIFACTS: The build project does not produce any build output. -S3: The build project stores build output in Amazon S3.artifact_identifier (
Optional[str]) – An identifier for this artifact definition.encryption_disabled (
Union[bool,IResolvable,None]) – Set to true if you do not want your output artifacts encrypted. This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, aninvalidInputExceptionis thrown.location (
Optional[str]) – Information about the build output artifact location:. - Iftypeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild . - Iftypeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - Iftypeis set toS3, this is the name of the output bucket. If you specifyCODEPIPELINEorNO_ARTIFACTSfor theTypeproperty, don’t specify this property. For all of the other types, you must specify this property.name (
Optional[str]) – Along withpathandnamespaceType, the pattern that AWS CodeBuild uses to name and store the output artifact:. - Iftypeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . - Iftypeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - Iftypeis set toS3, this is the name of the output artifact object. If you set the name to be a forward slash (“/”), the artifact is stored in the root of the output bucket. For example: - Ifpathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set toMyArtifact.zip, then the output artifact is stored inMyArtifacts/ *build-ID* /MyArtifact.zip. - Ifpathis empty,namespaceTypeis set toNONE, andnameis set to “/“, the output artifact is stored in the root of the output bucket. - Ifpathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set to “/“, the output artifact is stored inMyArtifacts/ *build-ID*. If you specifyCODEPIPELINEorNO_ARTIFACTSfor theTypeproperty, don’t specify this property. For all of the other types, you must specify this property.namespace_type (
Optional[str]) – Along withpathandname, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact: - Iftypeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . - Iftypeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - Iftypeis set toS3, valid values include: -BUILD_ID: Include the build ID in the location of the build output artifact. -NONE: Do not include the build ID. This is the default ifnamespaceTypeis not specified. For example, ifpathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set toMyArtifact.zip, the output artifact is stored inMyArtifacts/<build-ID>/MyArtifact.zip.override_artifact_name (
Union[bool,IResolvable,None]) – If set to true a name specified in the buildspec file overrides the artifact name. The name specified in a buildspec file is calculated at build time and uses the Shell command language. For example, you can append a date and time to your artifact name so that it is always unique.packaging (
Optional[str]) – The type of build output artifact to create:. - Iftypeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of AWS CodeBuild . - Iftypeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - Iftypeis set toS3, valid values include: -NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default ifpackagingis not specified. -ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.path (
Optional[str]) – Along withnamespaceTypeandname, the pattern that AWS CodeBuild uses to name and store the output artifact:. - Iftypeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . - Iftypeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - Iftypeis set toS3, this is the path to the output artifact. Ifpathis not specified,pathis not used. For example, ifpathis set toMyArtifacts,namespaceTypeis set toNONE, andnameis set toMyArtifact.zip, the output artifact is stored in the output bucket atMyArtifacts/MyArtifact.zip.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild artifacts_property = codebuild.CfnProject.ArtifactsProperty( type="type", # the properties below are optional artifact_identifier="artifactIdentifier", encryption_disabled=False, location="location", name="name", namespace_type="namespaceType", override_artifact_name=False, packaging="packaging", path="path" )
Attributes
- artifact_identifier
An identifier for this artifact definition.
- encryption_disabled
Set to true if you do not want your output artifacts encrypted.
This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an
invalidInputExceptionis thrown.
- location
.
If
typeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild .If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced.If
typeis set toS3, this is the name of the output bucket.
If you specify
CODEPIPELINEorNO_ARTIFACTSfor theTypeproperty, don’t specify this property. For all of the other types, you must specify this property.- See:
- Type:
Information about the build output artifact location
- name
.
If
typeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild .If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced.If
typeis set toS3, this is the name of the output artifact object. If you set the name to be a forward slash (“/”), the artifact is stored in the root of the output bucket.
For example:
If
pathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set toMyArtifact.zip, then the output artifact is stored inMyArtifacts/ *build-ID* /MyArtifact.zip.If
pathis empty,namespaceTypeis set toNONE, andnameis set to “/“, the output artifact is stored in the root of the output bucket.If
pathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set to “/“, the output artifact is stored inMyArtifacts/ *build-ID*.
If you specify
CODEPIPELINEorNO_ARTIFACTSfor theTypeproperty, don’t specify this property. For all of the other types, you must specify this property.- See:
- Type:
Along with
pathandnamespaceType, the pattern that AWS CodeBuild uses to name and store the output artifact
- namespace_type
If
typeis set toCODEPIPELINE, CodePipeline ignores this value if specified.
This is because CodePipeline manages its build output names instead of AWS CodeBuild .
If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced.If
typeis set toS3, valid values include:BUILD_ID: Include the build ID in the location of the build output artifact.NONE: Do not include the build ID. This is the default ifnamespaceTypeis not specified.
For example, if
pathis set toMyArtifacts,namespaceTypeis set toBUILD_ID, andnameis set toMyArtifact.zip, the output artifact is stored inMyArtifacts/<build-ID>/MyArtifact.zip.- See:
- Type:
Along with
pathandname, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact
- override_artifact_name
If set to true a name specified in the buildspec file overrides the artifact name.
The name specified in a buildspec file is calculated at build time and uses the Shell command language. For example, you can append a date and time to your artifact name so that it is always unique.
- packaging
.
If
typeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of AWS CodeBuild .If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced.If
typeis set toS3, valid values include:NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default ifpackagingis not specified.ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.
- See:
- Type:
The type of build output artifact to create
- path
.
If
typeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild .If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced.If
typeis set toS3, this is the path to the output artifact. Ifpathis not specified,pathis not used.
For example, if
pathis set toMyArtifacts,namespaceTypeis set toNONE, andnameis set toMyArtifact.zip, the output artifact is stored in the output bucket atMyArtifacts/MyArtifact.zip.- See:
- Type:
Along with
namespaceTypeandname, the pattern that AWS CodeBuild uses to name and store the output artifact
- type
.
CODEPIPELINE: The build project has build output generated through CodePipeline.
The
CODEPIPELINEtype is not supported forsecondaryArtifacts.NO_ARTIFACTS: The build project does not produce any build output.S3: The build project stores build output in Amazon S3.
- See:
- Type:
The type of build output artifact. Valid values include
BatchRestrictionsProperty
- class CfnProject.BatchRestrictionsProperty(*, compute_types_allowed=None, maximum_builds_allowed=None)
Bases:
objectSpecifies restrictions for the batch build.
- Parameters:
compute_types_allowed (
Optional[Sequence[str]]) – An array of strings that specify the compute types that are allowed for the batch build. See Build environment compute types in the AWS CodeBuild User Guide for these values.maximum_builds_allowed (
Union[int,float,None]) – Specifies the maximum number of builds allowed.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild batch_restrictions_property = codebuild.CfnProject.BatchRestrictionsProperty( compute_types_allowed=["computeTypesAllowed"], maximum_builds_allowed=123 )
Attributes
- compute_types_allowed
An array of strings that specify the compute types that are allowed for the batch build.
See Build environment compute types in the AWS CodeBuild User Guide for these values.
- maximum_builds_allowed
Specifies the maximum number of builds allowed.
BuildStatusConfigProperty
- class CfnProject.BuildStatusConfigProperty(*, context=None, target_url=None)
Bases:
objectContains information that defines how the AWS CodeBuild build project reports the build status to the source provider.
- Parameters:
context (
Optional[str]) – Specifies the context of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider. - Bitbucket - This parameter is used for thenameparameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. - GitHub/GitHub Enterprise Server - This parameter is used for thecontextparameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.target_url (
Optional[str]) –Specifies the target url of the build status CodeBuild sends to the source provider. The usage of this parameter depends on the source provider. - Bitbucket - This parameter is used for the
urlparameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation. - GitHub/GitHub Enterprise Server - This parameter is used for thetarget_urlparameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild build_status_config_property = codebuild.CfnProject.BuildStatusConfigProperty( context="context", target_url="targetUrl" )
Attributes
- context
Specifies the context of the build status CodeBuild sends to the source provider.
The usage of this parameter depends on the source provider.
Bitbucket - This parameter is used for the
nameparameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation.GitHub/GitHub Enterprise Server - This parameter is used for the
contextparameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.
- target_url
Specifies the target url of the build status CodeBuild sends to the source provider.
The usage of this parameter depends on the source provider.
Bitbucket - This parameter is used for the
urlparameter in the Bitbucket commit status. For more information, see build in the Bitbucket API documentation.GitHub/GitHub Enterprise Server - This parameter is used for the
target_urlparameter in the GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.
CloudWatchLogsConfigProperty
- class CfnProject.CloudWatchLogsConfigProperty(*, status, group_name=None, stream_name=None)
Bases:
objectCloudWatchLogsis a property of the AWS CodeBuild Project LogsConfig property type that specifies settings for CloudWatch logs generated by an AWS CodeBuild build.- Parameters:
status (
str) – The current status of the logs in CloudWatch Logs for a build project. Valid values are:. -ENABLED: CloudWatch Logs are enabled for this build project. -DISABLED: CloudWatch Logs are not enabled for this build project.group_name (
Optional[str]) – The group name of the logs in CloudWatch Logs. For more information, see Working with Log Groups and Log Streams .stream_name (
Optional[str]) –The prefix of the stream name of the CloudWatch Logs. For more information, see Working with Log Groups and Log Streams .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild cloud_watch_logs_config_property = codebuild.CfnProject.CloudWatchLogsConfigProperty( status="status", # the properties below are optional group_name="groupName", stream_name="streamName" )
Attributes
- group_name
The group name of the logs in CloudWatch Logs.
For more information, see Working with Log Groups and Log Streams .
- status
.
ENABLED: CloudWatch Logs are enabled for this build project.DISABLED: CloudWatch Logs are not enabled for this build project.
- See:
- Type:
The current status of the logs in CloudWatch Logs for a build project. Valid values are
- stream_name
The prefix of the stream name of the CloudWatch Logs.
For more information, see Working with Log Groups and Log Streams .
DockerServerProperty
- class CfnProject.DockerServerProperty(*, compute_type, security_group_ids=None)
Bases:
object- Parameters:
compute_type (
str)security_group_ids (
Optional[Sequence[str]])
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild docker_server_property = codebuild.CfnProject.DockerServerProperty( compute_type="computeType", # the properties below are optional security_group_ids=["securityGroupIds"] )
Attributes
- compute_type
-
- Type:
see
EnvironmentProperty
- class CfnProject.EnvironmentProperty(*, compute_type, image, type, certificate=None, docker_server=None, environment_variables=None, fleet=None, image_pull_credentials_type=None, privileged_mode=None, registry_credential=None)
Bases:
objectEnvironmentis a property of the AWS::CodeBuild::Project resource that specifies the environment for an AWS CodeBuild project.- Parameters:
compute_type (
str) – The type of compute environment. This determines the number of CPU cores and memory the build environment uses. Available values include: -ATTRIBUTE_BASED_COMPUTE: Specify the amount of vCPUs, memory, disk space, and the type of machine. .. epigraph:: If you useATTRIBUTE_BASED_COMPUTE, you must define your attributes by usingcomputeConfiguration. AWS CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved capacity environment types in the AWS CodeBuild User Guide . -BUILD_GENERAL1_SMALL: Use up to 4 GiB memory and 2 vCPUs for builds. -BUILD_GENERAL1_MEDIUM: Use up to 8 GiB memory and 4 vCPUs for builds. -BUILD_GENERAL1_LARGE: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type. -BUILD_GENERAL1_XLARGE: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type. -BUILD_GENERAL1_2XLARGE: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed. -BUILD_LAMBDA_1GB: Use up to 1 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER. -BUILD_LAMBDA_2GB: Use up to 2 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER. -BUILD_LAMBDA_4GB: Use up to 4 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER. -BUILD_LAMBDA_8GB: Use up to 8 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER. -BUILD_LAMBDA_10GB: Use up to 10 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER. If you useBUILD_GENERAL1_SMALL: - For environment typeLINUX_CONTAINER, you can use up to 4 GiB memory and 2 vCPUs for builds. - For environment typeLINUX_GPU_CONTAINER, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. - For environment typeARM_CONTAINER, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds. If you useBUILD_GENERAL1_LARGE: - For environment typeLINUX_CONTAINER, you can use up to 16 GiB memory and 8 vCPUs for builds. - For environment typeLINUX_GPU_CONTAINER, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. - For environment typeARM_CONTAINER, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds. For more information, see On-demand environment types in the AWS CodeBuild User Guide.image (
str) – The image tag or image digest that identifies the Docker image to use for this build project. Use the following formats: - For an image tag:<registry>/<repository>:<tag>. For example, in the Docker repository that CodeBuild uses to manage its Docker images, this would beaws/codebuild/standard:4.0. - For an image digest:<registry>/<repository>@<digest>. For example, to specify an image with the digest “sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf,” use<registry>/<repository>@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf. For more information, see Docker images provided by CodeBuild in the AWS CodeBuild user guide .type (
str) –The type of build environment to use for related builds. .. epigraph:: If you’re using compute fleets during project creation,
typewill be ignored. For more information, see Build environment compute types in the AWS CodeBuild user guide .certificate (
Optional[str]) – The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded certificate for the build project. For more information, see certificate in the AWS CodeBuild User Guide .docker_server (
Union[IResolvable,DockerServerProperty,Dict[str,Any],None])environment_variables (
Union[IResolvable,Sequence[Union[IResolvable,EnvironmentVariableProperty,Dict[str,Any]]],None]) – A set of environment variables to make available to builds for this build project.fleet (
Union[IResolvable,ProjectFleetProperty,Dict[str,Any],None])image_pull_credentials_type (
Optional[str]) – The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:. -CODEBUILDspecifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild service principal. -SERVICE_ROLEspecifies that AWS CodeBuild uses your build project’s service role. When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.privileged_mode (
Union[bool,IResolvable,None]) – Enables running the Docker daemon inside a Docker container. Set to true only if the build project is used to build Docker images. Otherwise, a build that attempts to interact with the Docker daemon fails. The default setting isfalse. You can initialize the Docker daemon during the install phase of your build by adding one of the following sets of commands to the install phase of your buildspec file: If the operating system’s base image is Ubuntu Linux:- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"If the operating system’s base image is Alpine Linux and the previous command does not work, add the-targument totimeout:- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&- timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"registry_credential (
Union[IResolvable,RegistryCredentialProperty,Dict[str,Any],None]) –RegistryCredentialis a property of the AWS::CodeBuild::Project Environment property that specifies information about credentials that provide access to a private Docker registry. When this is set:. -imagePullCredentialsTypemust be set toSERVICE_ROLE. - images cannot be curated or an Amazon ECR image.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild environment_property = codebuild.CfnProject.EnvironmentProperty( compute_type="computeType", image="image", type="type", # the properties below are optional certificate="certificate", docker_server=codebuild.CfnProject.DockerServerProperty( compute_type="computeType", # the properties below are optional security_group_ids=["securityGroupIds"] ), environment_variables=[codebuild.CfnProject.EnvironmentVariableProperty( name="name", value="value", # the properties below are optional type="type" )], fleet=codebuild.CfnProject.ProjectFleetProperty( fleet_arn="fleetArn" ), image_pull_credentials_type="imagePullCredentialsType", privileged_mode=False, registry_credential=codebuild.CfnProject.RegistryCredentialProperty( credential="credential", credential_provider="credentialProvider" ) )
Attributes
- certificate
The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded certificate for the build project.
For more information, see certificate in the AWS CodeBuild User Guide .
- compute_type
The type of compute environment.
This determines the number of CPU cores and memory the build environment uses. Available values include:
ATTRIBUTE_BASED_COMPUTE: Specify the amount of vCPUs, memory, disk space, and the type of machine.
If you use
ATTRIBUTE_BASED_COMPUTE, you must define your attributes by usingcomputeConfiguration. AWS CodeBuild will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved capacity environment types in the AWS CodeBuild User Guide .BUILD_GENERAL1_SMALL: Use up to 4 GiB memory and 2 vCPUs for builds.BUILD_GENERAL1_MEDIUM: Use up to 8 GiB memory and 4 vCPUs for builds.BUILD_GENERAL1_LARGE: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_XLARGE: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.BUILD_GENERAL1_2XLARGE: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed.BUILD_LAMBDA_1GB: Use up to 1 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER.BUILD_LAMBDA_2GB: Use up to 2 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER.BUILD_LAMBDA_4GB: Use up to 4 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER.BUILD_LAMBDA_8GB: Use up to 8 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER.BUILD_LAMBDA_10GB: Use up to 10 GiB memory for builds. Only available for environment typeLINUX_LAMBDA_CONTAINERandARM_LAMBDA_CONTAINER.
If you use
BUILD_GENERAL1_SMALL:For environment type
LINUX_CONTAINER, you can use up to 4 GiB memory and 2 vCPUs for builds.For environment type
LINUX_GPU_CONTAINER, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds.For environment type
ARM_CONTAINER, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for builds.
If you use
BUILD_GENERAL1_LARGE:For environment type
LINUX_CONTAINER, you can use up to 16 GiB memory and 8 vCPUs for builds.For environment type
LINUX_GPU_CONTAINER, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds.For environment type
ARM_CONTAINER, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for builds.
For more information, see On-demand environment types in the AWS CodeBuild User Guide.
- docker_server
-
- Type:
see
- environment_variables
A set of environment variables to make available to builds for this build project.
- fleet
-
- Type:
see
- image
The image tag or image digest that identifies the Docker image to use for this build project.
Use the following formats:
For an image tag:
<registry>/<repository>:<tag>. For example, in the Docker repository that CodeBuild uses to manage its Docker images, this would beaws/codebuild/standard:4.0.For an image digest:
<registry>/<repository>@<digest>. For example, to specify an image with the digest “sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf,” use<registry>/<repository>@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf.
For more information, see Docker images provided by CodeBuild in the AWS CodeBuild user guide .
- image_pull_credentials_type
.
CODEBUILDspecifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild service principal.SERVICE_ROLEspecifies that AWS CodeBuild uses your build project’s service role.
When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD credentials.
- See:
- Type:
The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values
- privileged_mode
Enables running the Docker daemon inside a Docker container.
Set to true only if the build project is used to build Docker images. Otherwise, a build that attempts to interact with the Docker daemon fails. The default setting is
false.You can initialize the Docker daemon during the install phase of your build by adding one of the following sets of commands to the install phase of your buildspec file:
If the operating system’s base image is Ubuntu Linux:
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"If the operating system’s base image is Alpine Linux and the previous command does not work, add the
-targument totimeout:- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&- timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done"
- registry_credential
.
imagePullCredentialsTypemust be set toSERVICE_ROLE.images cannot be curated or an Amazon ECR image.
- See:
- Type:
RegistryCredentialis a property of the AWS::CodeBuild::Project Environment property that specifies information about credentials that provide access to a private Docker registry. When this is set
- type
The type of build environment to use for related builds.
If you’re using compute fleets during project creation,
typewill be ignored.For more information, see Build environment compute types in the AWS CodeBuild user guide .
EnvironmentVariableProperty
- class CfnProject.EnvironmentVariableProperty(*, name, value, type=None)
Bases:
objectEnvironmentVariableis a property of the AWS CodeBuild Project Environment property type that specifies the name and value of an environment variable for an AWS CodeBuild project environment. When you use the environment to run a build, these variables are available for your builds to use.EnvironmentVariablecontains a list ofEnvironmentVariableproperty types.- Parameters:
name (
str) – The name or key of the environment variable.value (
str) – The value of the environment variable. .. epigraph:: We strongly discourage the use ofPLAINTEXTenvironment variables to store sensitive values, especially AWS secret key IDs.PLAINTEXTenvironment variables can be displayed in plain text using the AWS CodeBuild console and the AWS CLI . For sensitive values, we recommend you use an environment variable of typePARAMETER_STOREorSECRETS_MANAGER.type (
Optional[str]) – The type of environment variable. Valid values include:. -PARAMETER_STORE: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalueof the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the AWS CodeBuild User Guide . -PLAINTEXT: An environment variable in plain text format. This is the default value. -SECRETS_MANAGER: An environment variable stored in AWS Secrets Manager . For environment variables of this type, specify the name of the secret as thevalueof the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define AWS Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the AWS CodeBuild User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild environment_variable_property = codebuild.CfnProject.EnvironmentVariableProperty( name="name", value="value", # the properties below are optional type="type" )
Attributes
- name
The name or key of the environment variable.
- type
.
PARAMETER_STORE: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalueof the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the AWS CodeBuild User Guide .PLAINTEXT: An environment variable in plain text format. This is the default value.SECRETS_MANAGER: An environment variable stored in AWS Secrets Manager . For environment variables of this type, specify the name of the secret as thevalueof the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define AWS Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the AWS CodeBuild User Guide .
- See:
- Type:
The type of environment variable. Valid values include
- value
The value of the environment variable.
We strongly discourage the use of
PLAINTEXTenvironment variables to store sensitive values, especially AWS secret key IDs.PLAINTEXTenvironment variables can be displayed in plain text using the AWS CodeBuild console and the AWS CLI . For sensitive values, we recommend you use an environment variable of typePARAMETER_STOREorSECRETS_MANAGER.
GitSubmodulesConfigProperty
- class CfnProject.GitSubmodulesConfigProperty(*, fetch_submodules)
Bases:
objectGitSubmodulesConfigis a property of the AWS CodeBuild Project Source property type that specifies information about the Git submodules configuration for the build project.- Parameters:
fetch_submodules (
Union[bool,IResolvable]) – Set to true to fetch Git submodules for your AWS CodeBuild build project.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild git_submodules_config_property = codebuild.CfnProject.GitSubmodulesConfigProperty( fetch_submodules=False )
Attributes
- fetch_submodules
Set to true to fetch Git submodules for your AWS CodeBuild build project.
LogsConfigProperty
- class CfnProject.LogsConfigProperty(*, cloud_watch_logs=None, s3_logs=None)
Bases:
objectLogsConfigis a property of the AWS CodeBuild Project resource that specifies information about logs for a build project. These can be logs in Amazon CloudWatch Logs, built in a specified S3 bucket, or both.- Parameters:
cloud_watch_logs (
Union[IResolvable,CloudWatchLogsConfigProperty,Dict[str,Any],None]) – Information about CloudWatch Logs for a build project. CloudWatch Logs are enabled by default.s3_logs (
Union[IResolvable,S3LogsConfigProperty,Dict[str,Any],None]) – Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild logs_config_property = codebuild.CfnProject.LogsConfigProperty( cloud_watch_logs=codebuild.CfnProject.CloudWatchLogsConfigProperty( status="status", # the properties below are optional group_name="groupName", stream_name="streamName" ), s3_logs=codebuild.CfnProject.S3LogsConfigProperty( status="status", # the properties below are optional encryption_disabled=False, location="location" ) )
Attributes
- cloud_watch_logs
Information about CloudWatch Logs for a build project.
CloudWatch Logs are enabled by default.
- s3_logs
Information about logs built to an S3 bucket for a build project.
S3 logs are not enabled by default.
ProjectBuildBatchConfigProperty
- class CfnProject.ProjectBuildBatchConfigProperty(*, batch_report_mode=None, combine_artifacts=None, restrictions=None, service_role=None, timeout_in_mins=None)
Bases:
objectContains configuration information about a batch build project.
- Parameters:
batch_report_mode (
Optional[str]) – Specifies how build status reports are sent to the source provider for the batch build. This property is only used when the source provider for your project is Bitbucket, GitHub, or GitHub Enterprise, and your project is configured to report build statuses to the source provider. - REPORT_AGGREGATED_BATCH - (Default) Aggregate all of the build statuses into a single status report. - REPORT_INDIVIDUAL_BUILDS - Send a separate status report for each individual build.combine_artifacts (
Union[bool,IResolvable,None]) – Specifies if the build artifacts for the batch build should be combined into a single artifact location.restrictions (
Union[IResolvable,BatchRestrictionsProperty,Dict[str,Any],None]) – ABatchRestrictionsobject that specifies the restrictions for the batch build.service_role (
Optional[str]) – Specifies the service role ARN for the batch build project.timeout_in_mins (
Union[int,float,None]) – Specifies the maximum amount of time, in minutes, that the batch build must be completed in.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_build_batch_config_property = codebuild.CfnProject.ProjectBuildBatchConfigProperty( batch_report_mode="batchReportMode", combine_artifacts=False, restrictions=codebuild.CfnProject.BatchRestrictionsProperty( compute_types_allowed=["computeTypesAllowed"], maximum_builds_allowed=123 ), service_role="serviceRole", timeout_in_mins=123 )
Attributes
- batch_report_mode
Specifies how build status reports are sent to the source provider for the batch build.
This property is only used when the source provider for your project is Bitbucket, GitHub, or GitHub Enterprise, and your project is configured to report build statuses to the source provider.
REPORT_AGGREGATED_BATCH - (Default) Aggregate all of the build statuses into a single status report.
REPORT_INDIVIDUAL_BUILDS - Send a separate status report for each individual build.
- combine_artifacts
Specifies if the build artifacts for the batch build should be combined into a single artifact location.
- restrictions
A
BatchRestrictionsobject that specifies the restrictions for the batch build.
- service_role
Specifies the service role ARN for the batch build project.
- timeout_in_mins
Specifies the maximum amount of time, in minutes, that the batch build must be completed in.
ProjectCacheProperty
- class CfnProject.ProjectCacheProperty(*, type, cache_namespace=None, location=None, modes=None)
Bases:
objectProjectCacheis a property of the AWS CodeBuild Project resource that specifies information about the cache for the build project. IfProjectCacheis not specified, then both of its properties default toNO_CACHE.- Parameters:
type (
str) – The type of cache used by the build project. Valid values include:. -NO_CACHE: The build project does not use any cache. -S3: The build project reads and writes from and to S3. -LOCAL: The build project stores a cache locally on a build host that is only available to that build host.cache_namespace (
Optional[str]) – Defines the scope of the cache. You can use this namespace to share a cache across multiple projects. For more information, see Cache sharing between projects in the AWS CodeBuild User Guide .location (
Optional[str]) – Information about the cache location:. -NO_CACHEorLOCAL: This value is ignored. -S3: This is the S3 bucket name/prefix.modes (
Optional[Sequence[str]]) – An array of strings that specify the local cache modes. You can use one or more local cache modes at the same time. This is only used forLOCALcache types. Possible values are: - LOCAL_SOURCE_CACHE - Caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored. - LOCAL_DOCKER_LAYER_CACHE - Caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network. .. epigraph:: - You can use a Docker layer cache in the Linux environment only. - Theprivilegedflag must be set so that your project has the required Docker permissions. - You should consider the security implications before you use a Docker layer cache. - LOCAL_CUSTOM_CACHE - Caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache: - Only directories can be specified for caching. You cannot specify individual files. - Symlinks are used to reference cached directories. - Cached directories are linked to your build before it downloads its project sources. Cached items are overridden if a source item has the same name. Directories are specified using cache paths in the buildspec file.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_cache_property = codebuild.CfnProject.ProjectCacheProperty( type="type", # the properties below are optional cache_namespace="cacheNamespace", location="location", modes=["modes"] )
Attributes
- cache_namespace
Defines the scope of the cache.
You can use this namespace to share a cache across multiple projects. For more information, see Cache sharing between projects in the AWS CodeBuild User Guide .
- location
.
NO_CACHEorLOCAL: This value is ignored.S3: This is the S3 bucket name/prefix.
- See:
- Type:
Information about the cache location
- modes
An array of strings that specify the local cache modes.
You can use one or more local cache modes at the same time. This is only used for
LOCALcache types.Possible values are:
LOCAL_SOURCE_CACHE - Caches Git metadata for primary and secondary sources. After the cache is created, subsequent builds pull only the change between commits. This mode is a good choice for projects with a clean working directory and a source that is a large Git repository. If you choose this option and your project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the option is ignored.
LOCAL_DOCKER_LAYER_CACHE - Caches existing Docker layers. This mode is a good choice for projects that build or pull large Docker images. It can prevent the performance issues caused by pulling large Docker images down from the network.
You can use a Docker layer cache in the Linux environment only.
The
privilegedflag must be set so that your project has the required Docker permissions.You should consider the security implications before you use a Docker layer cache.
LOCAL_CUSTOM_CACHE - Caches directories you specify in the buildspec file. This mode is a good choice if your build scenario is not suited to one of the other three local cache modes. If you use a custom cache:
Only directories can be specified for caching. You cannot specify individual files.
Symlinks are used to reference cached directories.
Cached directories are linked to your build before it downloads its project sources. Cached items are overridden if a source item has the same name. Directories are specified using cache paths in the buildspec file.
- type
.
NO_CACHE: The build project does not use any cache.S3: The build project reads and writes from and to S3.LOCAL: The build project stores a cache locally on a build host that is only available to that build host.
- See:
- Type:
The type of cache used by the build project. Valid values include
ProjectFileSystemLocationProperty
- class CfnProject.ProjectFileSystemLocationProperty(*, identifier, location, mount_point, type, mount_options=None)
Bases:
objectInformation about a file system created by Amazon Elastic File System (EFS).
For more information, see What Is Amazon Elastic File System?
- Parameters:
identifier (
str) – The name used to access a file system created by Amazon EFS. CodeBuild creates an environment variable by appending theidentifierin all capital letters toCODEBUILD_. For example, if you specifymy_efsforidentifier, a new environment variable is create namedCODEBUILD_MY_EFS. Theidentifieris used to mount your file system.location (
str) – A string that specifies the location of the file system created by Amazon EFS. Its format isefs-dns-name:/directory-path. You can find the DNS name of file system when you view it in the Amazon EFS console. The directory path is a path to a directory in the file system that CodeBuild mounts. For example, if the DNS name of a file system isfs-abcd1234.efs.us-west-2.amazonaws.com, and its mount directory ismy-efs-mount-directory, then thelocationisfs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory. The directory path in the formatefs-dns-name:/directory-pathis optional. If you do not specify a directory path, the location is only the DNS name and CodeBuild mounts the entire file system.mount_point (
str) – The location in the container where you mount the file system.type (
str) – The type of the file system. The one supported type isEFS.mount_options (
Optional[str]) – The mount options for a file system created by Amazon EFS. The default mount options used by CodeBuild arenfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2. For more information, see Recommended NFS Mount Options .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_file_system_location_property = codebuild.CfnProject.ProjectFileSystemLocationProperty( identifier="identifier", location="location", mount_point="mountPoint", type="type", # the properties below are optional mount_options="mountOptions" )
Attributes
- identifier
The name used to access a file system created by Amazon EFS.
CodeBuild creates an environment variable by appending the
identifierin all capital letters toCODEBUILD_. For example, if you specifymy_efsforidentifier, a new environment variable is create namedCODEBUILD_MY_EFS.The
identifieris used to mount your file system.
- location
A string that specifies the location of the file system created by Amazon EFS.
Its format is
efs-dns-name:/directory-path. You can find the DNS name of file system when you view it in the Amazon EFS console. The directory path is a path to a directory in the file system that CodeBuild mounts. For example, if the DNS name of a file system isfs-abcd1234.efs.us-west-2.amazonaws.com, and its mount directory ismy-efs-mount-directory, then thelocationisfs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory.The directory path in the format
efs-dns-name:/directory-pathis optional. If you do not specify a directory path, the location is only the DNS name and CodeBuild mounts the entire file system.
- mount_options
The mount options for a file system created by Amazon EFS.
The default mount options used by CodeBuild are
nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2. For more information, see Recommended NFS Mount Options .
- mount_point
The location in the container where you mount the file system.
- type
The type of the file system.
The one supported type is
EFS.
ProjectFleetProperty
- class CfnProject.ProjectFleetProperty(*, fleet_arn=None)
Bases:
objectInformation about the compute fleet of the build project.
For more information, see Working with reserved capacity in AWS CodeBuild .
- Parameters:
fleet_arn (
Optional[str]) – Specifies the compute fleet ARN for the build project.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_fleet_property = codebuild.CfnProject.ProjectFleetProperty( fleet_arn="fleetArn" )
Attributes
- fleet_arn
Specifies the compute fleet ARN for the build project.
ProjectSourceVersionProperty
- class CfnProject.ProjectSourceVersionProperty(*, source_identifier, source_version=None)
Bases:
objectA source identifier and its corresponding version.
- Parameters:
source_identifier (
str) – An identifier for a source in the build project. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.source_version (
Optional[str]) –The source version for the corresponding source identifier. If specified, 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 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. For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_source_version_property = codebuild.CfnProject.ProjectSourceVersionProperty( source_identifier="sourceIdentifier", # the properties below are optional source_version="sourceVersion" )
Attributes
- source_identifier
An identifier for a source in the build project.
The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
- source_version
.
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 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.
For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .
- See:
- Type:
The source version for the corresponding source identifier. If specified, must be one of
ProjectTriggersProperty
- class CfnProject.ProjectTriggersProperty(*, build_type=None, filter_groups=None, pull_request_build_policy=None, scope_configuration=None, webhook=None)
Bases:
objectProjectTriggersis a property of the AWS CodeBuild Project resource that specifies webhooks that trigger an AWS CodeBuild build.The Webhook feature isn’t available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook.
- Parameters:
build_type (
Optional[str]) – Specifies the type of build this webhook will trigger. Allowed values are:. - BUILD - A single build - BUILD_BATCH - A batch buildfilter_groups (
Union[IResolvable,Sequence[Union[IResolvable,Sequence[Union[IResolvable,WebhookFilterProperty,Dict[str,Any]]]]],None]) – A list of lists ofWebhookFilterobjects used to determine which webhook events are triggered. At least oneWebhookFilterin the array must specifyEVENTas its type.pull_request_build_policy (
Union[IResolvable,PullRequestBuildPolicyProperty,Dict[str,Any],None])scope_configuration (
Union[IResolvable,ScopeConfigurationProperty,Dict[str,Any],None]) – Contains configuration information about the scope for a webhook.webhook (
Union[bool,IResolvable,None]) – Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild project_triggers_property = codebuild.CfnProject.ProjectTriggersProperty( build_type="buildType", filter_groups=[[codebuild.CfnProject.WebhookFilterProperty( pattern="pattern", type="type", # the properties below are optional exclude_matched_pattern=False )]], pull_request_build_policy=codebuild.CfnProject.PullRequestBuildPolicyProperty( requires_comment_approval="requiresCommentApproval", # the properties below are optional approver_roles=["approverRoles"] ), scope_configuration=codebuild.CfnProject.ScopeConfigurationProperty( name="name", # the properties below are optional domain="domain", scope="scope" ), webhook=False )
Attributes
- build_type
.
BUILD - A single build
BUILD_BATCH - A batch build
- See:
- Type:
Specifies the type of build this webhook will trigger. Allowed values are
- filter_groups
A list of lists of
WebhookFilterobjects used to determine which webhook events are triggered.At least one
WebhookFilterin the array must specifyEVENTas its type.
- pull_request_build_policy
-
- Type:
see
- scope_configuration
Contains configuration information about the scope for a webhook.
- webhook
Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository.
PullRequestBuildPolicyProperty
- class CfnProject.PullRequestBuildPolicyProperty(*, requires_comment_approval, approver_roles=None)
Bases:
object- Parameters:
requires_comment_approval (
str)approver_roles (
Optional[Sequence[str]])
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild pull_request_build_policy_property = codebuild.CfnProject.PullRequestBuildPolicyProperty( requires_comment_approval="requiresCommentApproval", # the properties below are optional approver_roles=["approverRoles"] )
Attributes
- approver_roles
-
- Type:
see
RegistryCredentialProperty
- class CfnProject.RegistryCredentialProperty(*, credential, credential_provider)
Bases:
objectRegistryCredentialis a property of the AWS CodeBuild Project Environment property type that specifies information about credentials that provide access to a private Docker registry. When this is set:.imagePullCredentialsTypemust be set toSERVICE_ROLE.images cannot be curated or an Amazon ECR image.
For more information, see Private Registry with AWS Secrets Manager Sample for AWS CodeBuild .
- Parameters:
credential (
str) – The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager . .. epigraph:: Thecredentialcan use the name of the credentials only if they exist in your current AWS Region .credential_provider (
str) – The service that created the credentials to access a private Docker registry. The valid value, SECRETS_MANAGER, is for AWS Secrets Manager .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild registry_credential_property = codebuild.CfnProject.RegistryCredentialProperty( credential="credential", credential_provider="credentialProvider" )
Attributes
- credential
The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager .
The
credentialcan use the name of the credentials only if they exist in your current AWS Region .
- credential_provider
The service that created the credentials to access a private Docker registry.
The valid value, SECRETS_MANAGER, is for AWS Secrets Manager .
S3LogsConfigProperty
- class CfnProject.S3LogsConfigProperty(*, status, encryption_disabled=None, location=None)
Bases:
objectS3Logsis a property of the AWS CodeBuild Project LogsConfig property type that specifies settings for logs generated by an AWS CodeBuild build in an S3 bucket.- Parameters:
status (
str) – The current status of the S3 build logs. Valid values are:. -ENABLED: S3 build logs are enabled for this build project. -DISABLED: S3 build logs are not enabled for this build project.encryption_disabled (
Union[bool,IResolvable,None]) – Set to true if you do not want your S3 build log output encrypted. By default S3 build logs are encrypted.location (
Optional[str]) – The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 bucket name ismy-bucket, and your path prefix isbuild-log, then acceptable formats aremy-bucket/build-logorarn:aws:s3:::my-bucket/build-log.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild s3_logs_config_property = codebuild.CfnProject.S3LogsConfigProperty( status="status", # the properties below are optional encryption_disabled=False, location="location" )
Attributes
- encryption_disabled
Set to true if you do not want your S3 build log output encrypted.
By default S3 build logs are encrypted.
- location
The ARN of an S3 bucket and the path prefix for S3 logs.
If your Amazon S3 bucket name is
my-bucket, and your path prefix isbuild-log, then acceptable formats aremy-bucket/build-logorarn:aws:s3:::my-bucket/build-log.
- status
.
ENABLED: S3 build logs are enabled for this build project.DISABLED: S3 build logs are not enabled for this build project.
- See:
- Type:
The current status of the S3 build logs. Valid values are
ScopeConfigurationProperty
- class CfnProject.ScopeConfigurationProperty(*, name, domain=None, scope=None)
Bases:
objectContains configuration information about the scope for a webhook.
- Parameters:
name (
str) – The name of either the enterprise or organization that will send webhook events to CodeBuild , depending on if the webhook is a global or organization webhook respectively.domain (
Optional[str]) – The domain of the GitHub Enterprise organization or the GitLab Self Managed group. Note that this parameter is only required if your project’s source type is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED.scope (
Optional[str]) – The type of scope for a GitHub or GitLab webhook. The scope default is GITHUB_ORGANIZATION.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild scope_configuration_property = codebuild.CfnProject.ScopeConfigurationProperty( name="name", # the properties below are optional domain="domain", scope="scope" )
Attributes
- domain
The domain of the GitHub Enterprise organization or the GitLab Self Managed group.
Note that this parameter is only required if your project’s source type is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED.
- name
The name of either the enterprise or organization that will send webhook events to CodeBuild , depending on if the webhook is a global or organization webhook respectively.
- scope
The type of scope for a GitHub or GitLab webhook.
The scope default is GITHUB_ORGANIZATION.
SourceAuthProperty
- class CfnProject.SourceAuthProperty(*, type, resource=None)
Bases:
objectSourceAuthis a property of the AWS CodeBuild Project Source property type that specifies authorization settings for AWS CodeBuild to access the source code to be built.- Parameters:
type (
str) – The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.resource (
Optional[str]) – The resource value that applies to the specified authorization type.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild source_auth_property = codebuild.CfnProject.SourceAuthProperty( type="type", # the properties below are optional resource="resource" )
Attributes
- resource
The resource value that applies to the specified authorization type.
- type
The authorization type to use.
Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
SourceProperty
- class CfnProject.SourceProperty(*, type, auth=None, build_spec=None, build_status_config=None, git_clone_depth=None, git_submodules_config=None, insecure_ssl=None, location=None, report_build_status=None, source_identifier=None)
Bases:
objectSourceis a property of the AWS::CodeBuild::Project resource that specifies the source code settings for the project, such as the source code’s repository type and location.- Parameters:
type (
str) – The type of repository that contains the source code to be built. Valid values include:. -BITBUCKET: The source code is in a Bitbucket repository. -CODECOMMIT: The source code is in an CodeCommit repository. -CODEPIPELINE: The source code settings are specified in the source action of a pipeline in CodePipeline. -GITHUB: The source code is in a GitHub repository. -GITHUB_ENTERPRISE: The source code is in a GitHub Enterprise Server repository. -GITLAB: The source code is in a GitLab repository. -GITLAB_SELF_MANAGED: The source code is in a self-managed GitLab repository. -NO_SOURCE: The project does not have input source code. -S3: The source code is in an Amazon S3 bucket.auth (
Union[IResolvable,SourceAuthProperty,Dict[str,Any],None]) – Information about the authorization settings for AWS CodeBuild to access the source code to be built.build_spec (
Optional[str]) – The build specification for the project. If this value is not provided, then the source code must contain a buildspec file namedbuildspec.ymlat the root level. If this value is provided, it can be either a single string containing the entire build specification, or the path to an alternate buildspec file relative to the value of the built-in environment variableCODEBUILD_SRC_DIR. The alternate buildspec file can have a name other thanbuildspec.yml, for examplemyspec.ymlorbuild_spec_qa.ymlor similar. For more information, see the Build Spec Reference in the AWS CodeBuild User Guide .build_status_config (
Union[IResolvable,BuildStatusConfigProperty,Dict[str,Any],None]) – Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider isGITHUB,GITHUB_ENTERPRISE, orBITBUCKET.git_clone_depth (
Union[int,float,None]) – The depth of history to download. Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build project. If your source type is Amazon S3, this value is not supported.git_submodules_config (
Union[IResolvable,GitSubmodulesConfigProperty,Dict[str,Any],None]) – Information about the Git submodules configuration for the build project.insecure_ssl (
Union[bool,IResolvable,None]) – This is used with GitHub Enterprise only. Set to true to ignore SSL warnings while connecting to your GitHub Enterprise project repository. The default value isfalse.InsecureSslshould be used for testing purposes only. It should not be used in a production environment.location (
Optional[str]) – Information about the location of the source code to be built. Valid values include:. - For source code settings that are specified in the source action of a pipeline in CodePipeline,locationshould not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in a pipeline’s source action instead of this value. - For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the buildspec file (for example,https://git-codecommit.<region-ID>.amazonaws.com/v1/repos/<repo-name>). - For source code in an Amazon S3 input bucket, one of the following. - The path to the ZIP file that contains the source code (for example,<bucket-name>/<path>/<object-name>.zip). - The path to the folder that contains the source code (for example,<bucket-name>/<path-to-source-code>/<folder>/). - For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitHub account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page, for Organization access , choose Request access next to each repository you want to allow AWS CodeBuild to have access to, and then choose Authorize application . (After you have connected to your GitHub account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in thesourceobject, set theauthobject’stypevalue toOAUTH. - For source code in an GitLab or self-managed GitLab repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitLab account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitLab, on the Connections Authorize application page, choose Authorize . Then on the AWS CodeConnections Create GitLab connection page, choose Connect to GitLab . (After you have connected to your GitLab account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to override the default connection and use this connection instead, set theauthobject’stypevalue toCODECONNECTIONSin thesourceobject. - For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access . (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in thesourceobject, set theauthobject’stypevalue toOAUTH. If you specifyCODEPIPELINEfor theTypeproperty, don’t specify this property. For all of the other types, you must specifyLocation.report_build_status (
Union[bool,IResolvable,None]) – Set to true to report the status of a build’s start and finish to your source provider. This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, aninvalidInputExceptionis thrown.source_identifier (
Optional[str]) – An identifier for this project source. The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild source_property = codebuild.CfnProject.SourceProperty( type="type", # the properties below are optional auth=codebuild.CfnProject.SourceAuthProperty( type="type", # the properties below are optional resource="resource" ), build_spec="buildSpec", build_status_config=codebuild.CfnProject.BuildStatusConfigProperty( context="context", target_url="targetUrl" ), git_clone_depth=123, git_submodules_config=codebuild.CfnProject.GitSubmodulesConfigProperty( fetch_submodules=False ), insecure_ssl=False, location="location", report_build_status=False, source_identifier="sourceIdentifier" )
Attributes
- auth
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
- build_spec
The build specification for the project.
If this value is not provided, then the source code must contain a buildspec file named
buildspec.ymlat the root level. If this value is provided, it can be either a single string containing the entire build specification, or the path to an alternate buildspec file relative to the value of the built-in environment variableCODEBUILD_SRC_DIR. The alternate buildspec file can have a name other thanbuildspec.yml, for examplemyspec.ymlorbuild_spec_qa.ymlor similar. For more information, see the Build Spec Reference in the AWS CodeBuild User Guide .
- build_status_config
Contains information that defines how the build project reports the build status to the source provider.
This option is only used when the source provider is
GITHUB,GITHUB_ENTERPRISE, orBITBUCKET.
- git_clone_depth
The depth of history to download.
Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build project. If your source type is Amazon S3, this value is not supported.
- git_submodules_config
Information about the Git submodules configuration for the build project.
- insecure_ssl
This is used with GitHub Enterprise only.
Set to true to ignore SSL warnings while connecting to your GitHub Enterprise project repository. The default value is
false.InsecureSslshould be used for testing purposes only. It should not be used in a production environment.
- location
.
For source code settings that are specified in the source action of a pipeline in CodePipeline,
locationshould not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in a pipeline’s source action instead of this value.For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the buildspec file (for example,
https://git-codecommit.<region-ID>.amazonaws.com/v1/repos/<repo-name>).For source code in an Amazon S3 input bucket, one of the following.
The path to the ZIP file that contains the source code (for example,
<bucket-name>/<path>/<object-name>.zip).The path to the folder that contains the source code (for example,
<bucket-name>/<path-to-source-code>/<folder>/).For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitHub account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub Authorize application page, for Organization access , choose Request access next to each repository you want to allow AWS CodeBuild to have access to, and then choose Authorize application . (After you have connected to your GitHub account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the
sourceobject, set theauthobject’stypevalue toOAUTH.For source code in an GitLab or self-managed GitLab repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitLab account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitLab, on the Connections Authorize application page, choose Authorize . Then on the AWS CodeConnections Create GitLab connection page, choose Connect to GitLab . (After you have connected to your GitLab account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to override the default connection and use this connection instead, set the
authobject’stypevalue toCODECONNECTIONSin thesourceobject.For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account page, choose Grant access . (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the
sourceobject, set theauthobject’stypevalue toOAUTH.
If you specify
CODEPIPELINEfor theTypeproperty, don’t specify this property. For all of the other types, you must specifyLocation.- See:
- Type:
Information about the location of the source code to be built. Valid values include
- report_build_status
Set to true to report the status of a build’s start and finish to your source provider.
This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, an
invalidInputExceptionis thrown.
- source_identifier
An identifier for this project source.
The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
- type
.
BITBUCKET: The source code is in a Bitbucket repository.CODECOMMIT: The source code is in an CodeCommit repository.CODEPIPELINE: The source code settings are specified in the source action of a pipeline in CodePipeline.GITHUB: The source code is in a GitHub repository.GITHUB_ENTERPRISE: The source code is in a GitHub Enterprise Server repository.GITLAB: The source code is in a GitLab repository.GITLAB_SELF_MANAGED: The source code is in a self-managed GitLab repository.NO_SOURCE: The project does not have input source code.S3: The source code is in an Amazon S3 bucket.
- See:
- Type:
The type of repository that contains the source code to be built. Valid values include
VpcConfigProperty
- class CfnProject.VpcConfigProperty(*, security_group_ids=None, subnets=None, vpc_id=None)
Bases:
objectVpcConfigis a property of the AWS::CodeBuild::Project resource 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:
security_group_ids (
Optional[Sequence[str]]) – A list of one or more security groups IDs in your Amazon VPC. The maximum count is 5.subnets (
Optional[Sequence[str]]) – A list of one or more subnet IDs in your Amazon VPC. The maximum count is 16.vpc_id (
Optional[str]) – The ID of the Amazon VPC.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild vpc_config_property = codebuild.CfnProject.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"], vpc_id="vpcId" )
Attributes
- security_group_ids
A list of one or more security groups IDs in your Amazon VPC.
The maximum count is 5.
- subnets
A list of one or more subnet IDs in your Amazon VPC.
The maximum count is 16.
- vpc_id
The ID of the Amazon VPC.
WebhookFilterProperty
- class CfnProject.WebhookFilterProperty(*, pattern, type, exclude_matched_pattern=None)
Bases:
objectWebhookFilteris a structure of theFilterGroupsproperty on the AWS CodeBuild Project ProjectTriggers property type that specifies which webhooks trigger an AWS CodeBuild build.The Webhook feature isn’t available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook.
- Parameters:
pattern (
str) – For aWebHookFilterthat usesEVENTtype, a comma-separated string that specifies one or more events. For example, the webhook filterPUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATEDallows all push, pull request created, and pull request updated events to trigger a build. For aWebHookFilterthat uses any of the other filter types, a regular expression pattern. For example, aWebHookFilterthat usesHEAD_REFfor itstypeand the pattern^refs/heads/triggers a build when the head reference is a branch with a reference namerefs/heads/branch-name.type (
str) – The type of webhook filter. There are 11 webhook filter types:EVENT,ACTOR_ACCOUNT_ID,HEAD_REF,BASE_REF,FILE_PATH,COMMIT_MESSAGE,TAG_NAME,RELEASE_NAME,REPOSITORY_NAME,ORGANIZATION_NAME, andWORKFLOW_NAME. - EVENT - A webhook event triggers a build when the providedpatternmatches one of nine event types:PUSH,PULL_REQUEST_CREATED,PULL_REQUEST_UPDATED,PULL_REQUEST_CLOSED,PULL_REQUEST_REOPENED,PULL_REQUEST_MERGED,RELEASED,PRERELEASED, andWORKFLOW_JOB_QUEUED. TheEVENTpatterns are specified as a comma-separated string. For example,PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATEDfilters all push, pull request created, and pull request updated events. .. epigraph:: TypesPULL_REQUEST_REOPENEDandWORKFLOW_JOB_QUEUEDwork with GitHub and GitHub Enterprise only. TypesRELEASEDandPRERELEASEDwork with GitHub only. - ACTOR_ACCOUNT_ID - A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expressionpattern. - HEAD_REF - A webhook event triggers a build when the head reference matches the regular expressionpattern. For example,refs/heads/branch-nameandrefs/tags/tag-name. .. epigraph:: Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events. - BASE_REF - A webhook event triggers a build when the base reference matches the regular expressionpattern. For example,refs/heads/branch-name. .. epigraph:: Works with pull request events only. - FILE_PATH - A webhook triggers a build when the path of a changed file matches the regular expressionpattern. .. epigraph:: Works with push and pull request events only. - COMMIT_MESSAGE - A webhook triggers a build when the head commit message matches the regular expressionpattern. .. epigraph:: Works with push and pull request events only. - TAG_NAME - A webhook triggers a build when the tag name of the release matches the regular expressionpattern. .. epigraph:: Works withRELEASEDandPRERELEASEDevents only. - RELEASE_NAME - A webhook triggers a build when the release name matches the regular expressionpattern. .. epigraph:: Works withRELEASEDandPRERELEASEDevents only. - REPOSITORY_NAME - A webhook triggers a build when the repository name matches the regular expressionpattern. .. epigraph:: Works with GitHub global or organization webhooks only. - ORGANIZATION_NAME - A webhook triggers a build when the organization name matches the regular expressionpattern. .. epigraph:: Works with GitHub global webhooks only. - WORKFLOW_NAME - A webhook triggers a build when the workflow name matches the regular expressionpattern. .. epigraph:: Works withWORKFLOW_JOB_QUEUEDevents only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name.exclude_matched_pattern (
Union[bool,IResolvable,None]) – Used to indicate that thepatterndetermines which webhook events do not trigger a build. If true, then a webhook event that does not match thepatterntriggers a build. If false, then a webhook event that matches thepatterntriggers a build.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_codebuild as codebuild webhook_filter_property = codebuild.CfnProject.WebhookFilterProperty( pattern="pattern", type="type", # the properties below are optional exclude_matched_pattern=False )
Attributes
- exclude_matched_pattern
Used to indicate that the
patterndetermines which webhook events do not trigger a build.If true, then a webhook event that does not match the
patterntriggers a build. If false, then a webhook event that matches thepatterntriggers a build.
- pattern
For a
WebHookFilterthat usesEVENTtype, a comma-separated string that specifies one or more events.For example, the webhook filter
PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATEDallows all push, pull request created, and pull request updated events to trigger a build.For a
WebHookFilterthat uses any of the other filter types, a regular expression pattern. For example, aWebHookFilterthat usesHEAD_REFfor itstypeand the pattern^refs/heads/triggers a build when the head reference is a branch with a reference namerefs/heads/branch-name.
- type
The type of webhook filter.
There are 11 webhook filter types:
EVENT,ACTOR_ACCOUNT_ID,HEAD_REF,BASE_REF,FILE_PATH,COMMIT_MESSAGE,TAG_NAME,RELEASE_NAME,REPOSITORY_NAME,ORGANIZATION_NAME, andWORKFLOW_NAME.EVENT
A webhook event triggers a build when the provided
patternmatches one of nine event types:PUSH,PULL_REQUEST_CREATED,PULL_REQUEST_UPDATED,PULL_REQUEST_CLOSED,PULL_REQUEST_REOPENED,PULL_REQUEST_MERGED,RELEASED,PRERELEASED, andWORKFLOW_JOB_QUEUED. TheEVENTpatterns are specified as a comma-separated string. For example,PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATEDfilters all push, pull request created, and pull request updated events.
Types
PULL_REQUEST_REOPENEDandWORKFLOW_JOB_QUEUEDwork with GitHub and GitHub Enterprise only. TypesRELEASEDandPRERELEASEDwork with GitHub only.ACTOR_ACCOUNT_ID
A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression
pattern.HEAD_REF
A webhook event triggers a build when the head reference matches the regular expression
pattern. For example,refs/heads/branch-nameandrefs/tags/tag-name.
Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.
BASE_REF
A webhook event triggers a build when the base reference matches the regular expression
pattern. For example,refs/heads/branch-name.
Works with pull request events only.
FILE_PATH
A webhook triggers a build when the path of a changed file matches the regular expression
pattern.
Works with push and pull request events only.
COMMIT_MESSAGE
A webhook triggers a build when the head commit message matches the regular expression
pattern.
Works with push and pull request events only.
TAG_NAME
A webhook triggers a build when the tag name of the release matches the regular expression
pattern.
Works with
RELEASEDandPRERELEASEDevents only.RELEASE_NAME
A webhook triggers a build when the release name matches the regular expression
pattern.
Works with
RELEASEDandPRERELEASEDevents only.REPOSITORY_NAME
A webhook triggers a build when the repository name matches the regular expression
pattern.
Works with GitHub global or organization webhooks only.
ORGANIZATION_NAME
A webhook triggers a build when the organization name matches the regular expression
pattern.
Works with GitHub global webhooks only.
WORKFLOW_NAME
A webhook triggers a build when the workflow name matches the regular expression
pattern.
Works with
WORKFLOW_JOB_QUEUEDevents only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name.