Documentation ¶
Index ¶
- func BitBucketSourceCredentials_IsConstruct(x interface{}) *bool
- func BitBucketSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
- func BitBucketSourceCredentials_IsResource(construct constructs.IConstruct) *bool
- func CfnFleet_CFN_RESOURCE_TYPE_NAME() *string
- func CfnFleet_IsCfnElement(x interface{}) *bool
- func CfnFleet_IsCfnResource(x interface{}) *bool
- func CfnFleet_IsConstruct(x interface{}) *bool
- func CfnProject_CFN_RESOURCE_TYPE_NAME() *string
- func CfnProject_IsCfnElement(x interface{}) *bool
- func CfnProject_IsCfnResource(x interface{}) *bool
- func CfnProject_IsConstruct(x interface{}) *bool
- func CfnReportGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnReportGroup_IsCfnElement(x interface{}) *bool
- func CfnReportGroup_IsCfnResource(x interface{}) *bool
- func CfnReportGroup_IsConstruct(x interface{}) *bool
- func CfnSourceCredential_CFN_RESOURCE_TYPE_NAME() *string
- func CfnSourceCredential_IsCfnElement(x interface{}) *bool
- func CfnSourceCredential_IsCfnResource(x interface{}) *bool
- func CfnSourceCredential_IsConstruct(x interface{}) *bool
- func GitHubEnterpriseSourceCredentials_IsConstruct(x interface{}) *bool
- func GitHubEnterpriseSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
- func GitHubEnterpriseSourceCredentials_IsResource(construct constructs.IConstruct) *bool
- func GitHubSourceCredentials_IsConstruct(x interface{}) *bool
- func GitHubSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
- func GitHubSourceCredentials_IsResource(construct constructs.IConstruct) *bool
- func NewArtifacts_Override(a Artifacts, props *ArtifactsProps)
- func NewBitBucketSourceCredentials_Override(b BitBucketSourceCredentials, scope constructs.Construct, id *string, ...)
- func NewBuildSpec_Override(b BuildSpec)
- func NewCache_Override(c Cache)
- func NewCfnFleet_Override(c CfnFleet, scope constructs.Construct, id *string, props *CfnFleetProps)
- func NewCfnProject_Override(c CfnProject, scope constructs.Construct, id *string, props *CfnProjectProps)
- func NewCfnReportGroup_Override(c CfnReportGroup, scope constructs.Construct, id *string, ...)
- func NewCfnSourceCredential_Override(c CfnSourceCredential, scope constructs.Construct, id *string, ...)
- func NewFileSystemLocation_Override(f FileSystemLocation)
- func NewGitHubEnterpriseSourceCredentials_Override(g GitHubEnterpriseSourceCredentials, scope constructs.Construct, id *string, ...)
- func NewGitHubSourceCredentials_Override(g GitHubSourceCredentials, scope constructs.Construct, id *string, ...)
- func NewPipelineProject_Override(p PipelineProject, scope constructs.Construct, id *string, ...)
- func NewProject_Override(p Project, scope constructs.Construct, id *string, props *ProjectProps)
- func NewReportGroup_Override(r ReportGroup, scope constructs.Construct, id *string, props *ReportGroupProps)
- func NewSource_Override(s Source, props *SourceProps)
- func NewUntrustedCodeBoundaryPolicy_Override(u UntrustedCodeBoundaryPolicy, scope constructs.Construct, id *string, ...)
- func PhaseChangeEvent_BuildComplete() *string
- func PhaseChangeEvent_BuildId() *string
- func PhaseChangeEvent_CompletedPhase() *string
- func PhaseChangeEvent_CompletedPhaseDurationSeconds() *string
- func PhaseChangeEvent_CompletedPhaseStatus() *string
- func PhaseChangeEvent_ProjectName() *string
- func PipelineProject_IsConstruct(x interface{}) *bool
- func PipelineProject_IsOwnedResource(construct constructs.IConstruct) *bool
- func PipelineProject_IsResource(construct constructs.IConstruct) *bool
- func PipelineProject_SerializeEnvVariables(environmentVariables *map[string]*BuildEnvironmentVariable, ...) *[]*CfnProject_EnvironmentVariableProperty
- func Project_IsConstruct(x interface{}) *bool
- func Project_IsOwnedResource(construct constructs.IConstruct) *bool
- func Project_IsResource(construct constructs.IConstruct) *bool
- func Project_SerializeEnvVariables(environmentVariables *map[string]*BuildEnvironmentVariable, ...) *[]*CfnProject_EnvironmentVariableProperty
- func ReportGroup_IsConstruct(x interface{}) *bool
- func ReportGroup_IsOwnedResource(construct constructs.IConstruct) *bool
- func ReportGroup_IsResource(construct constructs.IConstruct) *bool
- func StateChangeEvent_BuildId() *string
- func StateChangeEvent_BuildStatus() *string
- func StateChangeEvent_CurrentPhase() *string
- func StateChangeEvent_ProjectName() *string
- func UntrustedCodeBoundaryPolicy_FromAwsManagedPolicyName(managedPolicyName *string) awsiam.IManagedPolicy
- func UntrustedCodeBoundaryPolicy_FromManagedPolicyArn(scope constructs.Construct, id *string, managedPolicyArn *string) awsiam.IManagedPolicy
- func UntrustedCodeBoundaryPolicy_FromManagedPolicyName(scope constructs.Construct, id *string, managedPolicyName *string) awsiam.IManagedPolicy
- func UntrustedCodeBoundaryPolicy_IsConstruct(x interface{}) *bool
- func UntrustedCodeBoundaryPolicy_IsOwnedResource(construct constructs.IConstruct) *bool
- func UntrustedCodeBoundaryPolicy_IsResource(construct constructs.IConstruct) *bool
- type Artifacts
- type ArtifactsConfig
- type ArtifactsProps
- type BatchBuildConfig
- type BindToCodePipelineOptions
- type BitBucketSourceCredentials
- type BitBucketSourceCredentialsProps
- type BitBucketSourceProps
- type BucketCacheOptions
- type BuildEnvironment
- type BuildEnvironmentCertificate
- type BuildEnvironmentVariable
- type BuildEnvironmentVariableType
- type BuildImageBindOptions
- type BuildImageConfig
- type BuildSpec
- type Cache
- type CfnFleet
- type CfnFleetProps
- type CfnProject
- type CfnProjectProps
- type CfnProject_ArtifactsProperty
- type CfnProject_BatchRestrictionsProperty
- type CfnProject_BuildStatusConfigProperty
- type CfnProject_CloudWatchLogsConfigProperty
- type CfnProject_EnvironmentProperty
- type CfnProject_EnvironmentVariableProperty
- type CfnProject_GitSubmodulesConfigProperty
- type CfnProject_LogsConfigProperty
- type CfnProject_ProjectBuildBatchConfigProperty
- type CfnProject_ProjectCacheProperty
- type CfnProject_ProjectFileSystemLocationProperty
- type CfnProject_ProjectFleetProperty
- type CfnProject_ProjectSourceVersionProperty
- type CfnProject_ProjectTriggersProperty
- type CfnProject_RegistryCredentialProperty
- type CfnProject_S3LogsConfigProperty
- type CfnProject_SourceAuthProperty
- type CfnProject_SourceProperty
- type CfnProject_VpcConfigProperty
- type CfnProject_WebhookFilterProperty
- type CfnReportGroup
- type CfnReportGroupProps
- type CfnReportGroup_ReportExportConfigProperty
- type CfnReportGroup_S3ReportExportConfigProperty
- type CfnSourceCredential
- type CfnSourceCredentialProps
- type CloudWatchLoggingOptions
- type CodeCommitSourceProps
- type CommonProjectProps
- type ComputeType
- type DockerImageOptions
- type EfsFileSystemLocationProps
- type EventAction
- type FileSystemConfig
- type FileSystemLocation
- type FilterGroup
- type GitHubEnterpriseSourceCredentials
- type GitHubEnterpriseSourceCredentialsProps
- type GitHubEnterpriseSourceProps
- type GitHubSourceCredentials
- type GitHubSourceCredentialsProps
- type GitHubSourceProps
- type IArtifacts
- type IBindableBuildImage
- type IBuildImage
- func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_1_0() IBuildImage
- func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_2_0() IBuildImage
- func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_3_0() IBuildImage
- func LinuxArmBuildImage_FromCodeBuildImageId(id *string) IBuildImage
- func LinuxArmBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions) IBuildImage
- func LinuxArmBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_NODE_20() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_GO_1_21() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_NODE_18() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11() IBuildImage
- func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_2() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_3() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_4() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_5() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_ARM() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_ARM_2() IBuildImage
- func LinuxBuildImage_AMAZON_LINUX_2_ARM_3() IBuildImage
- func LinuxBuildImage_FromAsset(scope constructs.Construct, id *string, ...) IBuildImage
- func LinuxBuildImage_FromCodeBuildImageId(id *string) IBuildImage
- func LinuxBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions) IBuildImage
- func LinuxBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) IBuildImage
- func LinuxBuildImage_STANDARD_1_0() IBuildImage
- func LinuxBuildImage_STANDARD_2_0() IBuildImage
- func LinuxBuildImage_STANDARD_3_0() IBuildImage
- func LinuxBuildImage_STANDARD_4_0() IBuildImage
- func LinuxBuildImage_STANDARD_5_0() IBuildImage
- func LinuxBuildImage_STANDARD_6_0() IBuildImage
- func LinuxBuildImage_STANDARD_7_0() IBuildImage
- func LinuxGpuBuildImage_AwsDeepLearningContainersImage(repositoryName *string, tag *string, account *string) IBuildImage
- func LinuxGpuBuildImage_DLC_MXNET_1_4_1() IBuildImage
- func LinuxGpuBuildImage_DLC_MXNET_1_6_0() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_2_0() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_3_1() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_INFERENCE() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_TRAINING() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_INFERENCE() IBuildImage
- func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_TRAINING() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_1_14_0() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_0() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_INFERENCE() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_TRAINING() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_0() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_1() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_INFERENCE() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_TRAINING() IBuildImage
- func LinuxGpuBuildImage_DLC_TENSORFLOW_2_2_0_TRAINING() IBuildImage
- func LinuxGpuBuildImage_FromEcrRepository(repository awsecr.IRepository, tag *string) IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2023_NODE_20() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_GO_1_21() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_NODE_18() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11() IBuildImage
- func LinuxLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2() IBuildImage
- func WindowsBuildImage_FromAsset(scope constructs.Construct, id *string, ...) IBuildImage
- func WindowsBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions, imageType WindowsImageType) IBuildImage
- func WindowsBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string, imageType WindowsImageType) IBuildImage
- func WindowsBuildImage_WINDOWS_BASE_2_0() IBuildImage
- func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE() IBuildImage
- func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_2_0() IBuildImage
- func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_3_0() IBuildImage
- type IFileSystemLocation
- type IProject
- func PipelineProject_FromProjectArn(scope constructs.Construct, id *string, projectArn *string) IProject
- func PipelineProject_FromProjectName(scope constructs.Construct, id *string, projectName *string) IProject
- func Project_FromProjectArn(scope constructs.Construct, id *string, projectArn *string) IProject
- func Project_FromProjectName(scope constructs.Construct, id *string, projectName *string) IProject
- type IReportGroup
- type ISource
- type ImagePullPrincipalType
- type LinuxArmBuildImage
- type LinuxArmLambdaBuildImage
- type LinuxBuildImage
- type LinuxGpuBuildImage
- type LinuxLambdaBuildImage
- type LocalCacheMode
- type LoggingOptions
- type PhaseChangeEvent
- type PipelineProject
- type PipelineProjectProps
- type Project
- type ProjectNotificationEvents
- type ProjectNotifyOnOptions
- type ProjectProps
- type ReportGroup
- type ReportGroupProps
- type ReportGroupType
- type S3ArtifactsProps
- type S3LoggingOptions
- type S3SourceProps
- type Source
- type SourceConfig
- type SourceProps
- type StateChangeEvent
- type UntrustedCodeBoundaryPolicy
- type UntrustedCodeBoundaryPolicyProps
- type WindowsBuildImage
- type WindowsImageType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitBucketSourceCredentials_IsConstruct ¶
func BitBucketSourceCredentials_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func BitBucketSourceCredentials_IsOwnedResource ¶ added in v2.32.0
func BitBucketSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func BitBucketSourceCredentials_IsResource ¶
func BitBucketSourceCredentials_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func CfnFleet_CFN_RESOURCE_TYPE_NAME ¶ added in v2.124.0
func CfnFleet_CFN_RESOURCE_TYPE_NAME() *string
func CfnFleet_IsCfnElement ¶ added in v2.124.0
func CfnFleet_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnFleet_IsCfnResource ¶ added in v2.124.0
func CfnFleet_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnFleet_IsConstruct ¶ added in v2.124.0
func CfnFleet_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnProject_CFN_RESOURCE_TYPE_NAME ¶
func CfnProject_CFN_RESOURCE_TYPE_NAME() *string
func CfnProject_IsCfnElement ¶
func CfnProject_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnProject_IsCfnResource ¶
func CfnProject_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnProject_IsConstruct ¶
func CfnProject_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnReportGroup_CFN_RESOURCE_TYPE_NAME ¶
func CfnReportGroup_CFN_RESOURCE_TYPE_NAME() *string
func CfnReportGroup_IsCfnElement ¶
func CfnReportGroup_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnReportGroup_IsCfnResource ¶
func CfnReportGroup_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnReportGroup_IsConstruct ¶
func CfnReportGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnSourceCredential_CFN_RESOURCE_TYPE_NAME ¶
func CfnSourceCredential_CFN_RESOURCE_TYPE_NAME() *string
func CfnSourceCredential_IsCfnElement ¶
func CfnSourceCredential_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnSourceCredential_IsCfnResource ¶
func CfnSourceCredential_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnSourceCredential_IsConstruct ¶
func CfnSourceCredential_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func GitHubEnterpriseSourceCredentials_IsConstruct ¶
func GitHubEnterpriseSourceCredentials_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func GitHubEnterpriseSourceCredentials_IsOwnedResource ¶ added in v2.32.0
func GitHubEnterpriseSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func GitHubEnterpriseSourceCredentials_IsResource ¶
func GitHubEnterpriseSourceCredentials_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func GitHubSourceCredentials_IsConstruct ¶
func GitHubSourceCredentials_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func GitHubSourceCredentials_IsOwnedResource ¶ added in v2.32.0
func GitHubSourceCredentials_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func GitHubSourceCredentials_IsResource ¶
func GitHubSourceCredentials_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func NewArtifacts_Override ¶
func NewArtifacts_Override(a Artifacts, props *ArtifactsProps)
func NewBitBucketSourceCredentials_Override ¶
func NewBitBucketSourceCredentials_Override(b BitBucketSourceCredentials, scope constructs.Construct, id *string, props *BitBucketSourceCredentialsProps)
func NewBuildSpec_Override ¶
func NewBuildSpec_Override(b BuildSpec)
func NewCache_Override ¶
func NewCache_Override(c Cache)
func NewCfnFleet_Override ¶ added in v2.124.0
func NewCfnFleet_Override(c CfnFleet, scope constructs.Construct, id *string, props *CfnFleetProps)
func NewCfnProject_Override ¶
func NewCfnProject_Override(c CfnProject, scope constructs.Construct, id *string, props *CfnProjectProps)
func NewCfnReportGroup_Override ¶
func NewCfnReportGroup_Override(c CfnReportGroup, scope constructs.Construct, id *string, props *CfnReportGroupProps)
func NewCfnSourceCredential_Override ¶
func NewCfnSourceCredential_Override(c CfnSourceCredential, scope constructs.Construct, id *string, props *CfnSourceCredentialProps)
func NewFileSystemLocation_Override ¶
func NewFileSystemLocation_Override(f FileSystemLocation)
func NewGitHubEnterpriseSourceCredentials_Override ¶
func NewGitHubEnterpriseSourceCredentials_Override(g GitHubEnterpriseSourceCredentials, scope constructs.Construct, id *string, props *GitHubEnterpriseSourceCredentialsProps)
func NewGitHubSourceCredentials_Override ¶
func NewGitHubSourceCredentials_Override(g GitHubSourceCredentials, scope constructs.Construct, id *string, props *GitHubSourceCredentialsProps)
func NewPipelineProject_Override ¶
func NewPipelineProject_Override(p PipelineProject, scope constructs.Construct, id *string, props *PipelineProjectProps)
func NewProject_Override ¶
func NewProject_Override(p Project, scope constructs.Construct, id *string, props *ProjectProps)
func NewReportGroup_Override ¶
func NewReportGroup_Override(r ReportGroup, scope constructs.Construct, id *string, props *ReportGroupProps)
func NewSource_Override ¶
func NewSource_Override(s Source, props *SourceProps)
func NewUntrustedCodeBoundaryPolicy_Override ¶
func NewUntrustedCodeBoundaryPolicy_Override(u UntrustedCodeBoundaryPolicy, scope constructs.Construct, id *string, props *UntrustedCodeBoundaryPolicyProps)
func PhaseChangeEvent_BuildComplete ¶
func PhaseChangeEvent_BuildComplete() *string
func PhaseChangeEvent_BuildId ¶
func PhaseChangeEvent_BuildId() *string
func PhaseChangeEvent_CompletedPhase ¶
func PhaseChangeEvent_CompletedPhase() *string
func PhaseChangeEvent_CompletedPhaseDurationSeconds ¶
func PhaseChangeEvent_CompletedPhaseDurationSeconds() *string
func PhaseChangeEvent_CompletedPhaseStatus ¶
func PhaseChangeEvent_CompletedPhaseStatus() *string
func PhaseChangeEvent_ProjectName ¶
func PhaseChangeEvent_ProjectName() *string
func PipelineProject_IsConstruct ¶
func PipelineProject_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func PipelineProject_IsOwnedResource ¶ added in v2.32.0
func PipelineProject_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func PipelineProject_IsResource ¶
func PipelineProject_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func PipelineProject_SerializeEnvVariables ¶
func PipelineProject_SerializeEnvVariables(environmentVariables *map[string]*BuildEnvironmentVariable, validateNoPlainTextSecrets *bool, principal awsiam.IGrantable) *[]*CfnProject_EnvironmentVariableProperty
Convert the environment variables map of string to `BuildEnvironmentVariable`, which is the customer-facing type, to a list of `CfnProject.EnvironmentVariableProperty`, which is the representation of environment variables in CloudFormation.
Returns: an array of `CfnProject.EnvironmentVariableProperty` instances
func Project_IsConstruct ¶
func Project_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Project_IsOwnedResource ¶ added in v2.32.0
func Project_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Project_IsResource ¶
func Project_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func Project_SerializeEnvVariables ¶
func Project_SerializeEnvVariables(environmentVariables *map[string]*BuildEnvironmentVariable, validateNoPlainTextSecrets *bool, principal awsiam.IGrantable) *[]*CfnProject_EnvironmentVariableProperty
Convert the environment variables map of string to `BuildEnvironmentVariable`, which is the customer-facing type, to a list of `CfnProject.EnvironmentVariableProperty`, which is the representation of environment variables in CloudFormation.
Returns: an array of `CfnProject.EnvironmentVariableProperty` instances
func ReportGroup_IsConstruct ¶
func ReportGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func ReportGroup_IsOwnedResource ¶ added in v2.32.0
func ReportGroup_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func ReportGroup_IsResource ¶
func ReportGroup_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func StateChangeEvent_BuildId ¶
func StateChangeEvent_BuildId() *string
func StateChangeEvent_BuildStatus ¶
func StateChangeEvent_BuildStatus() *string
func StateChangeEvent_CurrentPhase ¶
func StateChangeEvent_CurrentPhase() *string
func StateChangeEvent_ProjectName ¶
func StateChangeEvent_ProjectName() *string
func UntrustedCodeBoundaryPolicy_FromAwsManagedPolicyName ¶
func UntrustedCodeBoundaryPolicy_FromAwsManagedPolicyName(managedPolicyName *string) awsiam.IManagedPolicy
Import a managed policy from one of the policies that AWS manages.
For this managed policy, you only need to know the name to be able to use it.
Some managed policy names start with "service-role/", some start with "job-function/", and some don't start with anything. Include the prefix when constructing this object.
func UntrustedCodeBoundaryPolicy_FromManagedPolicyArn ¶
func UntrustedCodeBoundaryPolicy_FromManagedPolicyArn(scope constructs.Construct, id *string, managedPolicyArn *string) awsiam.IManagedPolicy
Import an external managed policy by ARN.
For this managed policy, you only need to know the ARN to be able to use it. This can be useful if you got the ARN from a CloudFormation Export.
If the imported Managed Policy ARN is a Token (such as a `CfnParameter.valueAsString` or a `Fn.importValue()`) *and* the referenced managed policy has a `path` (like `arn:...:policy/AdminPolicy/AdminAllow`), the `managedPolicyName` property will not resolve to the correct value. Instead it will resolve to the first path component. We unfortunately cannot express the correct calculation of the full path name as a CloudFormation expression. In this scenario the Managed Policy ARN should be supplied without the `path` in order to resolve the correct managed policy resource.
func UntrustedCodeBoundaryPolicy_FromManagedPolicyName ¶
func UntrustedCodeBoundaryPolicy_FromManagedPolicyName(scope constructs.Construct, id *string, managedPolicyName *string) awsiam.IManagedPolicy
Import a customer managed policy from the managedPolicyName.
For this managed policy, you only need to know the name to be able to use it.
func UntrustedCodeBoundaryPolicy_IsConstruct ¶
func UntrustedCodeBoundaryPolicy_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func UntrustedCodeBoundaryPolicy_IsOwnedResource ¶ added in v2.32.0
func UntrustedCodeBoundaryPolicy_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func UntrustedCodeBoundaryPolicy_IsResource ¶
func UntrustedCodeBoundaryPolicy_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type Artifacts ¶
type Artifacts interface { IArtifacts // The artifact identifier. // // This property is required on secondary artifacts. Identifier() *string // The CodeBuild type of this artifact. Type() *string // Callback when an Artifacts class is used in a CodeBuild Project. Bind(_scope constructs.Construct, _project IProject) *ArtifactsConfig }
Artifacts definition for a CodeBuild Project.
Example:
var bucket bucket project := codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), }), Artifacts: codebuild.Artifacts_S3(&S3ArtifactsProps{ Bucket: *Bucket, IncludeBuildId: jsii.Boolean(false), PackageZip: jsii.Boolean(true), Path: jsii.String("another/path"), Identifier: jsii.String("AddArtifact1"), }), })
type ArtifactsConfig ¶
type ArtifactsConfig struct { // The low-level CloudFormation artifacts property. ArtifactsProperty *CfnProject_ArtifactsProperty `field:"required" json:"artifactsProperty" yaml:"artifactsProperty"` }
The type returned from `IArtifacts#bind`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" artifactsConfig := &ArtifactsConfig{ ArtifactsProperty: &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }
type ArtifactsProps ¶
type ArtifactsProps struct { // The artifact identifier. // // This property is required on secondary artifacts. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` }
Properties common to all Artifacts classes.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" artifactsProps := &ArtifactsProps{ Identifier: jsii.String("identifier"), }
type BatchBuildConfig ¶
type BatchBuildConfig struct { // The IAM batch service Role of this Project. Role awsiam.IRole `field:"required" json:"role" yaml:"role"` }
The type returned from `IProject#enableBatchBuilds`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var role role batchBuildConfig := &BatchBuildConfig{ Role: role, }
type BindToCodePipelineOptions ¶
type BindToCodePipelineOptions struct { // The artifact bucket that will be used by the action that invokes this project. ArtifactBucket awss3.IBucket `field:"required" json:"artifactBucket" yaml:"artifactBucket"` }
The extra options passed to the `IProject.bindToCodePipeline` method.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var bucket bucket bindToCodePipelineOptions := &BindToCodePipelineOptions{ ArtifactBucket: bucket, }
type BitBucketSourceCredentials ¶
type BitBucketSourceCredentials interface { awscdk.Resource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The source credentials used when contacting the BitBucket API.
**Note**: CodeBuild only allows a single credential for BitBucket to be saved in a given AWS account in a given region - any attempt to add more than one will result in an error.
Example:
codebuild.NewBitBucketSourceCredentials(this, jsii.String("CodeBuildBitBucketCreds"), &BitBucketSourceCredentialsProps{ Username: awscdk.SecretValue_SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{ JsonField: jsii.String("username"), }), Password: awscdk.SecretValue_*SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{ JsonField: jsii.String("password"), }), })
func NewBitBucketSourceCredentials ¶
func NewBitBucketSourceCredentials(scope constructs.Construct, id *string, props *BitBucketSourceCredentialsProps) BitBucketSourceCredentials
type BitBucketSourceCredentialsProps ¶
type BitBucketSourceCredentialsProps struct { // Your BitBucket application password. Password awscdk.SecretValue `field:"required" json:"password" yaml:"password"` // Your BitBucket username. Username awscdk.SecretValue `field:"required" json:"username" yaml:"username"` }
Construction properties of `BitBucketSourceCredentials`.
Example:
codebuild.NewBitBucketSourceCredentials(this, jsii.String("CodeBuildBitBucketCreds"), &BitBucketSourceCredentialsProps{ Username: awscdk.SecretValue_SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{ JsonField: jsii.String("username"), }), Password: awscdk.SecretValue_*SecretsManager(jsii.String("my-bitbucket-creds"), &SecretsManagerSecretOptions{ JsonField: jsii.String("password"), }), })
type BitBucketSourceProps ¶
type BitBucketSourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` // The BitBucket account/user that owns the repo. // // Example: // "awslabs" // Owner *string `field:"required" json:"owner" yaml:"owner"` // The name of the repo (without the username). // // Example: // "aws-cdk" // Repo *string `field:"required" json:"repo" yaml:"repo"` // The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. // // Example: // "mybranch" // // Default: the default branch's HEAD commit ID is used. // BranchOrRef *string `field:"optional" json:"branchOrRef" yaml:"branchOrRef"` // This parameter is used for the `name` parameter in the Bitbucket commit status. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "My build #$CODEBUILD_BUILD_NUMBER" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)". // BuildStatusName *string `field:"optional" json:"buildStatusName" yaml:"buildStatusName"` // The URL that the build will report back to the source provider. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "$CODEBUILD_PUBLIC_BUILD_URL" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: - link to the AWS Console for CodeBuild to a particular build execution. // BuildStatusUrl *string `field:"optional" json:"buildStatusUrl" yaml:"buildStatusUrl"` // 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 of the project. CloneDepth *float64 `field:"optional" json:"cloneDepth" yaml:"cloneDepth"` // Whether to fetch submodules while cloning git repo. // Default: false. // FetchSubmodules *bool `field:"optional" json:"fetchSubmodules" yaml:"fetchSubmodules"` // Whether to send notifications on your build's start and end. // Default: true. // ReportBuildStatus *bool `field:"optional" json:"reportBuildStatus" yaml:"reportBuildStatus"` // Whether to create a webhook that will trigger a build every time an event happens in the repository. // Default: true if any `webhookFilters` were provided, false otherwise. // Webhook *bool `field:"optional" json:"webhook" yaml:"webhook"` // A list of webhook filters that can constraint what events in the repository will trigger a build. // // A build is triggered if any of the provided filter groups match. // Only valid if `webhook` was not provided as false. // Default: every push and every Pull Request (create or update) triggers a build. // WebhookFilters *[]FilterGroup `field:"optional" json:"webhookFilters" yaml:"webhookFilters"` // Trigger a batch build from a webhook instead of a standard one. // // Enabling this will enable batch builds on the CodeBuild project. // Default: false. // WebhookTriggersBatchBuild *bool `field:"optional" json:"webhookTriggersBatchBuild" yaml:"webhookTriggersBatchBuild"` }
Construction properties for `BitBucketSource`.
Example:
bbSource := codebuild.Source_BitBucket(&BitBucketSourceProps{ Owner: jsii.String("owner"), Repo: jsii.String("repo"), })
type BucketCacheOptions ¶
type BucketCacheOptions struct { // The prefix to use to store the cache in the bucket. Prefix *string `field:"optional" json:"prefix" yaml:"prefix"` }
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" bucketCacheOptions := &BucketCacheOptions{ Prefix: jsii.String("prefix"), }
type BuildEnvironment ¶
type BuildEnvironment struct { // The image used for the builds. // Default: LinuxBuildImage.STANDARD_1_0 // BuildImage IBuildImage `field:"optional" json:"buildImage" yaml:"buildImage"` // The location of the PEM-encoded certificate for the build project. // Default: - No external certificate is added to the project. // Certificate *BuildEnvironmentCertificate `field:"optional" json:"certificate" yaml:"certificate"` // The type of compute to use for this build. // // See the `ComputeType` enum for the possible values. // Default: taken from `#buildImage#defaultComputeType`. // ComputeType ComputeType `field:"optional" json:"computeType" yaml:"computeType"` // The environment variables that your builds can use. EnvironmentVariables *map[string]*BuildEnvironmentVariable `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // Indicates how the project builds Docker images. // // Specify true to enable // running the Docker daemon inside a Docker container. This value must be // set to true only if this build project will be used to build Docker // images, and the specified build environment image is not one provided by // AWS CodeBuild with Docker support. Otherwise, all associated builds that // attempt to interact with the Docker daemon will fail. // Default: false. // Privileged *bool `field:"optional" json:"privileged" yaml:"privileged"` }
Example:
pipeline := pipelines.NewCodePipeline(this, jsii.String("Pipeline"), &CodePipelineProps{ Synth: pipelines.NewShellStep(jsii.String("Synth"), &ShellStepProps{ Input: pipelines.CodePipelineSource_Connection(jsii.String("my-org/my-app"), jsii.String("main"), &ConnectionSourceOptions{ ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"), }), Commands: []*string{ jsii.String("npm ci"), jsii.String("npm run build"), jsii.String("npx cdk synth"), }, }), // Turn this on because the pipeline uses Docker image assets DockerEnabledForSelfMutation: jsii.Boolean(true), }) pipeline.AddWave(jsii.String("MyWave"), &WaveOptions{ Post: []step{ pipelines.NewCodeBuildStep(jsii.String("RunApproval"), &CodeBuildStepProps{ Commands: []*string{ jsii.String("command-from-image"), }, BuildEnvironment: &BuildEnvironment{ // The user of a Docker image asset in the pipeline requires turning on // 'dockerEnabledForSelfMutation'. BuildImage: codebuild.LinuxBuildImage_FromAsset(this, jsii.String("Image"), &DockerImageAssetProps{ Directory: jsii.String("./docker-image"), }), }, }), }, })
type BuildEnvironmentCertificate ¶
type BuildEnvironmentCertificate struct { // The bucket where the certificate is. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The full path and name of the key file. ObjectKey *string `field:"required" json:"objectKey" yaml:"objectKey"` }
Location of a PEM certificate on S3.
Example:
var ecrRepository repository codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.WindowsBuildImage_FromEcrRepository(ecrRepository, jsii.String("v1.0"), codebuild.WindowsImageType_SERVER_2019), // optional certificate to include in the build image Certificate: &BuildEnvironmentCertificate{ Bucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("my-bucket")), ObjectKey: jsii.String("path/to/cert.pem"), }, }, })
type BuildEnvironmentVariable ¶
type BuildEnvironmentVariable struct { // The value of the environment variable. // // For plain-text variables (the default), this is the literal value of variable. // For SSM parameter variables, pass the name of the parameter here (`parameterName` property of `IParameter`). // For SecretsManager variables secrets, pass either the secret name (`secretName` property of `ISecret`) // or the secret ARN (`secretArn` property of `ISecret`) here, // along with optional SecretsManager qualifiers separated by ':', like the JSON key, or the version or stage // (see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager for details). Value interface{} `field:"required" json:"value" yaml:"value"` // The type of environment variable. // Default: PlainText. // Type BuildEnvironmentVariableType `field:"optional" json:"type" yaml:"type"` }
Example:
// later: var project pipelineProject sourceOutput := codepipeline.NewArtifact() buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{ ActionName: jsii.String("Build1"), Input: sourceOutput, Project: codebuild.NewPipelineProject(this, jsii.String("Project"), &PipelineProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "env": map[string][]*string{ "exported-variables": []*string{ jsii.String("MY_VAR"), }, }, "phases": map[string]map[string]*string{ "build": map[string]*string{ "commands": jsii.String("export MY_VAR=\"some value\""), }, }, }), }), VariablesNamespace: jsii.String("MyNamespace"), }) codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{ ActionName: jsii.String("CodeBuild"), Project: Project, Input: sourceOutput, EnvironmentVariables: map[string]buildEnvironmentVariable{ "MyVar": &buildEnvironmentVariable{ "value": buildAction.variable(jsii.String("MY_VAR")), }, }, })
type BuildEnvironmentVariableType ¶
type BuildEnvironmentVariableType string
Example:
import "github.com/aws/aws-cdk-go/awscdk" codebuildProject := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ ProjectName: jsii.String("MyTestProject"), BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("echo \"Hello, CodeBuild!\""), }, }, }, }), }) task := tasks.NewCodeBuildStartBuild(this, jsii.String("Task"), &CodeBuildStartBuildProps{ Project: codebuildProject, IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "ZONE": &buildEnvironmentVariable{ "type": codebuild.BuildEnvironmentVariableType_PLAINTEXT, "value": sfn.JsonPath_stringAt(jsii.String("$.envVariables.zone")), }, }, })
const ( // An environment variable in plaintext format. BuildEnvironmentVariableType_PLAINTEXT BuildEnvironmentVariableType = "PLAINTEXT" // An environment variable stored in Systems Manager Parameter Store. BuildEnvironmentVariableType_PARAMETER_STORE BuildEnvironmentVariableType = "PARAMETER_STORE" // An environment variable stored in AWS Secrets Manager. BuildEnvironmentVariableType_SECRETS_MANAGER BuildEnvironmentVariableType = "SECRETS_MANAGER" )
type BuildImageBindOptions ¶
type BuildImageBindOptions struct { }
Optional arguments to `IBuildImage.binder` - currently empty.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" buildImageBindOptions := &BuildImageBindOptions{ }
type BuildImageConfig ¶
type BuildImageConfig struct { }
The return type from `IBuildImage.binder` - currently empty.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" buildImageConfig := &BuildImageConfig{ }
type BuildSpec ¶
type BuildSpec interface { // Whether the buildspec is directly available or deferred until build-time. IsImmediate() *bool // Render the represented BuildSpec. ToBuildSpec(scope constructs.Construct) *string }
BuildSpec for CodeBuild projects.
Example:
import "github.com/aws/aws-cdk-go/awscdk" codebuildProject := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ ProjectName: jsii.String("MyTestProject"), BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("echo \"Hello, CodeBuild!\""), }, }, }, }), }) task := tasks.NewCodeBuildStartBuild(this, jsii.String("Task"), &CodeBuildStartBuildProps{ Project: codebuildProject, IntegrationPattern: sfn.IntegrationPattern_RUN_JOB, EnvironmentVariablesOverride: map[string]buildEnvironmentVariable{ "ZONE": &buildEnvironmentVariable{ "type": codebuild.BuildEnvironmentVariableType_PLAINTEXT, "value": sfn.JsonPath_stringAt(jsii.String("$.envVariables.zone")), }, }, })
func BuildSpec_FromAsset ¶ added in v2.67.0
Use the contents of a local file as the build spec string.
Use this if you have a local .yml or .json file that you want to use as the buildspec
func BuildSpec_FromObject ¶
func BuildSpec_FromObjectToYaml ¶
Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
func BuildSpec_FromSourceFilename ¶
Use a file from the source as buildspec.
Use this if you want to use a file different from 'buildspec.yml'`
type Cache ¶
type Cache interface { }
Cache options for CodeBuild Project.
A cache can store reusable pieces of your build environment and use them across multiple builds.
Example:
var myCachingBucket bucket codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: codebuild.Source_BitBucket(&BitBucketSourceProps{ Owner: jsii.String("awslabs"), Repo: jsii.String("aws-cdk"), }), Cache: codebuild.Cache_Bucket(myCachingBucket), // BuildSpec with a 'cache' section necessary for S3 caching. This can // also come from 'buildspec.yml' in your source. BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("..."), }, }, }, "cache": map[string][]*string{ "paths": []*string{ jsii.String("/root/cachedir/**/*"), }, }, }), })
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-caching.html
func Cache_Bucket ¶
func Cache_Bucket(bucket awss3.IBucket, options *BucketCacheOptions) Cache
Create an S3 caching strategy.
func Cache_None ¶
func Cache_None() Cache
type CfnFleet ¶ added in v2.124.0
type CfnFleet interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggableV2 // The ARN of the compute fleet. AttrArn() *string // The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel. BaseCapacity() *float64 SetBaseCapacity(val *float64) // Tag Manager which manages the tags for this resource. CdkTagManager() awscdk.TagManager // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Information about the compute resources the compute fleet uses. // // Available values include:. ComputeType() *string SetComputeType(val *string) // Returns: 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. CreationStack() *[]*string // The environment type of the compute fleet. EnvironmentType() *string SetEnvironmentType(val *string) // 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. LogicalId() *string // The name of the compute fleet. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // 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 })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // A list of tag key and value pairs associated with this compute fleet. Tags() *[]*awscdk.CfnTag SetTags(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "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, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will 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. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // 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:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // 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. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // 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. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::CodeBuild::Fleet` resource configures a compute fleet, a set of dedicated instances for your build environment.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnFleet := awscdk.Aws_codebuild.NewCfnFleet(this, jsii.String("MyCfnFleet"), &CfnFleetProps{ BaseCapacity: jsii.Number(123), ComputeType: jsii.String("computeType"), EnvironmentType: jsii.String("environmentType"), Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html
func NewCfnFleet ¶ added in v2.124.0
func NewCfnFleet(scope constructs.Construct, id *string, props *CfnFleetProps) CfnFleet
type CfnFleetProps ¶ added in v2.124.0
type CfnFleetProps struct { // The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html#cfn-codebuild-fleet-basecapacity // BaseCapacity *float64 `field:"optional" json:"baseCapacity" yaml:"baseCapacity"` // Information about the compute resources the compute fleet uses. Available values include:. // // - `BUILD_GENERAL1_SMALL` : Use up to 3 GB memory and 2 vCPUs for builds. // - `BUILD_GENERAL1_MEDIUM` : Use up to 7 GB memory and 4 vCPUs for builds. // - `BUILD_GENERAL1_LARGE` : Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. // - `BUILD_GENERAL1_XLARGE` : Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. // - `BUILD_GENERAL1_2XLARGE` : Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute type supports Docker images up to 100 GB uncompressed. // // If you use `BUILD_GENERAL1_SMALL` : // // - For environment type `LINUX_CONTAINER` , you can use up to 3 GB memory and 2 vCPUs for builds. // - For environment type `LINUX_GPU_CONTAINER` , you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. // - For environment type `ARM_CONTAINER` , you can use up to 4 GB 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 15 GB memory and 8 vCPUs for builds. // - For environment type `LINUX_GPU_CONTAINER` , you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. // - For environment type `ARM_CONTAINER` , you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for builds. // // For more information, see [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild User Guide.* // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html#cfn-codebuild-fleet-computetype // ComputeType *string `field:"optional" json:"computeType" yaml:"computeType"` // The environment type of the compute fleet. // // - The environment type `ARM_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), EU (Frankfurt), and South America (São Paulo). // - The environment type `LINUX_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America (São Paulo), and Asia Pacific (Mumbai). // - The environment type `LINUX_GPU_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). // - The environment type `WINDOWS_SERVER_2019_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). // - The environment type `WINDOWS_SERVER_2022_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai). // // For more information, see [Build environment compute types](https://docs.aws.amazon.com//codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild user guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html#cfn-codebuild-fleet-environmenttype // EnvironmentType *string `field:"optional" json:"environmentType" yaml:"environmentType"` // The name of the compute fleet. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html#cfn-codebuild-fleet-name // Name *string `field:"optional" json:"name" yaml:"name"` // A list of tag key and value pairs associated with this compute fleet. // // These tags are available for use by AWS services that support AWS CodeBuild compute fleet tags. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html#cfn-codebuild-fleet-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnFleet`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnFleetProps := &CfnFleetProps{ BaseCapacity: jsii.Number(123), ComputeType: jsii.String("computeType"), EnvironmentType: jsii.String("environmentType"), Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-fleet.html
type CfnProject ¶
type CfnProject interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable // `Artifacts` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies output settings for artifacts generated by an AWS CodeBuild build. Artifacts() interface{} SetArtifacts(val interface{}) // The ARN of the AWS CodeBuild project, such as `arn:aws:codebuild:us-west-2:123456789012:project/myProjectName` . AttrArn() *string AttrId() *string // Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. BadgeEnabled() interface{} SetBadgeEnabled(val interface{}) // A `ProjectBuildBatchConfig` object that defines the batch build options for the project. BuildBatchConfig() interface{} SetBuildBatchConfig(val interface{}) // Settings that AWS CodeBuild uses to store and reuse build dependencies. Cache() interface{} SetCache(val interface{}) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // The maximum number of concurrent builds that are allowed for this project. ConcurrentBuildLimit() *float64 SetConcurrentBuildLimit(val *float64) // Returns: 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. CreationStack() *[]*string // A description that makes the build project easy to identify. Description() *string SetDescription(val *string) // The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. EncryptionKey() *string SetEncryptionKey(val *string) // The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. Environment() interface{} SetEnvironment(val interface{}) // An array of `ProjectFileSystemLocation` objects for a CodeBuild build project. FileSystemLocations() interface{} SetFileSystemLocations(val interface{}) // 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. LogicalId() *string // Information about logs for the build project. LogsConfig() interface{} SetLogsConfig(val interface{}) // The name of the build project. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // The number of minutes a build is allowed to be queued before it times out. QueuedTimeoutInMinutes() *float64 SetQueuedTimeoutInMinutes(val *float64) // 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 })`. Ref() *string // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds. ResourceAccessRole() *string SetResourceAccessRole(val *string) // A list of `Artifacts` objects. SecondaryArtifacts() interface{} SetSecondaryArtifacts(val interface{}) // An array of `ProjectSource` objects. SecondarySources() interface{} SetSecondarySources(val interface{}) // An array of `ProjectSourceVersion` objects. SecondarySourceVersions() interface{} SetSecondarySourceVersions(val interface{}) // The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. ServiceRole() *string SetServiceRole(val *string) // The source code settings for the project, such as the source code's repository type and location. Source() interface{} SetSource(val interface{}) // A version of the build input to be built for this project. SourceVersion() *string SetSourceVersion(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. TimeoutInMinutes() *float64 SetTimeoutInMinutes(val *float64) // 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. Triggers() interface{} SetTriggers(val interface{}) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Specifies the visibility of the project's builds. // // Possible values are:. Visibility() *string SetVisibility(val *string) // `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC. VpcConfig() interface{} SetVpcConfig(val interface{}) // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "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, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will 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. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // 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:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // 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. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // 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. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::CodeBuild::Project` resource configures how AWS CodeBuild builds your source code.
For example, it tells CodeBuild where to get the source code and which build environment to use.
> To unset or remove a project value via CFN, explicitly provide the attribute with value as empty input.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnProject := awscdk.Aws_codebuild.NewCfnProject(this, jsii.String("MyCfnProject"), &CfnProjectProps{ Artifacts: &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, Environment: &EnvironmentProperty{ ComputeType: jsii.String("computeType"), Image: jsii.String("image"), Type: jsii.String("type"), // the properties below are optional Certificate: jsii.String("certificate"), EnvironmentVariables: []interface{}{ &EnvironmentVariableProperty{ Name: jsii.String("name"), Value: jsii.String("value"), // the properties below are optional Type: jsii.String("type"), }, }, Fleet: &ProjectFleetProperty{ FleetArn: jsii.String("fleetArn"), }, ImagePullCredentialsType: jsii.String("imagePullCredentialsType"), PrivilegedMode: jsii.Boolean(false), RegistryCredential: &RegistryCredentialProperty{ Credential: jsii.String("credential"), CredentialProvider: jsii.String("credentialProvider"), }, }, ServiceRole: jsii.String("serviceRole"), Source: &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }, // the properties below are optional BadgeEnabled: jsii.Boolean(false), BuildBatchConfig: &ProjectBuildBatchConfigProperty{ BatchReportMode: jsii.String("batchReportMode"), CombineArtifacts: jsii.Boolean(false), Restrictions: &BatchRestrictionsProperty{ ComputeTypesAllowed: []*string{ jsii.String("computeTypesAllowed"), }, MaximumBuildsAllowed: jsii.Number(123), }, ServiceRole: jsii.String("serviceRole"), TimeoutInMins: jsii.Number(123), }, Cache: &ProjectCacheProperty{ Type: jsii.String("type"), // the properties below are optional Location: jsii.String("location"), Modes: []*string{ jsii.String("modes"), }, }, ConcurrentBuildLimit: jsii.Number(123), Description: jsii.String("description"), EncryptionKey: jsii.String("encryptionKey"), FileSystemLocations: []interface{}{ &ProjectFileSystemLocationProperty{ Identifier: jsii.String("identifier"), Location: jsii.String("location"), MountPoint: jsii.String("mountPoint"), Type: jsii.String("type"), // the properties below are optional MountOptions: jsii.String("mountOptions"), }, }, LogsConfig: &LogsConfigProperty{ CloudWatchLogs: &CloudWatchLogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional GroupName: jsii.String("groupName"), StreamName: jsii.String("streamName"), }, S3Logs: &S3LogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), }, }, Name: jsii.String("name"), QueuedTimeoutInMinutes: jsii.Number(123), ResourceAccessRole: jsii.String("resourceAccessRole"), SecondaryArtifacts: []interface{}{ &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }, SecondarySources: []interface{}{ &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }, }, SecondarySourceVersions: []interface{}{ &ProjectSourceVersionProperty{ SourceIdentifier: jsii.String("sourceIdentifier"), // the properties below are optional SourceVersion: jsii.String("sourceVersion"), }, }, SourceVersion: jsii.String("sourceVersion"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TimeoutInMinutes: jsii.Number(123), Triggers: &ProjectTriggersProperty{ BuildType: jsii.String("buildType"), FilterGroups: []interface{}{ []interface{}{ &WebhookFilterProperty{ Pattern: jsii.String("pattern"), Type: jsii.String("type"), // the properties below are optional ExcludeMatchedPattern: jsii.Boolean(false), }, }, }, Webhook: jsii.Boolean(false), }, Visibility: jsii.String("visibility"), VpcConfig: &VpcConfigProperty{ SecurityGroupIds: []*string{ jsii.String("securityGroupIds"), }, Subnets: []*string{ jsii.String("subnets"), }, VpcId: jsii.String("vpcId"), }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
func NewCfnProject ¶
func NewCfnProject(scope constructs.Construct, id *string, props *CfnProjectProps) CfnProject
type CfnProjectProps ¶
type CfnProjectProps struct { // `Artifacts` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies output settings for artifacts generated by an AWS CodeBuild build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-artifacts // Artifacts interface{} `field:"required" json:"artifacts" yaml:"artifacts"` // The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-environment // Environment interface{} `field:"required" json:"environment" yaml:"environment"` // The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-servicerole // ServiceRole *string `field:"required" json:"serviceRole" yaml:"serviceRole"` // The source code settings for the project, such as the source code's repository type and location. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-source // Source interface{} `field:"required" json:"source" yaml:"source"` // Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. // // For more information, see [Build Badges Sample](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-badges.html) in the *AWS CodeBuild User Guide* . // // > Including build badges with your project is currently not supported if the source type is CodePipeline. If you specify `CODEPIPELINE` for the `Source` property, do not specify the `BadgeEnabled` property. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-badgeenabled // BadgeEnabled interface{} `field:"optional" json:"badgeEnabled" yaml:"badgeEnabled"` // A `ProjectBuildBatchConfig` object that defines the batch build options for the project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-buildbatchconfig // BuildBatchConfig interface{} `field:"optional" json:"buildBatchConfig" yaml:"buildBatchConfig"` // Settings that AWS CodeBuild uses to store and reuse build dependencies. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-cache // Cache interface{} `field:"optional" json:"cache" yaml:"cache"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-concurrentbuildlimit // ConcurrentBuildLimit *float64 `field:"optional" json:"concurrentBuildLimit" yaml:"concurrentBuildLimit"` // A description that makes the build project easy to identify. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-description // Description *string `field:"optional" json:"description" yaml:"description"` // The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. // // > You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key. // // You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format `alias/<alias-name>` ). If you don't specify a value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon S3). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-encryptionkey // EncryptionKey *string `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // An array of `ProjectFileSystemLocation` objects for a CodeBuild build project. // // A `ProjectFileSystemLocation` object specifies the `identifier` , `location` , `mountOptions` , `mountPoint` , and `type` of a file system created using Amazon Elastic File System. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-filesystemlocations // FileSystemLocations interface{} `field:"optional" json:"fileSystemLocations" yaml:"fileSystemLocations"` // Information about logs for the build project. // // A project can create logs in CloudWatch Logs, an S3 bucket, or both. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-logsconfig // LogsConfig interface{} `field:"optional" json:"logsConfig" yaml:"logsConfig"` // The name of the build project. // // The name must be unique across all of the projects in your AWS account . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-name // Name *string `field:"optional" json:"name" yaml:"name"` // The number of minutes a build is allowed to be queued before it times out. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-queuedtimeoutinminutes // QueuedTimeoutInMinutes *float64 `field:"optional" json:"queuedTimeoutInMinutes" yaml:"queuedTimeoutInMinutes"` // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-resourceaccessrole // ResourceAccessRole *string `field:"optional" json:"resourceAccessRole" yaml:"resourceAccessRole"` // A list of `Artifacts` objects. // // Each artifacts object specifies output settings that the project generates during a build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-secondaryartifacts // SecondaryArtifacts interface{} `field:"optional" json:"secondaryArtifacts" yaml:"secondaryArtifacts"` // An array of `ProjectSource` objects. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-secondarysources // SecondarySources interface{} `field:"optional" json:"secondarySources" yaml:"secondarySources"` // An array of `ProjectSourceVersion` objects. // // If `secondarySourceVersions` is specified at the build level, then they take over these `secondarySourceVersions` (at the project level). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-secondarysourceversions // SecondarySourceVersions interface{} `field:"optional" json:"secondarySourceVersions" yaml:"secondarySourceVersions"` // A version of the build input to be built for this project. // // If not specified, the latest version is used. If specified, it must be one of: // // - For CodeCommit: the commit ID, branch, or Git tag to use. // - For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format `pr/pull-request-ID` (for example `pr/25` ). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. // - For Amazon S3: the version ID of the object that represents the build input ZIP file to use. // // If `sourceVersion` is specified at the build level, then that version takes precedence over this `sourceVersion` (at the project level). // // For more information, see [Source Version Sample with CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-sourceversion // SourceVersion *string `field:"optional" json:"sourceVersion" yaml:"sourceVersion"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. // // The default is 60 minutes. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-timeoutinminutes // TimeoutInMinutes *float64 `field:"optional" json:"timeoutInMinutes" yaml:"timeoutInMinutes"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-triggers // Triggers interface{} `field:"optional" json:"triggers" yaml:"triggers"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-visibility // Visibility *string `field:"optional" json:"visibility" yaml:"visibility"` // `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC. // // For more information, see [Use AWS CodeBuild with Amazon Virtual Private Cloud](https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-vpcconfig // VpcConfig interface{} `field:"optional" json:"vpcConfig" yaml:"vpcConfig"` }
Properties for defining a `CfnProject`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnProjectProps := &CfnProjectProps{ Artifacts: &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, Environment: &EnvironmentProperty{ ComputeType: jsii.String("computeType"), Image: jsii.String("image"), Type: jsii.String("type"), // the properties below are optional Certificate: jsii.String("certificate"), EnvironmentVariables: []interface{}{ &EnvironmentVariableProperty{ Name: jsii.String("name"), Value: jsii.String("value"), // the properties below are optional Type: jsii.String("type"), }, }, Fleet: &ProjectFleetProperty{ FleetArn: jsii.String("fleetArn"), }, ImagePullCredentialsType: jsii.String("imagePullCredentialsType"), PrivilegedMode: jsii.Boolean(false), RegistryCredential: &RegistryCredentialProperty{ Credential: jsii.String("credential"), CredentialProvider: jsii.String("credentialProvider"), }, }, ServiceRole: jsii.String("serviceRole"), Source: &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }, // the properties below are optional BadgeEnabled: jsii.Boolean(false), BuildBatchConfig: &ProjectBuildBatchConfigProperty{ BatchReportMode: jsii.String("batchReportMode"), CombineArtifacts: jsii.Boolean(false), Restrictions: &BatchRestrictionsProperty{ ComputeTypesAllowed: []*string{ jsii.String("computeTypesAllowed"), }, MaximumBuildsAllowed: jsii.Number(123), }, ServiceRole: jsii.String("serviceRole"), TimeoutInMins: jsii.Number(123), }, Cache: &ProjectCacheProperty{ Type: jsii.String("type"), // the properties below are optional Location: jsii.String("location"), Modes: []*string{ jsii.String("modes"), }, }, ConcurrentBuildLimit: jsii.Number(123), Description: jsii.String("description"), EncryptionKey: jsii.String("encryptionKey"), FileSystemLocations: []interface{}{ &ProjectFileSystemLocationProperty{ Identifier: jsii.String("identifier"), Location: jsii.String("location"), MountPoint: jsii.String("mountPoint"), Type: jsii.String("type"), // the properties below are optional MountOptions: jsii.String("mountOptions"), }, }, LogsConfig: &LogsConfigProperty{ CloudWatchLogs: &CloudWatchLogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional GroupName: jsii.String("groupName"), StreamName: jsii.String("streamName"), }, S3Logs: &S3LogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), }, }, Name: jsii.String("name"), QueuedTimeoutInMinutes: jsii.Number(123), ResourceAccessRole: jsii.String("resourceAccessRole"), SecondaryArtifacts: []interface{}{ &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }, SecondarySources: []interface{}{ &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }, }, SecondarySourceVersions: []interface{}{ &ProjectSourceVersionProperty{ SourceIdentifier: jsii.String("sourceIdentifier"), // the properties below are optional SourceVersion: jsii.String("sourceVersion"), }, }, SourceVersion: jsii.String("sourceVersion"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, TimeoutInMinutes: jsii.Number(123), Triggers: &ProjectTriggersProperty{ BuildType: jsii.String("buildType"), FilterGroups: []interface{}{ []interface{}{ &WebhookFilterProperty{ Pattern: jsii.String("pattern"), Type: jsii.String("type"), // the properties below are optional ExcludeMatchedPattern: jsii.Boolean(false), }, }, }, Webhook: jsii.Boolean(false), }, Visibility: jsii.String("visibility"), VpcConfig: &VpcConfigProperty{ SecurityGroupIds: []*string{ jsii.String("securityGroupIds"), }, Subnets: []*string{ jsii.String("subnets"), }, VpcId: jsii.String("vpcId"), }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
type CfnProject_ArtifactsProperty ¶
type CfnProject_ArtifactsProperty struct { // The type of build output artifact. Valid values include:. // // - `CODEPIPELINE` : The build project has build output generated through CodePipeline. // // > The `CODEPIPELINE` type is not supported for `secondaryArtifacts` . // - `NO_ARTIFACTS` : The build project does not produce any build output. // - `S3` : The build project stores build output in Amazon S3. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-type // Type *string `field:"required" json:"type" yaml:"type"` // An identifier for this artifact definition. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-artifactidentifier // ArtifactIdentifier *string `field:"optional" json:"artifactIdentifier" yaml:"artifactIdentifier"` // 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 `invalidInputException` is thrown. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-encryptiondisabled // EncryptionDisabled interface{} `field:"optional" json:"encryptionDisabled" yaml:"encryptionDisabled"` // Information about the build output artifact location:. // // - If `type` is set to `CODEPIPELINE` , AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild . // - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. // - If `type` is set to `S3` , this is the name of the output bucket. // // If you specify `CODEPIPELINE` or `NO_ARTIFACTS` for the `Type` property, don't specify this property. For all of the other types, you must specify this property. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-location // Location *string `field:"optional" json:"location" yaml:"location"` // Along with `path` and `namespaceType` , the pattern that AWS CodeBuild uses to name and store the output artifact:. // // - If `type` is set to `CODEPIPELINE` , AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . // - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. // - If `type` is set to `S3` , 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 `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to `MyArtifact.zip` , then the output artifact is stored in `MyArtifacts/ *build-ID* /MyArtifact.zip` . // - If `path` is empty, `namespaceType` is set to `NONE` , and `name` is set to " `/` ", the output artifact is stored in the root of the output bucket. // - If `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to " `/` ", the output artifact is stored in `MyArtifacts/ *build-ID*` . // // If you specify `CODEPIPELINE` or `NO_ARTIFACTS` for the `Type` property, don't specify this property. For all of the other types, you must specify this property. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-name // Name *string `field:"optional" json:"name" yaml:"name"` // Along with `path` and `name` , the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact: - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. // // This is because CodePipeline manages its build output names instead of AWS CodeBuild . // - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. // - If `type` is set to `S3` , 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 if `namespaceType` is not specified. // // For example, if `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to `MyArtifact.zip` , the output artifact is stored in `MyArtifacts/<build-ID>/MyArtifact.zip` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-namespacetype // NamespaceType *string `field:"optional" json:"namespaceType" yaml:"namespaceType"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-overrideartifactname // OverrideArtifactName interface{} `field:"optional" json:"overrideArtifactName" yaml:"overrideArtifactName"` // The type of build output artifact to create:. // // - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of AWS CodeBuild . // - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. // - If `type` is set to `S3` , valid values include: // // - `NONE` : AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if `packaging` is not specified. // - `ZIP` : AWS CodeBuild creates in the output bucket a ZIP file that contains the build output. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-packaging // Packaging *string `field:"optional" json:"packaging" yaml:"packaging"` // Along with `namespaceType` and `name` , the pattern that AWS CodeBuild uses to name and store the output artifact:. // // - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . // - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. // - If `type` is set to `S3` , this is the path to the output artifact. If `path` is not specified, `path` is not used. // // For example, if `path` is set to `MyArtifacts` , `namespaceType` is set to `NONE` , and `name` is set to `MyArtifact.zip` , the output artifact is stored in the output bucket at `MyArtifacts/MyArtifact.zip` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-path // Path *string `field:"optional" json:"path" yaml:"path"` }
`Artifacts` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" artifactsProperty := &ArtifactsProperty{ Type: jsii.String("type"), // the properties below are optional ArtifactIdentifier: jsii.String("artifactIdentifier"), EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), Name: jsii.String("name"), NamespaceType: jsii.String("namespaceType"), OverrideArtifactName: jsii.Boolean(false), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }
type CfnProject_BatchRestrictionsProperty ¶
type CfnProject_BatchRestrictionsProperty struct { // An array of strings that specify the compute types that are allowed for the batch build. // // See [Build environment compute types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild User Guide* for these values. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-batchrestrictions.html#cfn-codebuild-project-batchrestrictions-computetypesallowed // ComputeTypesAllowed *[]*string `field:"optional" json:"computeTypesAllowed" yaml:"computeTypesAllowed"` // Specifies the maximum number of builds allowed. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-batchrestrictions.html#cfn-codebuild-project-batchrestrictions-maximumbuildsallowed // MaximumBuildsAllowed *float64 `field:"optional" json:"maximumBuildsAllowed" yaml:"maximumBuildsAllowed"` }
Specifies restrictions for the batch build.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" batchRestrictionsProperty := &BatchRestrictionsProperty{ ComputeTypesAllowed: []*string{ jsii.String("computeTypesAllowed"), }, MaximumBuildsAllowed: jsii.Number(123), }
type CfnProject_BuildStatusConfigProperty ¶
type CfnProject_BuildStatusConfigProperty struct { // 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 `name` parameter in the Bitbucket commit status. For more information, see [build](https://docs.aws.amazon.com/https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build) in the Bitbucket API documentation. // - **GitHub/GitHub Enterprise Server** - This parameter is used for the `context` parameter in the GitHub commit status. For more information, see [Create a commit status](https://docs.aws.amazon.com/https://developer.github.com/v3/repos/statuses/#create-a-commit-status) in the GitHub developer guide. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html#cfn-codebuild-project-buildstatusconfig-context // Context *string `field:"optional" json:"context" yaml:"context"` // 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 `url` parameter in the Bitbucket commit status. For more information, see [build](https://docs.aws.amazon.com/https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build) in the Bitbucket API documentation. // - **GitHub/GitHub Enterprise Server** - This parameter is used for the `target_url` parameter in the GitHub commit status. For more information, see [Create a commit status](https://docs.aws.amazon.com/https://developer.github.com/v3/repos/statuses/#create-a-commit-status) in the GitHub developer guide. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html#cfn-codebuild-project-buildstatusconfig-targeturl // TargetUrl *string `field:"optional" json:"targetUrl" yaml:"targetUrl"` }
Contains information that defines how the AWS CodeBuild build project reports the build status to the source provider.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" buildStatusConfigProperty := &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }
type CfnProject_CloudWatchLogsConfigProperty ¶
type CfnProject_CloudWatchLogsConfigProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-status // Status *string `field:"required" json:"status" yaml:"status"` // The group name of the logs in CloudWatch Logs. // // For more information, see [Working with Log Groups and Log Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-groupname // GroupName *string `field:"optional" json:"groupName" yaml:"groupName"` // The prefix of the stream name of the CloudWatch Logs. // // For more information, see [Working with Log Groups and Log Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-streamname // StreamName *string `field:"optional" json:"streamName" yaml:"streamName"` }
`CloudWatchLogs` is a property of the [AWS CodeBuild Project LogsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html) property type that specifies settings for CloudWatch logs generated by an AWS CodeBuild build.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cloudWatchLogsConfigProperty := &CloudWatchLogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional GroupName: jsii.String("groupName"), StreamName: jsii.String("streamName"), }
type CfnProject_EnvironmentProperty ¶
type CfnProject_EnvironmentProperty struct { // The type of compute environment. // // This determines the number of CPU cores and memory the build environment uses. Available values include: // // - `BUILD_GENERAL1_SMALL` : Use up to 3 GB memory and 2 vCPUs for builds. // - `BUILD_GENERAL1_MEDIUM` : Use up to 7 GB memory and 4 vCPUs for builds. // - `BUILD_GENERAL1_LARGE` : Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type. // - `BUILD_GENERAL1_XLARGE` : Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type. // - `BUILD_GENERAL1_2XLARGE` : Use up to 145 GB 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 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER` . // - `BUILD_LAMBDA_2GB` : Use up to 2 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER` . // - `BUILD_LAMBDA_4GB` : Use up to 4 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER` . // - `BUILD_LAMBDA_8GB` : Use up to 8 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER` . // - `BUILD_LAMBDA_10GB` : Use up to 10 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER` . // // For more information, see [Build Environment Compute Types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild User Guide.* // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-computetype // ComputeType *string `field:"required" json:"computeType" yaml:"computeType"` // 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 be `aws/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](https://docs.aws.amazon.com//codebuild/latest/userguide/build-env-ref-available.html) in the *AWS CodeBuild user guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-image // Image *string `field:"required" json:"image" yaml:"image"` // The type of build environment to use for related builds. // // - The environment type `ARM_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Sydney), and EU (Frankfurt). // - The environment type `LINUX_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), China (Beijing), and China (Ningxia). // - The environment type `LINUX_GPU_CONTAINER` is available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Canada (Central), EU (Ireland), EU (London), EU (Frankfurt), Asia Pacific (Tokyo), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney) , China (Beijing), and China (Ningxia). // // - The environment types `ARM_LAMBDA_CONTAINER` and `LINUX_LAMBDA_CONTAINER` are available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Frankfurt), EU (Ireland), and South America (São Paulo). // // - The environment types `WINDOWS_CONTAINER` and `WINDOWS_SERVER_2019_CONTAINER` are available only in regions US East (N. Virginia), US East (Ohio), US West (Oregon), and EU (Ireland). // // > If you're using compute fleets during project creation, `type` will be ignored. // // For more information, see [Build environment compute types](https://docs.aws.amazon.com//codebuild/latest/userguide/build-env-ref-compute-types.html) in the *AWS CodeBuild user guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-type // Type *string `field:"required" json:"type" yaml:"type"` // 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](https://docs.aws.amazon.com/codebuild/latest/userguide/create-project-cli.html#cli.environment.certificate) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-certificate // Certificate *string `field:"optional" json:"certificate" yaml:"certificate"` // A set of environment variables to make available to builds for this build project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-environmentvariables // EnvironmentVariables interface{} `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-fleet // Fleet interface{} `field:"optional" json:"fleet" yaml:"fleet"` // The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:. // // - `CODEBUILD` specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild service principal. // - `SERVICE_ROLE` specifies 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-imagepullcredentialstype // ImagePullCredentialsType *string `field:"optional" json:"imagePullCredentialsType" yaml:"imagePullCredentialsType"` // 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 `-t` argument to `timeout` : // // `- 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"` // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-privilegedmode // PrivilegedMode interface{} `field:"optional" json:"privilegedMode" yaml:"privilegedMode"` // `RegistryCredential` is a property of the [AWS::CodeBuild::Project Environment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-environment) property that specifies information about credentials that provide access to a private Docker registry. When this is set:. // // - `imagePullCredentialsType` must be set to `SERVICE_ROLE` . // - images cannot be curated or an Amazon ECR image. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-registrycredential // RegistryCredential interface{} `field:"optional" json:"registryCredential" yaml:"registryCredential"` }
`Environment` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies the environment for an AWS CodeBuild project.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" environmentProperty := &EnvironmentProperty{ ComputeType: jsii.String("computeType"), Image: jsii.String("image"), Type: jsii.String("type"), // the properties below are optional Certificate: jsii.String("certificate"), EnvironmentVariables: []interface{}{ &EnvironmentVariableProperty{ Name: jsii.String("name"), Value: jsii.String("value"), // the properties below are optional Type: jsii.String("type"), }, }, Fleet: &ProjectFleetProperty{ FleetArn: jsii.String("fleetArn"), }, ImagePullCredentialsType: jsii.String("imagePullCredentialsType"), PrivilegedMode: jsii.Boolean(false), RegistryCredential: &RegistryCredentialProperty{ Credential: jsii.String("credential"), CredentialProvider: jsii.String("credentialProvider"), }, }
type CfnProject_EnvironmentVariableProperty ¶
type CfnProject_EnvironmentVariableProperty struct { // The name or key of the environment variable. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environmentvariable.html#cfn-codebuild-project-environmentvariable-name // Name *string `field:"required" json:"name" yaml:"name"` // The value of the environment variable. // // > We strongly discourage the use of `PLAINTEXT` environment variables to store sensitive values, especially AWS secret key IDs. `PLAINTEXT` environment 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 type `PARAMETER_STORE` or `SECRETS_MANAGER` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environmentvariable.html#cfn-codebuild-project-environmentvariable-value // Value *string `field:"required" json:"value" yaml:"value"` // 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 the `value` of 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](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.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 the `value` of 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](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environmentvariable.html#cfn-codebuild-project-environmentvariable-type // Type *string `field:"optional" json:"type" yaml:"type"` }
`EnvironmentVariable` is a property of the [AWS CodeBuild Project Environment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html) 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. `EnvironmentVariable` contains a list of `EnvironmentVariable` property types.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" environmentVariableProperty := &EnvironmentVariableProperty{ Name: jsii.String("name"), Value: jsii.String("value"), // the properties below are optional Type: jsii.String("type"), }
type CfnProject_GitSubmodulesConfigProperty ¶
type CfnProject_GitSubmodulesConfigProperty struct { // Set to true to fetch Git submodules for your AWS CodeBuild build project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html#cfn-codebuild-project-gitsubmodulesconfig-fetchsubmodules // FetchSubmodules interface{} `field:"required" json:"fetchSubmodules" yaml:"fetchSubmodules"` }
`GitSubmodulesConfig` is a property of the [AWS CodeBuild Project Source](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html) property type that specifies information about the Git submodules configuration for the build project.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" gitSubmodulesConfigProperty := &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }
type CfnProject_LogsConfigProperty ¶
type CfnProject_LogsConfigProperty struct { // Information about CloudWatch Logs for a build project. // // CloudWatch Logs are enabled by default. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html#cfn-codebuild-project-logsconfig-cloudwatchlogs // CloudWatchLogs interface{} `field:"optional" json:"cloudWatchLogs" yaml:"cloudWatchLogs"` // Information about logs built to an S3 bucket for a build project. // // S3 logs are not enabled by default. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html#cfn-codebuild-project-logsconfig-s3logs // S3Logs interface{} `field:"optional" json:"s3Logs" yaml:"s3Logs"` }
`LogsConfig` is a property of the [AWS CodeBuild Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" logsConfigProperty := &LogsConfigProperty{ CloudWatchLogs: &CloudWatchLogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional GroupName: jsii.String("groupName"), StreamName: jsii.String("streamName"), }, S3Logs: &S3LogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), }, }
type CfnProject_ProjectBuildBatchConfigProperty ¶
type CfnProject_ProjectBuildBatchConfigProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectbuildbatchconfig.html#cfn-codebuild-project-projectbuildbatchconfig-batchreportmode // BatchReportMode *string `field:"optional" json:"batchReportMode" yaml:"batchReportMode"` // Specifies if the build artifacts for the batch build should be combined into a single artifact location. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectbuildbatchconfig.html#cfn-codebuild-project-projectbuildbatchconfig-combineartifacts // CombineArtifacts interface{} `field:"optional" json:"combineArtifacts" yaml:"combineArtifacts"` // A `BatchRestrictions` object that specifies the restrictions for the batch build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectbuildbatchconfig.html#cfn-codebuild-project-projectbuildbatchconfig-restrictions // Restrictions interface{} `field:"optional" json:"restrictions" yaml:"restrictions"` // Specifies the service role ARN for the batch build project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectbuildbatchconfig.html#cfn-codebuild-project-projectbuildbatchconfig-servicerole // ServiceRole *string `field:"optional" json:"serviceRole" yaml:"serviceRole"` // Specifies the maximum amount of time, in minutes, that the batch build must be completed in. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectbuildbatchconfig.html#cfn-codebuild-project-projectbuildbatchconfig-timeoutinmins // TimeoutInMins *float64 `field:"optional" json:"timeoutInMins" yaml:"timeoutInMins"` }
Contains configuration information about a batch build project.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectBuildBatchConfigProperty := &ProjectBuildBatchConfigProperty{ BatchReportMode: jsii.String("batchReportMode"), CombineArtifacts: jsii.Boolean(false), Restrictions: &BatchRestrictionsProperty{ ComputeTypesAllowed: []*string{ jsii.String("computeTypesAllowed"), }, MaximumBuildsAllowed: jsii.Number(123), }, ServiceRole: jsii.String("serviceRole"), TimeoutInMins: jsii.Number(123), }
type CfnProject_ProjectCacheProperty ¶
type CfnProject_ProjectCacheProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectcache.html#cfn-codebuild-project-projectcache-type // Type *string `field:"required" json:"type" yaml:"type"` // Information about the cache location:. // // - `NO_CACHE` or `LOCAL` : This value is ignored. // - `S3` : This is the S3 bucket name/prefix. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectcache.html#cfn-codebuild-project-projectcache-location // Location *string `field:"optional" json:"location" yaml:"location"` // 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 `LOCAL` cache 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 `privileged` flag 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectcache.html#cfn-codebuild-project-projectcache-modes // Modes *[]*string `field:"optional" json:"modes" yaml:"modes"` }
`ProjectCache` is a property of the [AWS CodeBuild Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies information about the cache for the build project. If `ProjectCache` is not specified, then both of its properties default to `NO_CACHE` .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectCacheProperty := &ProjectCacheProperty{ Type: jsii.String("type"), // the properties below are optional Location: jsii.String("location"), Modes: []*string{ jsii.String("modes"), }, }
type CfnProject_ProjectFileSystemLocationProperty ¶
type CfnProject_ProjectFileSystemLocationProperty struct { // The name used to access a file system created by Amazon EFS. // // CodeBuild creates an environment variable by appending the `identifier` in all capital letters to `CODEBUILD_` . For example, if you specify `my_efs` for `identifier` , a new environment variable is create named `CODEBUILD_MY_EFS` . // // The `identifier` is used to mount your file system. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-identifier // Identifier *string `field:"required" json:"identifier" yaml:"identifier"` // 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 is `fs-abcd1234.efs.us-west-2.amazonaws.com` , and its mount directory is `my-efs-mount-directory` , then the `location` is `fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory` . // // The directory path in the format `efs-dns-name:/directory-path` is optional. If you do not specify a directory path, the location is only the DNS name and CodeBuild mounts the entire file system. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-location // Location *string `field:"required" json:"location" yaml:"location"` // The location in the container where you mount the file system. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-mountpoint // MountPoint *string `field:"required" json:"mountPoint" yaml:"mountPoint"` // The type of the file system. // // The one supported type is `EFS` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-type // Type *string `field:"required" json:"type" yaml:"type"` // 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](https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-mountoptions // MountOptions *string `field:"optional" json:"mountOptions" yaml:"mountOptions"` }
Information about a file system created by Amazon Elastic File System (EFS).
For more information, see [What Is Amazon Elastic File System?](https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html)
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectFileSystemLocationProperty := &ProjectFileSystemLocationProperty{ Identifier: jsii.String("identifier"), Location: jsii.String("location"), MountPoint: jsii.String("mountPoint"), Type: jsii.String("type"), // the properties below are optional MountOptions: jsii.String("mountOptions"), }
type CfnProject_ProjectFleetProperty ¶ added in v2.124.0
type CfnProject_ProjectFleetProperty struct { // Specifies the compute fleet ARN for the build project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfleet.html#cfn-codebuild-project-projectfleet-fleetarn // FleetArn *string `field:"optional" json:"fleetArn" yaml:"fleetArn"` }
Information about the compute fleet of the build project.
For more information, see [Working with reserved capacity in AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html) .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectFleetProperty := &ProjectFleetProperty{ FleetArn: jsii.String("fleetArn"), }
type CfnProject_ProjectSourceVersionProperty ¶
type CfnProject_ProjectSourceVersionProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectsourceversion.html#cfn-codebuild-project-projectsourceversion-sourceidentifier // SourceIdentifier *string `field:"required" json:"sourceIdentifier" yaml:"sourceIdentifier"` // 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 or GitLab: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format `pr/pull-request-ID` (for example, `pr/25` ). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. // - For Amazon S3: the version ID of the object that represents the build input ZIP file to use. // // For more information, see [Source Version Sample with CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectsourceversion.html#cfn-codebuild-project-projectsourceversion-sourceversion // SourceVersion *string `field:"optional" json:"sourceVersion" yaml:"sourceVersion"` }
A source identifier and its corresponding version.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectSourceVersionProperty := &ProjectSourceVersionProperty{ SourceIdentifier: jsii.String("sourceIdentifier"), // the properties below are optional SourceVersion: jsii.String("sourceVersion"), }
type CfnProject_ProjectTriggersProperty ¶
type CfnProject_ProjectTriggersProperty struct { // Specifies the type of build this webhook will trigger. Allowed values are:. // // - **BUILD** - A single build // - **BUILD_BATCH** - A batch build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-buildtype // BuildType *string `field:"optional" json:"buildType" yaml:"buildType"` // A list of lists of `WebhookFilter` objects used to determine which webhook events are triggered. // // At least one `WebhookFilter` in the array must specify `EVENT` as its type. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-filtergroups // FilterGroups interface{} `field:"optional" json:"filterGroups" yaml:"filterGroups"` // Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-webhook // Webhook interface{} `field:"optional" json:"webhook" yaml:"webhook"` }
`ProjectTriggers` is a property of the [AWS CodeBuild Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" projectTriggersProperty := &ProjectTriggersProperty{ BuildType: jsii.String("buildType"), FilterGroups: []interface{}{ []interface{}{ &WebhookFilterProperty{ Pattern: jsii.String("pattern"), Type: jsii.String("type"), // the properties below are optional ExcludeMatchedPattern: jsii.Boolean(false), }, }, }, Webhook: jsii.Boolean(false), }
type CfnProject_RegistryCredentialProperty ¶
type CfnProject_RegistryCredentialProperty struct { // The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager . // // > The `credential` can use the name of the credentials only if they exist in your current AWS Region . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-registrycredential.html#cfn-codebuild-project-registrycredential-credential // Credential *string `field:"required" json:"credential" yaml:"credential"` // The service that created the credentials to access a private Docker registry. // // The valid value, SECRETS_MANAGER, is for AWS Secrets Manager . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-registrycredential.html#cfn-codebuild-project-registrycredential-credentialprovider // CredentialProvider *string `field:"required" json:"credentialProvider" yaml:"credentialProvider"` }
`RegistryCredential` is a property of the [AWS CodeBuild Project Environment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html) property type that specifies information about credentials that provide access to a private Docker registry. When this is set:.
- `imagePullCredentialsType` must be set to `SERVICE_ROLE` . - images cannot be curated or an Amazon ECR image.
For more information, see [Private Registry with AWS Secrets Manager Sample for AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html) .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" registryCredentialProperty := &RegistryCredentialProperty{ Credential: jsii.String("credential"), CredentialProvider: jsii.String("credentialProvider"), }
type CfnProject_S3LogsConfigProperty ¶
type CfnProject_S3LogsConfigProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-status // Status *string `field:"required" json:"status" yaml:"status"` // Set to true if you do not want your S3 build log output encrypted. // // By default S3 build logs are encrypted. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-encryptiondisabled // EncryptionDisabled interface{} `field:"optional" json:"encryptionDisabled" yaml:"encryptionDisabled"` // 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 is `build-log` , then acceptable formats are `my-bucket/build-log` or `arn:aws:s3:::my-bucket/build-log` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-location // Location *string `field:"optional" json:"location" yaml:"location"` }
`S3Logs` is a property of the [AWS CodeBuild Project LogsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html) property type that specifies settings for logs generated by an AWS CodeBuild build in an S3 bucket.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" s3LogsConfigProperty := &S3LogsConfigProperty{ Status: jsii.String("status"), // the properties below are optional EncryptionDisabled: jsii.Boolean(false), Location: jsii.String("location"), }
type CfnProject_SourceAuthProperty ¶
type CfnProject_SourceAuthProperty struct { // The authorization type to use. The only valid value is `OAUTH` , which represents the OAuth authorization type. // // > This data type is used by the AWS CodeBuild console only. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-type // Type *string `field:"required" json:"type" yaml:"type"` // The resource value that applies to the specified authorization type. // // > This data type is used by the AWS CodeBuild console only. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-resource // Resource *string `field:"optional" json:"resource" yaml:"resource"` }
`SourceAuth` is a property of the [AWS CodeBuild Project Source](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html) property type that specifies authorization settings for AWS CodeBuild to access the source code to be built.
`SourceAuth` is for use by the CodeBuild console only. Do not get or set it directly.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sourceAuthProperty := &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }
type CfnProject_SourceProperty ¶
type CfnProject_SourceProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-type // Type *string `field:"required" json:"type" yaml:"type"` // Information about the authorization settings for AWS CodeBuild to access the source code to be built. // // This information is for the AWS CodeBuild console's use only. Your code should not get or set `Auth` directly. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-auth // Auth interface{} `field:"optional" json:"auth" yaml:"auth"` // The build specification for the project. // // If this value is not provided, then the source code must contain a buildspec file named `buildspec.yml` at 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 variable `CODEBUILD_SRC_DIR` . The alternate buildspec file can have a name other than `buildspec.yml` , for example `myspec.yml` or `build_spec_qa.yml` or similar. For more information, see the [Build Spec Reference](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example) in the *AWS CodeBuild User Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-buildspec // BuildSpec *string `field:"optional" json:"buildSpec" yaml:"buildSpec"` // 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` , or `BITBUCKET` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-buildstatusconfig // BuildStatusConfig interface{} `field:"optional" json:"buildStatusConfig" yaml:"buildStatusConfig"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitclonedepth // GitCloneDepth *float64 `field:"optional" json:"gitCloneDepth" yaml:"gitCloneDepth"` // Information about the Git submodules configuration for the build project. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitsubmodulesconfig // GitSubmodulesConfig interface{} `field:"optional" json:"gitSubmodulesConfig" yaml:"gitSubmodulesConfig"` // 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` . `InsecureSsl` should be used for testing purposes only. It should not be used in a production environment. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-insecuressl // InsecureSsl interface{} `field:"optional" json:"insecureSsl" yaml:"insecureSsl"` // 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, `location` should 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 `source` object, set the `auth` object's `type` value to `OAUTH` . // - 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 `auth` object's `type` value to `CODECONNECTIONS` in the `source` object. // - 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 `source` object, set the `auth` object's `type` value to `OAUTH` . // // If you specify `CODEPIPELINE` for the `Type` property, don't specify this property. For all of the other types, you must specify `Location` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-location // Location *string `field:"optional" json:"location" yaml:"location"` // 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, or Bitbucket. If this is set and you use a different source provider, an `invalidInputException` is thrown. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-reportbuildstatus // ReportBuildStatus interface{} `field:"optional" json:"reportBuildStatus" yaml:"reportBuildStatus"` // 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-sourceidentifier // SourceIdentifier *string `field:"optional" json:"sourceIdentifier" yaml:"sourceIdentifier"` }
`Source` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies the source code settings for the project, such as the source code's repository type and location.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sourceProperty := &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }
type CfnProject_VpcConfigProperty ¶
type CfnProject_VpcConfigProperty struct { // A list of one or more security groups IDs in your Amazon VPC. // // The maximum count is 5. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids // SecurityGroupIds *[]*string `field:"optional" json:"securityGroupIds" yaml:"securityGroupIds"` // A list of one or more subnet IDs in your Amazon VPC. // // The maximum count is 16. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets // Subnets *[]*string `field:"optional" json:"subnets" yaml:"subnets"` // The ID of the Amazon VPC. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid // VpcId *string `field:"optional" json:"vpcId" yaml:"vpcId"` }
`VpcConfig` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that enable AWS CodeBuild to access resources in an Amazon VPC. For more information, see [Use AWS CodeBuild with Amazon Virtual Private Cloud](https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html) in the *AWS CodeBuild User Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" vpcConfigProperty := &VpcConfigProperty{ SecurityGroupIds: []*string{ jsii.String("securityGroupIds"), }, Subnets: []*string{ jsii.String("subnets"), }, VpcId: jsii.String("vpcId"), }
type CfnProject_WebhookFilterProperty ¶
type CfnProject_WebhookFilterProperty struct { // For a `WebHookFilter` that uses `EVENT` type, a comma-separated string that specifies one or more events. // // For example, the webhook filter `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` allows all push, pull request created, and pull request updated events to trigger a build. // // For a `WebHookFilter` that uses any of the other filter types, a regular expression pattern. For example, a `WebHookFilter` that uses `HEAD_REF` for its `type` and the pattern `^refs/heads/` triggers a build when the head reference is a branch with a reference name `refs/heads/branch-name` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-pattern // Pattern *string `field:"required" json:"pattern" yaml:"pattern"` // The type of webhook filter. // // There are nine webhook filter types: `EVENT` , `ACTOR_ACCOUNT_ID` , `HEAD_REF` , `BASE_REF` , `FILE_PATH` , `COMMIT_MESSAGE` , `TAG_NAME` , `RELEASE_NAME` , and `WORKFLOW_NAME` . // // - EVENT // // - A webhook event triggers a build when the provided `pattern` matches one of nine event types: `PUSH` , `PULL_REQUEST_CREATED` , `PULL_REQUEST_UPDATED` , `PULL_REQUEST_CLOSED` , `PULL_REQUEST_REOPENED` , `PULL_REQUEST_MERGED` , `RELEASED` , `PRERELEASED` , and `WORKFLOW_JOB_QUEUED` . The `EVENT` patterns are specified as a comma-separated string. For example, `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` filters all push, pull request created, and pull request updated events. // // > The `PULL_REQUEST_REOPENED` works with GitHub and GitHub Enterprise only. The `RELEASED` , `PRERELEASED` , and `WORKFLOW_JOB_QUEUED` work 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-name` and `refs/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 GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events. // - COMMIT_MESSAGE // // - A webhook triggers a build when the head commit message matches the regular expression `pattern` . // // > Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events. // - TAG_NAME // // - A webhook triggers a build when the tag name of the release matches the regular expression `pattern` . // // > Works with `RELEASED` and `PRERELEASED` events only. // - RELEASE_NAME // // - A webhook triggers a build when the release name matches the regular expression `pattern` . // // > Works with `RELEASED` and `PRERELEASED` events only. // - WORKFLOW_NAME // // - A webhook triggers a build when the workflow name matches the regular expression `pattern` . // // > Works with `WORKFLOW_JOB_QUEUED` events only. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-type // Type *string `field:"required" json:"type" yaml:"type"` // Used to indicate that the `pattern` determines which webhook events do not trigger a build. // // If true, then a webhook event that does not match the `pattern` triggers a build. If false, then a webhook event that matches the `pattern` triggers a build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-excludematchedpattern // ExcludeMatchedPattern interface{} `field:"optional" json:"excludeMatchedPattern" yaml:"excludeMatchedPattern"` }
`WebhookFilter` is a structure of the `FilterGroups` property on the [AWS CodeBuild Project ProjectTriggers](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html) 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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" webhookFilterProperty := &WebhookFilterProperty{ Pattern: jsii.String("pattern"), Type: jsii.String("type"), // the properties below are optional ExcludeMatchedPattern: jsii.Boolean(false), }
type CfnReportGroup ¶
type CfnReportGroup interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable // The ARN of the AWS CodeBuild report group, such as `arn:aws:codebuild:region:123456789012:report-group/myReportGroupName` . AttrArn() *string AttrId() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: 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. CreationStack() *[]*string // When deleting a report group, specifies if reports within the report group should be deleted. DeleteReports() interface{} SetDeleteReports(val interface{}) // Information about the destination where the raw data of this `ReportGroup` is exported. ExportConfig() interface{} SetExportConfig(val interface{}) // 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. LogicalId() *string // The name of the `ReportGroup` . Name() *string SetName(val *string) // The tree node. Node() constructs.Node // 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 })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // A list of tag key and value pairs associated with this report group. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // The type of the `ReportGroup` . // // This can be one of the following values:. Type() *string SetType(val *string) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "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, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will 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. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // 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:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // 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. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // 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. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Represents a report group.
A report group contains a collection of reports.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnReportGroup := awscdk.Aws_codebuild.NewCfnReportGroup(this, jsii.String("MyCfnReportGroup"), &CfnReportGroupProps{ ExportConfig: &ReportExportConfigProperty{ ExportConfigType: jsii.String("exportConfigType"), // the properties below are optional S3Destination: &S3ReportExportConfigProperty{ Bucket: jsii.String("bucket"), // the properties below are optional BucketOwner: jsii.String("bucketOwner"), EncryptionDisabled: jsii.Boolean(false), EncryptionKey: jsii.String("encryptionKey"), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }, Type: jsii.String("type"), // the properties below are optional DeleteReports: jsii.Boolean(false), Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
func NewCfnReportGroup ¶
func NewCfnReportGroup(scope constructs.Construct, id *string, props *CfnReportGroupProps) CfnReportGroup
type CfnReportGroupProps ¶
type CfnReportGroupProps struct { // Information about the destination where the raw data of this `ReportGroup` is exported. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-reportgroup.html#cfn-codebuild-reportgroup-exportconfig // ExportConfig interface{} `field:"required" json:"exportConfig" yaml:"exportConfig"` // The type of the `ReportGroup` . This can be one of the following values:. // // - **CODE_COVERAGE** - The report group contains code coverage reports. // - **TEST** - The report group contains test reports. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-reportgroup.html#cfn-codebuild-reportgroup-type // Type *string `field:"required" json:"type" yaml:"type"` // When deleting a report group, specifies if reports within the report group should be deleted. // // - **true** - Deletes any reports that belong to the report group before deleting the report group. // - **false** - You must delete any reports in the report group. This is the default value. If you delete a report group that contains one or more reports, an exception is thrown. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-reportgroup.html#cfn-codebuild-reportgroup-deletereports // DeleteReports interface{} `field:"optional" json:"deleteReports" yaml:"deleteReports"` // The name of the `ReportGroup` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-reportgroup.html#cfn-codebuild-reportgroup-name // Name *string `field:"optional" json:"name" yaml:"name"` // A list of tag key and value pairs associated with this report group. // // These tags are available for use by AWS services that support AWS CodeBuild report group tags. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-reportgroup.html#cfn-codebuild-reportgroup-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnReportGroup`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnReportGroupProps := &CfnReportGroupProps{ ExportConfig: &ReportExportConfigProperty{ ExportConfigType: jsii.String("exportConfigType"), // the properties below are optional S3Destination: &S3ReportExportConfigProperty{ Bucket: jsii.String("bucket"), // the properties below are optional BucketOwner: jsii.String("bucketOwner"), EncryptionDisabled: jsii.Boolean(false), EncryptionKey: jsii.String("encryptionKey"), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }, Type: jsii.String("type"), // the properties below are optional DeleteReports: jsii.Boolean(false), Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
type CfnReportGroup_ReportExportConfigProperty ¶
type CfnReportGroup_ReportExportConfigProperty struct { // The export configuration type. Valid values are:. // // - `S3` : The report results are exported to an S3 bucket. // - `NO_EXPORT` : The report results are not exported. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-reportexportconfig.html#cfn-codebuild-reportgroup-reportexportconfig-exportconfigtype // ExportConfigType *string `field:"required" json:"exportConfigType" yaml:"exportConfigType"` // A `S3ReportExportConfig` object that contains information about the S3 bucket where the run of a report is exported. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-reportexportconfig.html#cfn-codebuild-reportgroup-reportexportconfig-s3destination // S3Destination interface{} `field:"optional" json:"s3Destination" yaml:"s3Destination"` }
Information about the location where the run of a report is exported.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" reportExportConfigProperty := &ReportExportConfigProperty{ ExportConfigType: jsii.String("exportConfigType"), // the properties below are optional S3Destination: &S3ReportExportConfigProperty{ Bucket: jsii.String("bucket"), // the properties below are optional BucketOwner: jsii.String("bucketOwner"), EncryptionDisabled: jsii.Boolean(false), EncryptionKey: jsii.String("encryptionKey"), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }, }
type CfnReportGroup_S3ReportExportConfigProperty ¶
type CfnReportGroup_S3ReportExportConfigProperty struct { // The name of the S3 bucket where the raw data of a report are exported. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-bucket // Bucket *string `field:"required" json:"bucket" yaml:"bucket"` // The AWS account identifier of the owner of the Amazon S3 bucket. // // This allows report data to be exported to an Amazon S3 bucket that is owned by an account other than the account running the build. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-bucketowner // BucketOwner *string `field:"optional" json:"bucketOwner" yaml:"bucketOwner"` // A boolean value that specifies if the results of a report are encrypted. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-encryptiondisabled // EncryptionDisabled interface{} `field:"optional" json:"encryptionDisabled" yaml:"encryptionDisabled"` // The encryption key for the report's encrypted raw data. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-encryptionkey // EncryptionKey *string `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // The type of build output artifact to create. Valid values include:. // // - `NONE` : CodeBuild creates the raw data in the output bucket. This is the default if packaging is not specified. // - `ZIP` : CodeBuild creates a ZIP file with the raw data in the output bucket. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-packaging // Packaging *string `field:"optional" json:"packaging" yaml:"packaging"` // The path to the exported report's raw data results. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-reportgroup-s3reportexportconfig.html#cfn-codebuild-reportgroup-s3reportexportconfig-path // Path *string `field:"optional" json:"path" yaml:"path"` }
Information about the S3 bucket where the raw data of a report are exported.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" s3ReportExportConfigProperty := &S3ReportExportConfigProperty{ Bucket: jsii.String("bucket"), // the properties below are optional BucketOwner: jsii.String("bucketOwner"), EncryptionDisabled: jsii.Boolean(false), EncryptionKey: jsii.String("encryptionKey"), Packaging: jsii.String("packaging"), Path: jsii.String("path"), }
type CfnSourceCredential ¶
type CfnSourceCredential interface { awscdk.CfnResource awscdk.IInspectable AttrId() *string // The type of authentication used by the credentials. AuthType() *string SetAuthType(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: 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. CreationStack() *[]*string // 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. LogicalId() *string // The tree node. Node() constructs.Node // 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 })`. Ref() *string // The type of source provider. ServerType() *string SetServerType(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // For GitHub or GitHub Enterprise, this is the personal access token. Token() *string SetToken(val *string) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // The Bitbucket username when the `authType` is BASIC_AUTH. Username() *string SetUsername(val *string) // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "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, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will 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. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // 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:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // 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. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // 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. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // 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. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket repository.
We strongly recommend that you use AWS Secrets Manager to store your credentials. If you use Secrets Manager , you must have secrets in your secrets manager. For more information, see [Using Dynamic References to Specify Template Values](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-secretsmanager) .
> For security purposes, do not use plain text in your AWS CloudFormation template to store your credentials.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnSourceCredential := awscdk.Aws_codebuild.NewCfnSourceCredential(this, jsii.String("MyCfnSourceCredential"), &CfnSourceCredentialProps{ AuthType: jsii.String("authType"), ServerType: jsii.String("serverType"), Token: jsii.String("token"), // the properties below are optional Username: jsii.String("username"), })
func NewCfnSourceCredential ¶
func NewCfnSourceCredential(scope constructs.Construct, id *string, props *CfnSourceCredentialProps) CfnSourceCredential
type CfnSourceCredentialProps ¶
type CfnSourceCredentialProps struct { // The type of authentication used by the credentials. // // Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype // AuthType *string `field:"required" json:"authType" yaml:"authType"` // The type of source provider. // // The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype // ServerType *string `field:"required" json:"serverType" yaml:"serverType"` // For GitHub or GitHub Enterprise, this is the personal access token. // // For Bitbucket, this is either the access token or the app password. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token // Token *string `field:"required" json:"token" yaml:"token"` // The Bitbucket username when the `authType` is BASIC_AUTH. // // This parameter is not valid for other types of source providers or connections. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username // Username *string `field:"optional" json:"username" yaml:"username"` }
Properties for defining a `CfnSourceCredential`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnSourceCredentialProps := &CfnSourceCredentialProps{ AuthType: jsii.String("authType"), ServerType: jsii.String("serverType"), Token: jsii.String("token"), // the properties below are optional Username: jsii.String("username"), }
type CloudWatchLoggingOptions ¶
type CloudWatchLoggingOptions struct { // The current status of the logs in Amazon CloudWatch Logs for a build project. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The Log Group to send logs to. // Default: - no log group specified. // LogGroup awslogs.ILogGroup `field:"optional" json:"logGroup" yaml:"logGroup"` // The prefix of the stream name of the Amazon CloudWatch Logs. // Default: - no prefix. // Prefix *string `field:"optional" json:"prefix" yaml:"prefix"` }
Information about logs built to a CloudWatch Log Group for a build project.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Logging: &LoggingOptions{ CloudWatch: &CloudWatchLoggingOptions{ LogGroup: logs.NewLogGroup(this, jsii.String("MyLogGroup")), }, }, })
type CodeCommitSourceProps ¶
type CodeCommitSourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` Repository awscodecommit.IRepository `field:"required" json:"repository" yaml:"repository"` // The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. // // Example: // "mybranch" // // Default: the default branch's HEAD commit ID is used. // BranchOrRef *string `field:"optional" json:"branchOrRef" yaml:"branchOrRef"` // 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 of the project. CloneDepth *float64 `field:"optional" json:"cloneDepth" yaml:"cloneDepth"` // Whether to fetch submodules while cloning git repo. // Default: false. // FetchSubmodules *bool `field:"optional" json:"fetchSubmodules" yaml:"fetchSubmodules"` }
Construction properties for `CodeCommitSource`.
Example:
import codecommit "github.com/aws/aws-cdk-go/awscdk" var repo repository var bucket bucket project := codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ SecondarySources: []iSource{ codebuild.Source_CodeCommit(&CodeCommitSourceProps{ Identifier: jsii.String("source2"), Repository: repo, }), }, SecondaryArtifacts: []iArtifacts{ codebuild.Artifacts_S3(&S3ArtifactsProps{ Identifier: jsii.String("artifact2"), Bucket: bucket, Path: jsii.String("some/path"), Name: jsii.String("file.zip"), }), }, })
type CommonProjectProps ¶
type CommonProjectProps struct { // Whether to allow the CodeBuild to send all network traffic. // // If set to false, you must individually add traffic rules to allow the // CodeBuild project to connect to network targets. // // Only used if 'vpc' is supplied. // Default: true. // AllowAllOutbound *bool `field:"optional" json:"allowAllOutbound" yaml:"allowAllOutbound"` // Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. // // For more information, see Build Badges Sample // in the AWS CodeBuild User Guide. // Default: false. // Badge *bool `field:"optional" json:"badge" yaml:"badge"` // Filename or contents of buildspec in JSON format. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example // // Default: - Empty buildspec. // BuildSpec BuildSpec `field:"optional" json:"buildSpec" yaml:"buildSpec"` // Caching strategy to use. // Default: Cache.none // Cache Cache `field:"optional" json:"cache" yaml:"cache"` // Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. // Default: true. // CheckSecretsInPlainTextEnvVariables *bool `field:"optional" json:"checkSecretsInPlainTextEnvVariables" yaml:"checkSecretsInPlainTextEnvVariables"` // Maximum number of concurrent builds. // // Minimum value is 1 and maximum is account build limit. // Default: - no explicit limit is set. // ConcurrentBuildLimit *float64 `field:"optional" json:"concurrentBuildLimit" yaml:"concurrentBuildLimit"` // A description of the project. // // Use the description to identify the purpose // of the project. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Encryption key to use to read and write artifacts. // Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Build environment to use for the build. // Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0 // Environment *BuildEnvironment `field:"optional" json:"environment" yaml:"environment"` // Additional environment variables to add to the build environment. // Default: - No additional environment variables are specified. // EnvironmentVariables *map[string]*BuildEnvironmentVariable `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // An ProjectFileSystemLocation objects for a CodeBuild build project. // // A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, // and type of a file system created using Amazon Elastic File System. // Default: - no file system locations. // FileSystemLocations *[]IFileSystemLocation `field:"optional" json:"fileSystemLocations" yaml:"fileSystemLocations"` // Add permissions to this project's role to create and use test report groups with name starting with the name of this project. // // That is the standard report group that gets created when a simple name // (in contrast to an ARN) // is used in the 'reports' section of the buildspec of this project. // This is usually harmless, but you can turn these off if you don't plan on using test // reports in this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html // // Default: true. // GrantReportGroupPermissions *bool `field:"optional" json:"grantReportGroupPermissions" yaml:"grantReportGroupPermissions"` // Information about logs for the build project. // // A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. // Default: - no log configuration is set. // Logging *LoggingOptions `field:"optional" json:"logging" yaml:"logging"` // The physical, human-readable name of the CodeBuild Project. // Default: - Name is automatically generated. // ProjectName *string `field:"optional" json:"projectName" yaml:"projectName"` // The number of minutes after which AWS CodeBuild stops the build if it's still in queue. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: - no queue timeout is set. // QueuedTimeout awscdk.Duration `field:"optional" json:"queuedTimeout" yaml:"queuedTimeout"` // Service Role to assume while running the build. // Default: - A role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // What security group to associate with the codebuild project's network interfaces. // // If no security group is identified, one will be created automatically. // // Only used if 'vpc' is supplied. // Default: - Security group will be automatically created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Add the permissions necessary for debugging builds with SSM Session Manager. // // If the following prerequisites have been met: // // - The necessary permissions have been added by setting this flag to true. // - The build image has the SSM agent installed (true for default CodeBuild images). // - The build is started with [debugSessionEnabled](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html#CodeBuild-StartBuild-request-debugSessionEnabled) set to true. // // Then the build container can be paused and inspected using Session Manager // by invoking the `codebuild-breakpoint` command somewhere during the build. // // `codebuild-breakpoint` commands will be ignored if the build is not started // with `debugSessionEnabled=true`. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html // // Default: false. // SsmSessionPermissions *bool `field:"optional" json:"ssmSessionPermissions" yaml:"ssmSessionPermissions"` // Where to place the network interfaces within the VPC. // // To access AWS services, your CodeBuild project needs to be in one of the following types of subnets: // // 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS). // 2. Private subnets unconnected to the internet, but with [VPC endpoints](https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html) for the necessary services. // // If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, // then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need // AWS service access, add VPC Endpoints to your private subnets. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html for more details. // // Default: - private subnets if available else public subnets. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // The number of minutes after which AWS CodeBuild stops the build if it's not complete. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: Duration.hours(1) // Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"` // VPC network to place codebuild network interfaces. // // Specify this if the codebuild project needs to access resources in a VPC. // Default: - No VPC is specified. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var bucket bucket var buildImage iBuildImage var buildSpec buildSpec var cache cache var fileSystemLocation iFileSystemLocation var key key var logGroup logGroup var role role var securityGroup securityGroup var subnet subnet var subnetFilter subnetFilter var value interface{} var vpc vpc commonProjectProps := &CommonProjectProps{ AllowAllOutbound: jsii.Boolean(false), Badge: jsii.Boolean(false), BuildSpec: buildSpec, Cache: cache, CheckSecretsInPlainTextEnvVariables: jsii.Boolean(false), ConcurrentBuildLimit: jsii.Number(123), Description: jsii.String("description"), EncryptionKey: key, Environment: &BuildEnvironment{ BuildImage: buildImage, Certificate: &BuildEnvironmentCertificate{ Bucket: bucket, ObjectKey: jsii.String("objectKey"), }, ComputeType: awscdk.Aws_codebuild.ComputeType_SMALL, EnvironmentVariables: map[string]buildEnvironmentVariable{ "environmentVariablesKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.*Aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, Privileged: jsii.Boolean(false), }, EnvironmentVariables: map[string]*buildEnvironmentVariable{ "environmentVariablesKey": &buildEnvironmentVariable{ "value": value, // the properties below are optional "type": awscdk.*Aws_codebuild.BuildEnvironmentVariableType_PLAINTEXT, }, }, FileSystemLocations: []*iFileSystemLocation{ fileSystemLocation, }, GrantReportGroupPermissions: jsii.Boolean(false), Logging: &LoggingOptions{ CloudWatch: &CloudWatchLoggingOptions{ Enabled: jsii.Boolean(false), LogGroup: logGroup, Prefix: jsii.String("prefix"), }, S3: &S3LoggingOptions{ Bucket: bucket, // the properties below are optional Enabled: jsii.Boolean(false), Encrypted: jsii.Boolean(false), Prefix: jsii.String("prefix"), }, }, ProjectName: jsii.String("projectName"), QueuedTimeout: cdk.Duration_Minutes(jsii.Number(30)), Role: role, SecurityGroups: []iSecurityGroup{ securityGroup, }, SsmSessionPermissions: jsii.Boolean(false), SubnetSelection: &SubnetSelection{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, OnePerAz: jsii.Boolean(false), SubnetFilters: []*subnetFilter{ subnetFilter, }, SubnetGroupName: jsii.String("subnetGroupName"), Subnets: []iSubnet{ subnet, }, SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED, }, Timeout: cdk.Duration_*Minutes(jsii.Number(30)), Vpc: vpc, }
type ComputeType ¶
type ComputeType string
Build machine compute type.
Example:
var vpc vpc var mySecurityGroup securityGroup pipelines.NewCodeBuildStep(jsii.String("Synth"), &CodeBuildStepProps{ // ...standard ShellStep props... Commands: []*string{ }, Env: map[string]interface{}{ }, // If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory // to be the synth step's output. PrimaryOutputDirectory: jsii.String("cdk.out"), // Control the name of the project ProjectName: jsii.String("MyProject"), // Control parts of the BuildSpec other than the regular 'build' and 'install' commands PartialBuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), }), // Control the build environment BuildEnvironment: &BuildEnvironment{ ComputeType: codebuild.ComputeType_LARGE, Privileged: jsii.Boolean(true), }, Timeout: awscdk.Duration_Minutes(jsii.Number(90)), FileSystemLocations: []iFileSystemLocation{ codebuild.FileSystemLocation_Efs(&EfsFileSystemLocationProps{ Identifier: jsii.String("myidentifier2"), Location: jsii.String("myclodation.mydnsroot.com:/loc"), MountPoint: jsii.String("/media"), MountOptions: jsii.String("opts"), }), }, // Control Elastic Network Interface creation Vpc: vpc, SubnetSelection: &SubnetSelection{ SubnetType: ec2.SubnetType_PRIVATE_WITH_EGRESS, }, SecurityGroups: []iSecurityGroup{ mySecurityGroup, }, // Control caching Cache: codebuild.Cache_Bucket(s3.NewBucket(this, jsii.String("Cache"))), // Additional policy statements for the execution role RolePolicyStatements: []policyStatement{ iam.NewPolicyStatement(&PolicyStatementProps{ }), }, })
const ( ComputeType_SMALL ComputeType = "SMALL" ComputeType_MEDIUM ComputeType = "MEDIUM" ComputeType_LARGE ComputeType = "LARGE" ComputeType_X_LARGE ComputeType = "X_LARGE" ComputeType_X2_LARGE ComputeType = "X2_LARGE" ComputeType_LAMBDA_1GB ComputeType = "LAMBDA_1GB" ComputeType_LAMBDA_2GB ComputeType = "LAMBDA_2GB" ComputeType_LAMBDA_4GB ComputeType = "LAMBDA_4GB" ComputeType_LAMBDA_8GB ComputeType = "LAMBDA_8GB" ComputeType_LAMBDA_10GB ComputeType = "LAMBDA_10GB" )
type DockerImageOptions ¶
type DockerImageOptions struct { // The credentials, stored in Secrets Manager, used for accessing the repository holding the image, if the repository is private. // Default: no credentials will be used (we assume the repository is public). // SecretsManagerCredentials awssecretsmanager.ISecret `field:"optional" json:"secretsManagerCredentials" yaml:"secretsManagerCredentials"` }
The options when creating a CodeBuild Docker build image using `LinuxBuildImage.fromDockerRegistry` or `WindowsBuildImage.fromDockerRegistry`.
Example:
Environment: &BuildEnvironment{ BuildImage: codebuild.LinuxBuildImage_FromDockerRegistry(jsii.String("my-registry/my-repo"), &DockerImageOptions{ SecretsManagerCredentials: secrets, }), },
type EfsFileSystemLocationProps ¶
type EfsFileSystemLocationProps struct { // The name used to access a file system created by Amazon EFS. Identifier *string `field:"required" json:"identifier" yaml:"identifier"` // A string that specifies the location of the file system, like Amazon EFS. // // This value looks like `fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory`. Location *string `field:"required" json:"location" yaml:"location"` // The location in the container where you mount the file system. MountPoint *string `field:"required" json:"mountPoint" yaml:"mountPoint"` // The mount options for a file system such as Amazon EFS. // Default: 'nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2'. // MountOptions *string `field:"optional" json:"mountOptions" yaml:"mountOptions"` }
Construction properties for `EfsFileSystemLocation`.
Example:
codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), }), FileSystemLocations: []iFileSystemLocation{ codebuild.FileSystemLocation_Efs(&EfsFileSystemLocationProps{ Identifier: jsii.String("myidentifier2"), Location: jsii.String("myclodation.mydnsroot.com:/loc"), MountPoint: jsii.String("/media"), MountOptions: jsii.String("opts"), }), }, })
type EventAction ¶
type EventAction string
The types of webhook event actions.
Example:
gitHubSource := codebuild.Source_GitHub(&GitHubSourceProps{ Owner: jsii.String("awslabs"), Repo: jsii.String("aws-cdk"), Webhook: jsii.Boolean(true), // optional, default: true if `webhookFilters` were provided, false otherwise WebhookTriggersBatchBuild: jsii.Boolean(true), // optional, default is false WebhookFilters: []filterGroup{ codebuild.*filterGroup_InEventOf(codebuild.EventAction_PUSH).AndBranchIs(jsii.String("main")).AndCommitMessageIs(jsii.String("the commit message")), }, })
const ( // A push (of a branch, or a tag) to the repository. EventAction_PUSH EventAction = "PUSH" // Creating a Pull Request. EventAction_PULL_REQUEST_CREATED EventAction = "PULL_REQUEST_CREATED" // Updating a Pull Request. EventAction_PULL_REQUEST_UPDATED EventAction = "PULL_REQUEST_UPDATED" // Merging a Pull Request. EventAction_PULL_REQUEST_MERGED EventAction = "PULL_REQUEST_MERGED" // Re-opening a previously closed Pull Request. // // Note that this event is only supported for GitHub and GitHubEnterprise sources. EventAction_PULL_REQUEST_REOPENED EventAction = "PULL_REQUEST_REOPENED" )
type FileSystemConfig ¶
type FileSystemConfig struct { // File system location wrapper property. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html // Location *CfnProject_ProjectFileSystemLocationProperty `field:"required" json:"location" yaml:"location"` }
The type returned from `IFileSystemLocation#bind`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" fileSystemConfig := &FileSystemConfig{ Location: &ProjectFileSystemLocationProperty{ Identifier: jsii.String("identifier"), Location: jsii.String("location"), MountPoint: jsii.String("mountPoint"), Type: jsii.String("type"), // the properties below are optional MountOptions: jsii.String("mountOptions"), }, }
type FileSystemLocation ¶
type FileSystemLocation interface { }
FileSystemLocation provider definition for a CodeBuild Project.
Example:
codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), }), FileSystemLocations: []iFileSystemLocation{ codebuild.FileSystemLocation_Efs(&EfsFileSystemLocationProps{ Identifier: jsii.String("myidentifier2"), Location: jsii.String("myclodation.mydnsroot.com:/loc"), MountPoint: jsii.String("/media"), MountOptions: jsii.String("opts"), }), }, })
func NewFileSystemLocation ¶
func NewFileSystemLocation() FileSystemLocation
type FilterGroup ¶
type FilterGroup interface { // Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must match the given pattern. AndActorAccountIs(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the account ID of the actor initiating the event must not match the given pattern. AndActorAccountIsNot(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given base branch. // // Note that you cannot use this method if this Group contains the `PUSH` event action. AndBaseBranchIs(branchName *string) FilterGroup // Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given base branch. // // Note that you cannot use this method if this Group contains the `PUSH` event action. AndBaseBranchIsNot(branchName *string) FilterGroup // Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must target the given Git reference. // // Note that you cannot use this method if this Group contains the `PUSH` event action. AndBaseRefIs(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the Pull Request that is the source of the event must not target the given Git reference. // // Note that you cannot use this method if this Group contains the `PUSH` event action. AndBaseRefIsNot(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the event must affect the given branch. AndBranchIs(branchName *string) FilterGroup // Create a new FilterGroup with an added condition: the event must not affect the given branch. AndBranchIsNot(branchName *string) FilterGroup // Create a new FilterGroup with an added condition: the event must affect a head commit with the given message. AndCommitMessageIs(commitMessage *string) FilterGroup // Create a new FilterGroup with an added condition: the event must not affect a head commit with the given message. AndCommitMessageIsNot(commitMessage *string) FilterGroup // Create a new FilterGroup with an added condition: the push that is the source of the event must affect a file that matches the given pattern. // // Note that you can only use this method if this Group contains only the `PUSH` event action, // and only for GitHub, Bitbucket and GitHubEnterprise sources. AndFilePathIs(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the push that is the source of the event must not affect a file that matches the given pattern. // // Note that you can only use this method if this Group contains only the `PUSH` event action, // and only for GitHub, Bitbucket and GitHubEnterprise sources. AndFilePathIsNot(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the event must affect a Git reference (ie., a branch or a tag) that matches the given pattern. AndHeadRefIs(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the event must not affect a Git reference (ie., a branch or a tag) that matches the given pattern. AndHeadRefIsNot(pattern *string) FilterGroup // Create a new FilterGroup with an added condition: the event must affect the given tag. AndTagIs(tagName *string) FilterGroup // Create a new FilterGroup with an added condition: the event must not affect the given tag. AndTagIsNot(tagName *string) FilterGroup }
An object that represents a group of filter conditions for a webhook.
Every condition in a given FilterGroup must be true in order for the whole group to be true. You construct instances of it by calling the `#inEventOf` static factory method, and then calling various `andXyz` instance methods to create modified instances of it (this class is immutable).
You pass instances of this class to the `webhookFilters` property when constructing a source.
Example:
gitHubSource := codebuild.Source_GitHub(&GitHubSourceProps{ Owner: jsii.String("awslabs"), Repo: jsii.String("aws-cdk"), Webhook: jsii.Boolean(true), // optional, default: true if `webhookFilters` were provided, false otherwise WebhookTriggersBatchBuild: jsii.Boolean(true), // optional, default is false WebhookFilters: []filterGroup{ codebuild.*filterGroup_InEventOf(codebuild.EventAction_PUSH).AndBranchIs(jsii.String("main")).AndCommitMessageIs(jsii.String("the commit message")), }, })
func FilterGroup_InEventOf ¶
func FilterGroup_InEventOf(actions ...EventAction) FilterGroup
Creates a new event FilterGroup that triggers on any of the provided actions.
type GitHubEnterpriseSourceCredentials ¶
type GitHubEnterpriseSourceCredentials interface { awscdk.Resource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The source credentials used when contacting the GitHub Enterprise API.
**Note**: CodeBuild only allows a single credential for GitHub Enterprise to be saved in a given AWS account in a given region - any attempt to add more than one will result in an error.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var secretValue secretValue gitHubEnterpriseSourceCredentials := awscdk.Aws_codebuild.NewGitHubEnterpriseSourceCredentials(this, jsii.String("MyGitHubEnterpriseSourceCredentials"), &GitHubEnterpriseSourceCredentialsProps{ AccessToken: secretValue, })
func NewGitHubEnterpriseSourceCredentials ¶
func NewGitHubEnterpriseSourceCredentials(scope constructs.Construct, id *string, props *GitHubEnterpriseSourceCredentialsProps) GitHubEnterpriseSourceCredentials
type GitHubEnterpriseSourceCredentialsProps ¶
type GitHubEnterpriseSourceCredentialsProps struct {
// The personal access token to use when contacting the instance of the GitHub Enterprise API.
AccessToken awscdk.SecretValue `field:"required" json:"accessToken" yaml:"accessToken"`
}
Creation properties for `GitHubEnterpriseSourceCredentials`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var secretValue secretValue gitHubEnterpriseSourceCredentialsProps := &GitHubEnterpriseSourceCredentialsProps{ AccessToken: secretValue, }
type GitHubEnterpriseSourceProps ¶
type GitHubEnterpriseSourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` // The HTTPS URL of the repository in your GitHub Enterprise installation. HttpsCloneUrl *string `field:"required" json:"httpsCloneUrl" yaml:"httpsCloneUrl"` // The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. // // Example: // "mybranch" // // Default: the default branch's HEAD commit ID is used. // BranchOrRef *string `field:"optional" json:"branchOrRef" yaml:"branchOrRef"` // This parameter is used for the `context` parameter in the GitHub commit status. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "My build #$CODEBUILD_BUILD_NUMBER" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)". // BuildStatusContext *string `field:"optional" json:"buildStatusContext" yaml:"buildStatusContext"` // The URL that the build will report back to the source provider. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "$CODEBUILD_PUBLIC_BUILD_URL" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: - link to the AWS Console for CodeBuild to a particular build execution. // BuildStatusUrl *string `field:"optional" json:"buildStatusUrl" yaml:"buildStatusUrl"` // 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 of the project. CloneDepth *float64 `field:"optional" json:"cloneDepth" yaml:"cloneDepth"` // Whether to fetch submodules while cloning git repo. // Default: false. // FetchSubmodules *bool `field:"optional" json:"fetchSubmodules" yaml:"fetchSubmodules"` // Whether to ignore SSL errors when connecting to the repository. // Default: false. // IgnoreSslErrors *bool `field:"optional" json:"ignoreSslErrors" yaml:"ignoreSslErrors"` // Whether to send notifications on your build's start and end. // Default: true. // ReportBuildStatus *bool `field:"optional" json:"reportBuildStatus" yaml:"reportBuildStatus"` // Whether to create a webhook that will trigger a build every time an event happens in the repository. // Default: true if any `webhookFilters` were provided, false otherwise. // Webhook *bool `field:"optional" json:"webhook" yaml:"webhook"` // A list of webhook filters that can constraint what events in the repository will trigger a build. // // A build is triggered if any of the provided filter groups match. // Only valid if `webhook` was not provided as false. // Default: every push and every Pull Request (create or update) triggers a build. // WebhookFilters *[]FilterGroup `field:"optional" json:"webhookFilters" yaml:"webhookFilters"` // Trigger a batch build from a webhook instead of a standard one. // // Enabling this will enable batch builds on the CodeBuild project. // Default: false. // WebhookTriggersBatchBuild *bool `field:"optional" json:"webhookTriggersBatchBuild" yaml:"webhookTriggersBatchBuild"` }
Construction properties for `GitHubEnterpriseSource`.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: codebuild.Source_GitHubEnterprise(&GitHubEnterpriseSourceProps{ HttpsCloneUrl: jsii.String("https://my-github-enterprise.com/owner/repo"), }), // Enable Docker AND custom caching Cache: codebuild.Cache_Local(codebuild.LocalCacheMode_DOCKER_LAYER, codebuild.LocalCacheMode_CUSTOM), // BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can // also come from 'buildspec.yml' in your source. BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("..."), }, }, }, "cache": map[string][]*string{ "paths": []*string{ jsii.String("/root/cachedir/**/*"), }, }, }), })
type GitHubSourceCredentials ¶
type GitHubSourceCredentials interface { awscdk.Resource // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The source credentials used when contacting the GitHub API.
**Note**: CodeBuild only allows a single credential for GitHub to be saved in a given AWS account in a given region - any attempt to add more than one will result in an error.
Example:
codebuild.NewGitHubSourceCredentials(this, jsii.String("CodeBuildGitHubCreds"), &GitHubSourceCredentialsProps{ AccessToken: awscdk.SecretValue_SecretsManager(jsii.String("my-token")), })
func NewGitHubSourceCredentials ¶
func NewGitHubSourceCredentials(scope constructs.Construct, id *string, props *GitHubSourceCredentialsProps) GitHubSourceCredentials
type GitHubSourceCredentialsProps ¶
type GitHubSourceCredentialsProps struct {
// The personal access token to use when contacting the GitHub API.
AccessToken awscdk.SecretValue `field:"required" json:"accessToken" yaml:"accessToken"`
}
Creation properties for `GitHubSourceCredentials`.
Example:
codebuild.NewGitHubSourceCredentials(this, jsii.String("CodeBuildGitHubCreds"), &GitHubSourceCredentialsProps{ AccessToken: awscdk.SecretValue_SecretsManager(jsii.String("my-token")), })
type GitHubSourceProps ¶
type GitHubSourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` // The GitHub account/user that owns the repo. // // Example: // "awslabs" // Owner *string `field:"required" json:"owner" yaml:"owner"` // The name of the repo (without the username). // // Example: // "aws-cdk" // Repo *string `field:"required" json:"repo" yaml:"repo"` // The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. // // Example: // "mybranch" // // Default: the default branch's HEAD commit ID is used. // BranchOrRef *string `field:"optional" json:"branchOrRef" yaml:"branchOrRef"` // This parameter is used for the `context` parameter in the GitHub commit status. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "My build #$CODEBUILD_BUILD_NUMBER" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)". // BuildStatusContext *string `field:"optional" json:"buildStatusContext" yaml:"buildStatusContext"` // The URL that the build will report back to the source provider. // // Can use built-in CodeBuild variables, like $AWS_REGION. // // Example: // "$CODEBUILD_PUBLIC_BUILD_URL" // // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html // // Default: - link to the AWS Console for CodeBuild to a particular build execution. // BuildStatusUrl *string `field:"optional" json:"buildStatusUrl" yaml:"buildStatusUrl"` // 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 of the project. CloneDepth *float64 `field:"optional" json:"cloneDepth" yaml:"cloneDepth"` // Whether to fetch submodules while cloning git repo. // Default: false. // FetchSubmodules *bool `field:"optional" json:"fetchSubmodules" yaml:"fetchSubmodules"` // Whether to send notifications on your build's start and end. // Default: true. // ReportBuildStatus *bool `field:"optional" json:"reportBuildStatus" yaml:"reportBuildStatus"` // Whether to create a webhook that will trigger a build every time an event happens in the repository. // Default: true if any `webhookFilters` were provided, false otherwise. // Webhook *bool `field:"optional" json:"webhook" yaml:"webhook"` // A list of webhook filters that can constraint what events in the repository will trigger a build. // // A build is triggered if any of the provided filter groups match. // Only valid if `webhook` was not provided as false. // Default: every push and every Pull Request (create or update) triggers a build. // WebhookFilters *[]FilterGroup `field:"optional" json:"webhookFilters" yaml:"webhookFilters"` // Trigger a batch build from a webhook instead of a standard one. // // Enabling this will enable batch builds on the CodeBuild project. // Default: false. // WebhookTriggersBatchBuild *bool `field:"optional" json:"webhookTriggersBatchBuild" yaml:"webhookTriggersBatchBuild"` }
Construction properties for `GitHubSource` and `GitHubEnterpriseSource`.
Example:
project := codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromSourceFilename(jsii.String("my-buildspec.yml")), Source: codebuild.Source_GitHub(&GitHubSourceProps{ Owner: jsii.String("awslabs"), Repo: jsii.String("aws-cdk"), }), })
type IArtifacts ¶
type IArtifacts interface { // Callback when an Artifacts class is used in a CodeBuild Project. Bind(scope constructs.Construct, project IProject) *ArtifactsConfig // The artifact identifier. // // This property is required on secondary artifacts. Identifier() *string // The CodeBuild type of this artifact. Type() *string }
The abstract interface of a CodeBuild build output.
Implemented by `Artifacts`.
func Artifacts_S3 ¶
func Artifacts_S3(props *S3ArtifactsProps) IArtifacts
type IBindableBuildImage ¶
type IBindableBuildImage interface { IBuildImage // Function that allows the build image access to the construct tree. Bind(scope constructs.Construct, project IProject, options *BuildImageBindOptions) *BuildImageConfig }
A variant of `IBuildImage` that allows binding to the project.
type IBuildImage ¶
type IBuildImage interface { // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(buildEnvironment *BuildEnvironment) *[]*string // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html // ImageId() *string // The type of principal that CodeBuild will use to pull this build Docker image. // Default: ImagePullPrincipalType.SERVICE_ROLE // ImagePullPrincipalType() ImagePullPrincipalType // An optional ECR repository that the image is hosted in. // Default: no repository. // Repository() awsecr.IRepository // The secretsManagerCredentials for access to a private registry. // Default: no credentials will be used. // SecretsManagerCredentials() awssecretsmanager.ISecret // The type of build environment. Type() *string }
Represents a Docker image used for the CodeBuild Project builds.
Use the concrete subclasses, either: `LinuxBuildImage` or `WindowsBuildImage`.
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_1_0 ¶ added in v2.16.0
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_1_0() IBuildImage
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_2_0 ¶ added in v2.16.0
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_2_0() IBuildImage
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_3_0 ¶ added in v2.78.0
func LinuxArmBuildImage_AMAZON_LINUX_2_STANDARD_3_0() IBuildImage
func LinuxArmBuildImage_FromCodeBuildImageId ¶ added in v2.16.0
func LinuxArmBuildImage_FromCodeBuildImageId(id *string) IBuildImage
Uses a Docker image provided by CodeBuild.
Returns: A Docker image provided by CodeBuild.
Example:
"aws/codebuild/amazonlinux2-aarch64-standard:1.0"
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
func LinuxArmBuildImage_FromDockerRegistry ¶ added in v2.88.0
func LinuxArmBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions) IBuildImage
Returns: a x86-64 Linux build image from a Docker Hub image.
func LinuxArmBuildImage_FromEcrRepository ¶ added in v2.16.0
func LinuxArmBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) IBuildImage
Returns an ARM image running Linux from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.
Returns: An aarch64 Linux build image from an ECR repository. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21 ¶ added in v2.127.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_NODE_20 ¶ added in v2.127.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_NODE_20() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12 ¶ added in v2.127.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_GO_1_21 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_GO_1_21() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_NODE_18 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_NODE_18() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11() IBuildImage
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2 ¶ added in v2.117.0
func LinuxArmLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2 ¶
func LinuxBuildImage_AMAZON_LINUX_2() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_2 ¶
func LinuxBuildImage_AMAZON_LINUX_2_2() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_3 ¶
func LinuxBuildImage_AMAZON_LINUX_2_3() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_4 ¶ added in v2.32.0
func LinuxBuildImage_AMAZON_LINUX_2_4() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_5 ¶ added in v2.87.0
func LinuxBuildImage_AMAZON_LINUX_2_5() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_ARM ¶
func LinuxBuildImage_AMAZON_LINUX_2_ARM() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_ARM_2 ¶
func LinuxBuildImage_AMAZON_LINUX_2_ARM_2() IBuildImage
func LinuxBuildImage_AMAZON_LINUX_2_ARM_3 ¶ added in v2.78.0
func LinuxBuildImage_AMAZON_LINUX_2_ARM_3() IBuildImage
func LinuxBuildImage_FromAsset ¶
func LinuxBuildImage_FromAsset(scope constructs.Construct, id *string, props *awsecrassets.DockerImageAssetProps) IBuildImage
Uses an Docker image asset as a x86-64 Linux build image.
func LinuxBuildImage_FromCodeBuildImageId ¶
func LinuxBuildImage_FromCodeBuildImageId(id *string) IBuildImage
Uses a Docker image provided by CodeBuild.
Returns: A Docker image provided by CodeBuild.
Example:
"aws/codebuild/standard:4.0"
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
func LinuxBuildImage_FromDockerRegistry ¶
func LinuxBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions) IBuildImage
Returns: a x86-64 Linux build image from a Docker Hub image.
func LinuxBuildImage_FromEcrRepository ¶
func LinuxBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string) IBuildImage
Returns: A x86-64 Linux build image from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
func LinuxBuildImage_STANDARD_1_0 ¶
func LinuxBuildImage_STANDARD_1_0() IBuildImage
func LinuxBuildImage_STANDARD_2_0 ¶
func LinuxBuildImage_STANDARD_2_0() IBuildImage
func LinuxBuildImage_STANDARD_3_0 ¶
func LinuxBuildImage_STANDARD_3_0() IBuildImage
func LinuxBuildImage_STANDARD_4_0 ¶
func LinuxBuildImage_STANDARD_4_0() IBuildImage
func LinuxBuildImage_STANDARD_5_0 ¶
func LinuxBuildImage_STANDARD_5_0() IBuildImage
func LinuxBuildImage_STANDARD_6_0 ¶ added in v2.32.0
func LinuxBuildImage_STANDARD_6_0() IBuildImage
func LinuxBuildImage_STANDARD_7_0 ¶ added in v2.76.0
func LinuxBuildImage_STANDARD_7_0() IBuildImage
func LinuxGpuBuildImage_AwsDeepLearningContainersImage ¶
func LinuxGpuBuildImage_AwsDeepLearningContainersImage(repositoryName *string, tag *string, account *string) IBuildImage
Returns a Linux GPU build image from AWS Deep Learning Containers. See: https://aws.amazon.com/releasenotes/available-deep-learning-containers-images
func LinuxGpuBuildImage_DLC_MXNET_1_4_1 ¶
func LinuxGpuBuildImage_DLC_MXNET_1_4_1() IBuildImage
func LinuxGpuBuildImage_DLC_MXNET_1_6_0 ¶
func LinuxGpuBuildImage_DLC_MXNET_1_6_0() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_2_0 ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_2_0() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_3_1 ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_3_1() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_INFERENCE ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_INFERENCE() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_TRAINING ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_4_0_TRAINING() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_INFERENCE ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_INFERENCE() IBuildImage
func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_TRAINING ¶
func LinuxGpuBuildImage_DLC_PYTORCH_1_5_0_TRAINING() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_14_0 ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_14_0() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_0 ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_0() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_INFERENCE ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_INFERENCE() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_TRAINING ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_1_15_2_TRAINING() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_0 ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_0() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_1 ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_0_1() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_INFERENCE ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_INFERENCE() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_TRAINING ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_TRAINING() IBuildImage
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_2_0_TRAINING ¶
func LinuxGpuBuildImage_DLC_TENSORFLOW_2_2_0_TRAINING() IBuildImage
func LinuxGpuBuildImage_FromEcrRepository ¶
func LinuxGpuBuildImage_FromEcrRepository(repository awsecr.IRepository, tag *string) IBuildImage
Returns a GPU image running Linux from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21 ¶ added in v2.127.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_CORRETTO_21() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_NODE_20 ¶ added in v2.127.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_NODE_20() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12 ¶ added in v2.127.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2023_PYTHON_3_12() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_17() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_DOTNET_6() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_GO_1_21 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_GO_1_21() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_NODE_18 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_NODE_18() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_PYTHON_3_11() IBuildImage
func LinuxLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2 ¶ added in v2.117.0
func LinuxLambdaBuildImage_AMAZON_LINUX_2_RUBY_3_2() IBuildImage
func WindowsBuildImage_FromAsset ¶
func WindowsBuildImage_FromAsset(scope constructs.Construct, id *string, props *awsecrassets.DockerImageAssetProps, imageType WindowsImageType) IBuildImage
Uses an Docker image asset as a Windows build image.
func WindowsBuildImage_FromDockerRegistry ¶
func WindowsBuildImage_FromDockerRegistry(name *string, options *DockerImageOptions, imageType WindowsImageType) IBuildImage
Returns: a Windows build image from a Docker Hub image.
func WindowsBuildImage_FromEcrRepository ¶
func WindowsBuildImage_FromEcrRepository(repository awsecr.IRepository, tagOrDigest *string, imageType WindowsImageType) IBuildImage
Returns: A Windows build image from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
func WindowsBuildImage_WINDOWS_BASE_2_0 ¶
func WindowsBuildImage_WINDOWS_BASE_2_0() IBuildImage
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE ¶
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE() IBuildImage
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_2_0 ¶ added in v2.44.0
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_2_0() IBuildImage
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_3_0 ¶ added in v2.132.0
func WindowsBuildImage_WIN_SERVER_CORE_2019_BASE_3_0() IBuildImage
type IFileSystemLocation ¶
type IFileSystemLocation interface { // Called by the project when a file system is added so it can perform binding operations on this file system location. Bind(scope constructs.Construct, project IProject) *FileSystemConfig }
The interface of a CodeBuild FileSystemLocation.
Implemented by `EfsFileSystemLocation`.
func FileSystemLocation_Efs ¶
func FileSystemLocation_Efs(props *EfsFileSystemLocationProps) IFileSystemLocation
EFS file system provider.
type IProject ¶
type IProject interface { awsec2.IConnectable awsiam.IGrantable awscodestarnotifications.INotificationRuleSource awscdk.IResource AddToRolePolicy(policyStatement awsiam.PolicyStatement) // Enable batch builds. // // Returns an object contining the batch service role if batch builds // could be enabled. EnableBatchBuilds() *BatchBuildConfig // Returns: a CloudWatch metric associated with this build project. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds triggered. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the duration of all builds over time. // // Units: Seconds // // Valid CloudWatch statistics: Average (recommended), Maximum, Minimum. // Default: average over 5 minutes. // MetricDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds that failed because of client error or because of a timeout. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricFailedBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of successful builds. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricSucceededBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to `onEvent` API. // // You can also use the methods `notifyOnBuildSucceeded` and // `notifyOnBuildFailed` to define rules for these specific event emitted. // // Returns: CodeStar Notifications rule associated with this build project. NotifyOn(id *string, target awscodestarnotifications.INotificationRuleTarget, options *ProjectNotifyOnOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build fails. NotifyOnBuildFailed(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build completes successfully. NotifyOnBuildSucceeded(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines an event rule which triggers when a build fails. OnBuildFailed(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build starts. OnBuildStarted(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build completes successfully. OnBuildSucceeded(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when something happens with this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule that triggers upon phase change of this build project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnPhaseChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when the build project state changes. // // You can filter specific build status events using an event // pattern filter on the `build-status` detail field: // // const rule = project.onStateChange('OnBuildStarted', { target }); // rule.addEventPattern({ // detail: { // 'build-status': [ // "IN_PROGRESS", // "SUCCEEDED", // "FAILED", // "STOPPED" // ] // } // }); // // You can also use the methods `onBuildFailed` and `onBuildSucceeded` to define rules for // these specific state changes. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnStateChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // The ARN of this Project. ProjectArn() *string // The human-visible name of this Project. ProjectName() *string // The IAM service Role of this Project. // // Undefined for imported Projects. Role() awsiam.IRole }
func PipelineProject_FromProjectName ¶
func PipelineProject_FromProjectName(scope constructs.Construct, id *string, projectName *string) IProject
Import a Project defined either outside the CDK, or in a different CDK Stack (and exported using the `export` method).
Returns: a reference to the existing Project.
func Project_FromProjectArn ¶
func Project_FromProjectName ¶
Import a Project defined either outside the CDK, or in a different CDK Stack (and exported using the `export` method).
Returns: a reference to the existing Project.
type IReportGroup ¶
type IReportGroup interface { awscdk.IResource // Grants the given entity permissions to write (that is, upload reports to) this report group. GrantWrite(identity awsiam.IGrantable) awsiam.Grant // The ARN of the ReportGroup. ReportGroupArn() *string // The name of the ReportGroup. ReportGroupName() *string }
The interface representing the ReportGroup resource - either an existing one, imported using the `ReportGroup.fromReportGroupName` method, or a new one, created with the `ReportGroup` class.
func ReportGroup_FromReportGroupName ¶
func ReportGroup_FromReportGroupName(scope constructs.Construct, id *string, reportGroupName *string) IReportGroup
Reference an existing ReportGroup, defined outside of the CDK code, by name.
type ISource ¶
type ISource interface { Bind(scope constructs.Construct, project IProject) *SourceConfig BadgeSupported() *bool Identifier() *string Type() *string }
The abstract interface of a CodeBuild source.
Implemented by `Source`.
func Source_BitBucket ¶
func Source_BitBucket(props *BitBucketSourceProps) ISource
func Source_CodeCommit ¶
func Source_CodeCommit(props *CodeCommitSourceProps) ISource
func Source_GitHub ¶
func Source_GitHub(props *GitHubSourceProps) ISource
func Source_GitHubEnterprise ¶
func Source_GitHubEnterprise(props *GitHubEnterpriseSourceProps) ISource
func Source_S3 ¶
func Source_S3(props *S3SourceProps) ISource
type ImagePullPrincipalType ¶
type ImagePullPrincipalType string
The type of principal CodeBuild will use to pull your build Docker image.
const ( // CODEBUILD specifies that CodeBuild uses its own identity when pulling the image. // // This means the resource policy of the ECR repository that hosts the image will be modified to trust // CodeBuild's service principal. // This is the required principal type when using CodeBuild's pre-defined images. ImagePullPrincipalType_CODEBUILD ImagePullPrincipalType = "CODEBUILD" // SERVICE_ROLE specifies that AWS CodeBuild uses the project's role when pulling the image. // // The role will be granted pull permissions on the ECR repository hosting the image. ImagePullPrincipalType_SERVICE_ROLE ImagePullPrincipalType = "SERVICE_ROLE" )
type LinuxArmBuildImage ¶ added in v2.16.0
type LinuxArmBuildImage interface { IBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of principal that CodeBuild will use to pull this build Docker image. ImagePullPrincipalType() ImagePullPrincipalType // An optional ECR repository that the image is hosted in. Repository() awsecr.IRepository // The secretsManagerCredentials for access to a private registry. SecretsManagerCredentials() awssecretsmanager.ISecret // The type of build environment. Type() *string // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE. Validate(buildEnvironment *BuildEnvironment) *[]*string }
A CodeBuild image running aarch64 Linux.
This class has a bunch of public constants that represent the CodeBuild ARM images.
You can also specify a custom image using the static method:
- LinuxBuildImage.fromEcrRepository(repo[, tag]) - LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" linuxArmBuildImage := awscdk.Aws_codebuild.LinuxArmBuildImage_FromCodeBuildImageId(jsii.String("id"))
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
type LinuxArmLambdaBuildImage ¶ added in v2.117.0
type LinuxArmLambdaBuildImage interface { IBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of build environment. Type() *string // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(buildEnvironment *BuildEnvironment) *[]*string }
A CodeBuild image running aarch64 Lambda.
This class has a bunch of public constants that represent the CodeBuild aarch64 Lambda images.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" linuxArmLambdaBuildImage := awscdk.Aws_codebuild.LinuxArmLambdaBuildImage_AMAZON_LINUX_2_CORRETTO_11()
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
type LinuxBuildImage ¶
type LinuxBuildImage interface { IBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of principal that CodeBuild will use to pull this build Docker image. ImagePullPrincipalType() ImagePullPrincipalType // An optional ECR repository that the image is hosted in. Repository() awsecr.IRepository // The secretsManagerCredentials for access to a private registry. SecretsManagerCredentials() awssecretsmanager.ISecret // The type of build environment. Type() *string // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(env *BuildEnvironment) *[]*string }
A CodeBuild image running x86-64 Linux.
This class has a bunch of public constants that represent the most popular images.
You can also specify a custom image using one of the static methods:
- LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }]) - LinuxBuildImage.fromEcrRepository(repo[, tag]) - LinuxBuildImage.fromAsset(parent, id, props)
Example:
pipeline := pipelines.NewCodePipeline(this, jsii.String("Pipeline"), &CodePipelineProps{ Synth: pipelines.NewShellStep(jsii.String("Synth"), &ShellStepProps{ Input: pipelines.CodePipelineSource_Connection(jsii.String("my-org/my-app"), jsii.String("main"), &ConnectionSourceOptions{ ConnectionArn: jsii.String("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41"), }), Commands: []*string{ jsii.String("npm ci"), jsii.String("npm run build"), jsii.String("npx cdk synth"), }, }), // Turn this on because the pipeline uses Docker image assets DockerEnabledForSelfMutation: jsii.Boolean(true), }) pipeline.AddWave(jsii.String("MyWave"), &WaveOptions{ Post: []step{ pipelines.NewCodeBuildStep(jsii.String("RunApproval"), &CodeBuildStepProps{ Commands: []*string{ jsii.String("command-from-image"), }, BuildEnvironment: &BuildEnvironment{ // The user of a Docker image asset in the pipeline requires turning on // 'dockerEnabledForSelfMutation'. BuildImage: codebuild.LinuxBuildImage_FromAsset(this, jsii.String("Image"), &DockerImageAssetProps{ Directory: jsii.String("./docker-image"), }), }, }), }, })
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
type LinuxGpuBuildImage ¶
type LinuxGpuBuildImage interface { IBindableBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of principal that CodeBuild will use to pull this build Docker image. ImagePullPrincipalType() ImagePullPrincipalType // The type of build environment. Type() *string // Function that allows the build image access to the construct tree. Bind(scope constructs.Construct, project IProject, _options *BuildImageBindOptions) *BuildImageConfig // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(buildEnvironment *BuildEnvironment) *[]*string }
A CodeBuild GPU image running Linux.
This class has public constants that represent the most popular GPU images from AWS Deep Learning Containers.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.LinuxGpuBuildImage_DLC_TENSORFLOW_2_1_0_INFERENCE(), }, })
See: https://aws.amazon.com/releasenotes/available-deep-learning-containers-images
type LinuxLambdaBuildImage ¶ added in v2.117.0
type LinuxLambdaBuildImage interface { IBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of build environment. Type() *string // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(buildEnvironment *BuildEnvironment) *[]*string }
A CodeBuild image running x86-64 Lambda.
This class has a bunch of public constants that represent the CodeBuild Lambda x86-64 images.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.LinuxLambdaBuildImage_AMAZON_LINUX_2_NODE_18(), }, })
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
type LocalCacheMode ¶
type LocalCacheMode string
Local cache modes to enable for the CodeBuild Project.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: codebuild.Source_GitHubEnterprise(&GitHubEnterpriseSourceProps{ HttpsCloneUrl: jsii.String("https://my-github-enterprise.com/owner/repo"), }), // Enable Docker AND custom caching Cache: codebuild.Cache_Local(codebuild.LocalCacheMode_DOCKER_LAYER, codebuild.LocalCacheMode_CUSTOM), // BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can // also come from 'buildspec.yml' in your source. BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("..."), }, }, }, "cache": map[string][]*string{ "paths": []*string{ jsii.String("/root/cachedir/**/*"), }, }, }), })
const ( // Caches Git metadata for primary and secondary sources. LocalCacheMode_SOURCE LocalCacheMode = "SOURCE" // Caches existing Docker layers. LocalCacheMode_DOCKER_LAYER LocalCacheMode = "DOCKER_LAYER" // Caches directories you specify in the buildspec file. LocalCacheMode_CUSTOM LocalCacheMode = "CUSTOM" )
type LoggingOptions ¶
type LoggingOptions struct { // Information about Amazon CloudWatch Logs for a build project. // Default: - enabled. // CloudWatch *CloudWatchLoggingOptions `field:"optional" json:"cloudWatch" yaml:"cloudWatch"` // Information about logs built to an S3 bucket for a build project. // Default: - disabled. // S3 *S3LoggingOptions `field:"optional" json:"s3" yaml:"s3"` }
Information about logs for the build project.
A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Logging: &LoggingOptions{ CloudWatch: &CloudWatchLoggingOptions{ LogGroup: logs.NewLogGroup(this, jsii.String("MyLogGroup")), }, }, })
type PhaseChangeEvent ¶
type PhaseChangeEvent interface { }
Event fields for the CodeBuild "phase change" event. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html#sample-build-notifications-ref
type PipelineProject ¶
type PipelineProject interface { Project // Access the Connections object. // // Will fail if this Project does not have a VPC set. Connections() awsec2.Connections // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The ARN of the project. ProjectArn() *string // The name of the project. ProjectName() *string // The IAM role for this project. Role() awsiam.IRole // The stack in which this resource is defined. Stack() awscdk.Stack // Adds a fileSystemLocation to the Project. AddFileSystemLocation(fileSystemLocation IFileSystemLocation) // Adds a secondary artifact to the Project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // AddSecondaryArtifact(secondaryArtifact IArtifacts) // Adds a secondary source to the Project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // AddSecondarySource(secondarySource ISource) // Add a permission only if there's a policy attached. AddToRolePolicy(statement awsiam.PolicyStatement) // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Returns a source configuration for notification rule. BindAsNotificationRuleSource(_scope constructs.Construct) *awscodestarnotifications.NotificationRuleSourceConfig // A callback invoked when the given project is added to a CodePipeline. BindToCodePipeline(_scope constructs.Construct, options *BindToCodePipelineOptions) // Enable batch builds. // // Returns an object contining the batch service role if batch builds // could be enabled. EnableBatchBuilds() *BatchBuildConfig GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns: a CloudWatch metric associated with this build project. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds triggered. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the duration of all builds over time. // // Units: Seconds // // Valid CloudWatch statistics: Average (recommended), Maximum, Minimum. // Default: average over 5 minutes. // MetricDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds that failed because of client error or because of a timeout. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricFailedBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of successful builds. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricSucceededBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to `onEvent` API. // // You can also use the methods `notifyOnBuildSucceeded` and // `notifyOnBuildFailed` to define rules for these specific event emitted. NotifyOn(id *string, target awscodestarnotifications.INotificationRuleTarget, options *ProjectNotifyOnOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build fails. NotifyOnBuildFailed(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build completes successfully. NotifyOnBuildSucceeded(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines an event rule which triggers when a build fails. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildFailed(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build starts. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildStarted(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build completes successfully. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildSucceeded(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when something happens with this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule that triggers upon phase change of this build project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnPhaseChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when the build project state changes. // // You can filter specific build status events using an event // pattern filter on the `build-status` detail field: // // const rule = project.onStateChange('OnBuildStarted', { target }); // rule.addEventPattern({ // detail: { // 'build-status': [ // "IN_PROGRESS", // "SUCCEEDED", // "FAILED", // "STOPPED" // ] // } // }); // // You can also use the methods `onBuildFailed` and `onBuildSucceeded` to define rules for // these specific state changes. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnStateChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Returns a string representation of this construct. ToString() *string }
A convenience class for CodeBuild Projects that are used in CodePipeline.
Example:
// Create a Cloudfront Web Distribution import cloudfront "github.com/aws/aws-cdk-go/awscdk" var distribution distribution // Create the build project that will invalidate the cache invalidateBuildProject := codebuild.NewPipelineProject(this, jsii.String("InvalidateProject"), &PipelineProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""), }, }, }, }), EnvironmentVariables: map[string]buildEnvironmentVariable{ "CLOUDFRONT_ID": &buildEnvironmentVariable{ "value": distribution.distributionId, }, }, }) // Add Cloudfront invalidation permissions to the project distributionArn := fmt.Sprintf("arn:aws:cloudfront::%v:distribution/%v", this.Account, distribution.DistributionId) invalidateBuildProject.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Resources: []*string{ distributionArn, }, Actions: []*string{ jsii.String("cloudfront:CreateInvalidation"), }, })) // Create the pipeline (here only the S3 deploy and Invalidate cache build) deployBucket := s3.NewBucket(this, jsii.String("DeployBucket")) deployInput := codepipeline.NewArtifact() codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{ Stages: []stageProps{ &stageProps{ StageName: jsii.String("Deploy"), Actions: []iAction{ codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{ ActionName: jsii.String("S3Deploy"), Bucket: deployBucket, Input: deployInput, RunOrder: jsii.Number(1), }), codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{ ActionName: jsii.String("InvalidateCache"), Project: invalidateBuildProject, Input: deployInput, RunOrder: jsii.Number(2), }), }, }, }, })
func NewPipelineProject ¶
func NewPipelineProject(scope constructs.Construct, id *string, props *PipelineProjectProps) PipelineProject
type PipelineProjectProps ¶
type PipelineProjectProps struct { // Whether to allow the CodeBuild to send all network traffic. // // If set to false, you must individually add traffic rules to allow the // CodeBuild project to connect to network targets. // // Only used if 'vpc' is supplied. // Default: true. // AllowAllOutbound *bool `field:"optional" json:"allowAllOutbound" yaml:"allowAllOutbound"` // Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. // // For more information, see Build Badges Sample // in the AWS CodeBuild User Guide. // Default: false. // Badge *bool `field:"optional" json:"badge" yaml:"badge"` // Filename or contents of buildspec in JSON format. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example // // Default: - Empty buildspec. // BuildSpec BuildSpec `field:"optional" json:"buildSpec" yaml:"buildSpec"` // Caching strategy to use. // Default: Cache.none // Cache Cache `field:"optional" json:"cache" yaml:"cache"` // Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. // Default: true. // CheckSecretsInPlainTextEnvVariables *bool `field:"optional" json:"checkSecretsInPlainTextEnvVariables" yaml:"checkSecretsInPlainTextEnvVariables"` // Maximum number of concurrent builds. // // Minimum value is 1 and maximum is account build limit. // Default: - no explicit limit is set. // ConcurrentBuildLimit *float64 `field:"optional" json:"concurrentBuildLimit" yaml:"concurrentBuildLimit"` // A description of the project. // // Use the description to identify the purpose // of the project. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Encryption key to use to read and write artifacts. // Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Build environment to use for the build. // Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0 // Environment *BuildEnvironment `field:"optional" json:"environment" yaml:"environment"` // Additional environment variables to add to the build environment. // Default: - No additional environment variables are specified. // EnvironmentVariables *map[string]*BuildEnvironmentVariable `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // An ProjectFileSystemLocation objects for a CodeBuild build project. // // A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, // and type of a file system created using Amazon Elastic File System. // Default: - no file system locations. // FileSystemLocations *[]IFileSystemLocation `field:"optional" json:"fileSystemLocations" yaml:"fileSystemLocations"` // Add permissions to this project's role to create and use test report groups with name starting with the name of this project. // // That is the standard report group that gets created when a simple name // (in contrast to an ARN) // is used in the 'reports' section of the buildspec of this project. // This is usually harmless, but you can turn these off if you don't plan on using test // reports in this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html // // Default: true. // GrantReportGroupPermissions *bool `field:"optional" json:"grantReportGroupPermissions" yaml:"grantReportGroupPermissions"` // Information about logs for the build project. // // A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. // Default: - no log configuration is set. // Logging *LoggingOptions `field:"optional" json:"logging" yaml:"logging"` // The physical, human-readable name of the CodeBuild Project. // Default: - Name is automatically generated. // ProjectName *string `field:"optional" json:"projectName" yaml:"projectName"` // The number of minutes after which AWS CodeBuild stops the build if it's still in queue. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: - no queue timeout is set. // QueuedTimeout awscdk.Duration `field:"optional" json:"queuedTimeout" yaml:"queuedTimeout"` // Service Role to assume while running the build. // Default: - A role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // What security group to associate with the codebuild project's network interfaces. // // If no security group is identified, one will be created automatically. // // Only used if 'vpc' is supplied. // Default: - Security group will be automatically created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Add the permissions necessary for debugging builds with SSM Session Manager. // // If the following prerequisites have been met: // // - The necessary permissions have been added by setting this flag to true. // - The build image has the SSM agent installed (true for default CodeBuild images). // - The build is started with [debugSessionEnabled](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html#CodeBuild-StartBuild-request-debugSessionEnabled) set to true. // // Then the build container can be paused and inspected using Session Manager // by invoking the `codebuild-breakpoint` command somewhere during the build. // // `codebuild-breakpoint` commands will be ignored if the build is not started // with `debugSessionEnabled=true`. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html // // Default: false. // SsmSessionPermissions *bool `field:"optional" json:"ssmSessionPermissions" yaml:"ssmSessionPermissions"` // Where to place the network interfaces within the VPC. // // To access AWS services, your CodeBuild project needs to be in one of the following types of subnets: // // 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS). // 2. Private subnets unconnected to the internet, but with [VPC endpoints](https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html) for the necessary services. // // If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, // then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need // AWS service access, add VPC Endpoints to your private subnets. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html for more details. // // Default: - private subnets if available else public subnets. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // The number of minutes after which AWS CodeBuild stops the build if it's not complete. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: Duration.hours(1) // Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"` // VPC network to place codebuild network interfaces. // // Specify this if the codebuild project needs to access resources in a VPC. // Default: - No VPC is specified. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Example:
// Create a Cloudfront Web Distribution import cloudfront "github.com/aws/aws-cdk-go/awscdk" var distribution distribution // Create the build project that will invalidate the cache invalidateBuildProject := codebuild.NewPipelineProject(this, jsii.String("InvalidateProject"), &PipelineProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), "phases": map[string]map[string][]*string{ "build": map[string][]*string{ "commands": []*string{ jsii.String("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""), }, }, }, }), EnvironmentVariables: map[string]buildEnvironmentVariable{ "CLOUDFRONT_ID": &buildEnvironmentVariable{ "value": distribution.distributionId, }, }, }) // Add Cloudfront invalidation permissions to the project distributionArn := fmt.Sprintf("arn:aws:cloudfront::%v:distribution/%v", this.Account, distribution.DistributionId) invalidateBuildProject.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{ Resources: []*string{ distributionArn, }, Actions: []*string{ jsii.String("cloudfront:CreateInvalidation"), }, })) // Create the pipeline (here only the S3 deploy and Invalidate cache build) deployBucket := s3.NewBucket(this, jsii.String("DeployBucket")) deployInput := codepipeline.NewArtifact() codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{ Stages: []stageProps{ &stageProps{ StageName: jsii.String("Deploy"), Actions: []iAction{ codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{ ActionName: jsii.String("S3Deploy"), Bucket: deployBucket, Input: deployInput, RunOrder: jsii.Number(1), }), codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{ ActionName: jsii.String("InvalidateCache"), Project: invalidateBuildProject, Input: deployInput, RunOrder: jsii.Number(2), }), }, }, }, })
type Project ¶
type Project interface { awscdk.Resource IProject // Access the Connections object. // // Will fail if this Project does not have a VPC set. Connections() awsec2.Connections // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The ARN of the project. ProjectArn() *string // The name of the project. ProjectName() *string // The IAM role for this project. Role() awsiam.IRole // The stack in which this resource is defined. Stack() awscdk.Stack // Adds a fileSystemLocation to the Project. AddFileSystemLocation(fileSystemLocation IFileSystemLocation) // Adds a secondary artifact to the Project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // AddSecondaryArtifact(secondaryArtifact IArtifacts) // Adds a secondary source to the Project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // AddSecondarySource(secondarySource ISource) // Add a permission only if there's a policy attached. AddToRolePolicy(statement awsiam.PolicyStatement) // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Returns a source configuration for notification rule. BindAsNotificationRuleSource(_scope constructs.Construct) *awscodestarnotifications.NotificationRuleSourceConfig // A callback invoked when the given project is added to a CodePipeline. BindToCodePipeline(_scope constructs.Construct, options *BindToCodePipelineOptions) // Enable batch builds. // // Returns an object contining the batch service role if batch builds // could be enabled. EnableBatchBuilds() *BatchBuildConfig GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns: a CloudWatch metric associated with this build project. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds triggered. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the duration of all builds over time. // // Units: Seconds // // Valid CloudWatch statistics: Average (recommended), Maximum, Minimum. // Default: average over 5 minutes. // MetricDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of builds that failed because of client error or because of a timeout. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricFailedBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Measures the number of successful builds. // // Units: Count // // Valid CloudWatch statistics: Sum. // Default: sum over 5 minutes. // MetricSucceededBuilds(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Defines a CodeStar Notification rule triggered when the project events emitted by you specified, it very similar to `onEvent` API. // // You can also use the methods `notifyOnBuildSucceeded` and // `notifyOnBuildFailed` to define rules for these specific event emitted. NotifyOn(id *string, target awscodestarnotifications.INotificationRuleTarget, options *ProjectNotifyOnOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build fails. NotifyOnBuildFailed(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines a CodeStar notification rule which triggers when a build completes successfully. NotifyOnBuildSucceeded(id *string, target awscodestarnotifications.INotificationRuleTarget, options *awscodestarnotifications.NotificationRuleOptions) awscodestarnotifications.INotificationRule // Defines an event rule which triggers when a build fails. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildFailed(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build starts. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildStarted(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines an event rule which triggers when a build completes successfully. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. OnBuildSucceeded(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when something happens with this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnEvent(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule that triggers upon phase change of this build project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnPhaseChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Defines a CloudWatch event rule triggered when the build project state changes. // // You can filter specific build status events using an event // pattern filter on the `build-status` detail field: // // const rule = project.onStateChange('OnBuildStarted', { target }); // rule.addEventPattern({ // detail: { // 'build-status': [ // "IN_PROGRESS", // "SUCCEEDED", // "FAILED", // "STOPPED" // ] // } // }); // // You can also use the methods `onBuildFailed` and `onBuildSucceeded` to define rules for // these specific state changes. // // To access fields from the event in the event target input, // use the static fields on the `StateChangeEvent` class. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html // OnStateChange(id *string, options *awsevents.OnEventOptions) awsevents.Rule // Returns a string representation of this construct. ToString() *string }
A representation of a CodeBuild Project.
Example:
var ecrRepository repository codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.WindowsBuildImage_FromEcrRepository(ecrRepository, jsii.String("v1.0"), codebuild.WindowsImageType_SERVER_2019), // optional certificate to include in the build image Certificate: &BuildEnvironmentCertificate{ Bucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("my-bucket")), ObjectKey: jsii.String("path/to/cert.pem"), }, }, })
func NewProject ¶
func NewProject(scope constructs.Construct, id *string, props *ProjectProps) Project
type ProjectNotificationEvents ¶
type ProjectNotificationEvents string
The list of event types for AWS Codebuild. See: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-buildproject
const ( // Trigger notification when project build state failed. ProjectNotificationEvents_BUILD_FAILED ProjectNotificationEvents = "BUILD_FAILED" // Trigger notification when project build state succeeded. ProjectNotificationEvents_BUILD_SUCCEEDED ProjectNotificationEvents = "BUILD_SUCCEEDED" // Trigger notification when project build state in progress. ProjectNotificationEvents_BUILD_IN_PROGRESS ProjectNotificationEvents = "BUILD_IN_PROGRESS" // Trigger notification when project build state stopped. ProjectNotificationEvents_BUILD_STOPPED ProjectNotificationEvents = "BUILD_STOPPED" // Trigger notification when project build phase failure. ProjectNotificationEvents_BUILD_PHASE_FAILED ProjectNotificationEvents = "BUILD_PHASE_FAILED" // Trigger notification when project build phase success. ProjectNotificationEvents_BUILD_PHASE_SUCCEEDED ProjectNotificationEvents = "BUILD_PHASE_SUCCEEDED" )
type ProjectNotifyOnOptions ¶
type ProjectNotifyOnOptions struct { // The level of detail to include in the notifications for this resource. // // BASIC will include only the contents of the event as it would appear in AWS CloudWatch. // FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. // Default: DetailType.FULL // DetailType awscodestarnotifications.DetailType `field:"optional" json:"detailType" yaml:"detailType"` // The status of the notification rule. // // If the enabled is set to DISABLED, notifications aren't sent for the notification rule. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // The name for the notification rule. // // Notification rule names must be unique in your AWS account. // Default: - generated from the `id`. // NotificationRuleName *string `field:"optional" json:"notificationRuleName" yaml:"notificationRuleName"` // A list of event types associated with this notification rule for CodeBuild Project. // // For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide. // See: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api // Events *[]ProjectNotificationEvents `field:"required" json:"events" yaml:"events"` }
Additional options to pass to the notification rule.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" projectNotifyOnOptions := &ProjectNotifyOnOptions{ Events: []projectNotificationEvents{ awscdk.Aws_codebuild.*projectNotificationEvents_BUILD_FAILED, }, // the properties below are optional DetailType: awscdk.Aws_codestarnotifications.DetailType_BASIC, Enabled: jsii.Boolean(false), NotificationRuleName: jsii.String("notificationRuleName"), }
type ProjectProps ¶
type ProjectProps struct { // Whether to allow the CodeBuild to send all network traffic. // // If set to false, you must individually add traffic rules to allow the // CodeBuild project to connect to network targets. // // Only used if 'vpc' is supplied. // Default: true. // AllowAllOutbound *bool `field:"optional" json:"allowAllOutbound" yaml:"allowAllOutbound"` // Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. // // For more information, see Build Badges Sample // in the AWS CodeBuild User Guide. // Default: false. // Badge *bool `field:"optional" json:"badge" yaml:"badge"` // Filename or contents of buildspec in JSON format. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example // // Default: - Empty buildspec. // BuildSpec BuildSpec `field:"optional" json:"buildSpec" yaml:"buildSpec"` // Caching strategy to use. // Default: Cache.none // Cache Cache `field:"optional" json:"cache" yaml:"cache"` // Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. // Default: true. // CheckSecretsInPlainTextEnvVariables *bool `field:"optional" json:"checkSecretsInPlainTextEnvVariables" yaml:"checkSecretsInPlainTextEnvVariables"` // Maximum number of concurrent builds. // // Minimum value is 1 and maximum is account build limit. // Default: - no explicit limit is set. // ConcurrentBuildLimit *float64 `field:"optional" json:"concurrentBuildLimit" yaml:"concurrentBuildLimit"` // A description of the project. // // Use the description to identify the purpose // of the project. // Default: - No description. // Description *string `field:"optional" json:"description" yaml:"description"` // Encryption key to use to read and write artifacts. // Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Build environment to use for the build. // Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0 // Environment *BuildEnvironment `field:"optional" json:"environment" yaml:"environment"` // Additional environment variables to add to the build environment. // Default: - No additional environment variables are specified. // EnvironmentVariables *map[string]*BuildEnvironmentVariable `field:"optional" json:"environmentVariables" yaml:"environmentVariables"` // An ProjectFileSystemLocation objects for a CodeBuild build project. // // A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, // and type of a file system created using Amazon Elastic File System. // Default: - no file system locations. // FileSystemLocations *[]IFileSystemLocation `field:"optional" json:"fileSystemLocations" yaml:"fileSystemLocations"` // Add permissions to this project's role to create and use test report groups with name starting with the name of this project. // // That is the standard report group that gets created when a simple name // (in contrast to an ARN) // is used in the 'reports' section of the buildspec of this project. // This is usually harmless, but you can turn these off if you don't plan on using test // reports in this project. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html // // Default: true. // GrantReportGroupPermissions *bool `field:"optional" json:"grantReportGroupPermissions" yaml:"grantReportGroupPermissions"` // Information about logs for the build project. // // A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both. // Default: - no log configuration is set. // Logging *LoggingOptions `field:"optional" json:"logging" yaml:"logging"` // The physical, human-readable name of the CodeBuild Project. // Default: - Name is automatically generated. // ProjectName *string `field:"optional" json:"projectName" yaml:"projectName"` // The number of minutes after which AWS CodeBuild stops the build if it's still in queue. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: - no queue timeout is set. // QueuedTimeout awscdk.Duration `field:"optional" json:"queuedTimeout" yaml:"queuedTimeout"` // Service Role to assume while running the build. // Default: - A role will be created. // Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // What security group to associate with the codebuild project's network interfaces. // // If no security group is identified, one will be created automatically. // // Only used if 'vpc' is supplied. // Default: - Security group will be automatically created. // SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"` // Add the permissions necessary for debugging builds with SSM Session Manager. // // If the following prerequisites have been met: // // - The necessary permissions have been added by setting this flag to true. // - The build image has the SSM agent installed (true for default CodeBuild images). // - The build is started with [debugSessionEnabled](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html#CodeBuild-StartBuild-request-debugSessionEnabled) set to true. // // Then the build container can be paused and inspected using Session Manager // by invoking the `codebuild-breakpoint` command somewhere during the build. // // `codebuild-breakpoint` commands will be ignored if the build is not started // with `debugSessionEnabled=true`. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html // // Default: false. // SsmSessionPermissions *bool `field:"optional" json:"ssmSessionPermissions" yaml:"ssmSessionPermissions"` // Where to place the network interfaces within the VPC. // // To access AWS services, your CodeBuild project needs to be in one of the following types of subnets: // // 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS). // 2. Private subnets unconnected to the internet, but with [VPC endpoints](https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html) for the necessary services. // // If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, // then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need // AWS service access, add VPC Endpoints to your private subnets. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html for more details. // // Default: - private subnets if available else public subnets. // SubnetSelection *awsec2.SubnetSelection `field:"optional" json:"subnetSelection" yaml:"subnetSelection"` // The number of minutes after which AWS CodeBuild stops the build if it's not complete. // // For valid values, see the timeoutInMinutes field in the AWS // CodeBuild User Guide. // Default: Duration.hours(1) // Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"` // VPC network to place codebuild network interfaces. // // Specify this if the codebuild project needs to access resources in a VPC. // Default: - No VPC is specified. // Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` // Defines where build artifacts will be stored. // // Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts. // Default: NoArtifacts. // Artifacts IArtifacts `field:"optional" json:"artifacts" yaml:"artifacts"` // The secondary artifacts for the Project. // // Can also be added after the Project has been created by using the `Project#addSecondaryArtifact` method. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // // Default: - No secondary artifacts. // SecondaryArtifacts *[]IArtifacts `field:"optional" json:"secondaryArtifacts" yaml:"secondaryArtifacts"` // The secondary sources for the Project. // // Can be also added after the Project has been created by using the `Project#addSecondarySource` method. // See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html // // Default: - No secondary sources. // SecondarySources *[]ISource `field:"optional" json:"secondarySources" yaml:"secondarySources"` // The source of the build. // // *Note*: if `NoSource` is given as the source, // then you need to provide an explicit `buildSpec`. // Default: - NoSource. // Source ISource `field:"optional" json:"source" yaml:"source"` }
Example:
var ecrRepository repository codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.WindowsBuildImage_FromEcrRepository(ecrRepository, jsii.String("v1.0"), codebuild.WindowsImageType_SERVER_2019), // optional certificate to include in the build image Certificate: &BuildEnvironmentCertificate{ Bucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("my-bucket")), ObjectKey: jsii.String("path/to/cert.pem"), }, }, })
type ReportGroup ¶
type ReportGroup interface { awscdk.Resource IReportGroup // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment ExportBucket() awss3.IBucket // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The ARN of the ReportGroup. ReportGroupArn() *string // The name of the ReportGroup. ReportGroupName() *string // The stack in which this resource is defined. Stack() awscdk.Stack Type() ReportGroupType // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Grants the given entity permissions to write (that is, upload reports to) this report group. GrantWrite(identity awsiam.IGrantable) awsiam.Grant // Returns a string representation of this construct. ToString() *string }
The ReportGroup resource class.
Example:
var source source // create a new ReportGroup reportGroup := codebuild.NewReportGroup(this, jsii.String("ReportGroup")) project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: Source, BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ // ... "reports": map[string]map[string]*string{ reportGroup.reportGroupArn: map[string]*string{ "files": jsii.String("**/*"), "base-directory": jsii.String("build/test-results"), }, }, }), })
func NewReportGroup ¶
func NewReportGroup(scope constructs.Construct, id *string, props *ReportGroupProps) ReportGroup
type ReportGroupProps ¶
type ReportGroupProps struct { // An optional S3 bucket to export the reports to. // Default: - the reports will not be exported. // ExportBucket awss3.IBucket `field:"optional" json:"exportBucket" yaml:"exportBucket"` // What to do when this resource is deleted from a stack. // // As CodeBuild does not allow deleting a ResourceGroup that has reports inside of it, // this is set to retain the resource by default. // Default: RemovalPolicy.RETAIN // RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // The physical name of the report group. // Default: - CloudFormation-generated name. // ReportGroupName *string `field:"optional" json:"reportGroupName" yaml:"reportGroupName"` // The type of report group. This can be one of the following values:. // // - **TEST** - The report group contains test reports. // - **CODE_COVERAGE** - The report group contains code coverage reports. // Default: TEST. // Type ReportGroupType `field:"optional" json:"type" yaml:"type"` // Whether to output the report files into the export bucket as-is, or create a ZIP from them before doing the export. // // Ignored if `exportBucket` has not been provided. // Default: - false (the files will not be ZIPped). // ZipExport *bool `field:"optional" json:"zipExport" yaml:"zipExport"` }
Construction properties for `ReportGroup`.
Example:
var source source // create a new ReportGroup reportGroup := codebuild.NewReportGroup(this, jsii.String("ReportGroup"), &ReportGroupProps{ Type: codebuild.ReportGroupType_CODE_COVERAGE, }) project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: Source, BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ // ... "reports": map[string]map[string]*string{ reportGroup.reportGroupArn: map[string]*string{ "files": jsii.String("**/*"), "base-directory": jsii.String("build/coverage-report.xml"), "file-format": jsii.String("JACOCOXML"), }, }, }), })
type ReportGroupType ¶ added in v2.28.0
type ReportGroupType string
The type of reports in the report group.
Example:
var source source // create a new ReportGroup reportGroup := codebuild.NewReportGroup(this, jsii.String("ReportGroup"), &ReportGroupProps{ Type: codebuild.ReportGroupType_CODE_COVERAGE, }) project := codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Source: Source, BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ // ... "reports": map[string]map[string]*string{ reportGroup.reportGroupArn: map[string]*string{ "files": jsii.String("**/*"), "base-directory": jsii.String("build/coverage-report.xml"), "file-format": jsii.String("JACOCOXML"), }, }, }), })
const ( // The report group contains test reports. ReportGroupType_TEST ReportGroupType = "TEST" // The report group contains code coverage reports. ReportGroupType_CODE_COVERAGE ReportGroupType = "CODE_COVERAGE" )
type S3ArtifactsProps ¶
type S3ArtifactsProps struct { // The artifact identifier. // // This property is required on secondary artifacts. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` // The name of the output bucket. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // If this is false, build output will not be encrypted. // // This is useful if the artifact to publish a static website or sharing content with others. // Default: true - output will be encrypted. // Encryption *bool `field:"optional" json:"encryption" yaml:"encryption"` // Indicates if the build ID should be included in the path. // // If this is set to true, // then the build artifact will be stored in "<path>/<build-id>/<name>". // Default: true. // IncludeBuildId *bool `field:"optional" json:"includeBuildId" yaml:"includeBuildId"` // The name of the build output ZIP file or folder inside the bucket. // // The full S3 object key will be "<path>/<build-id>/<name>" or // "<path>/<name>" depending on whether `includeBuildId` is set to true. // // If not set, `overrideArtifactName` will be set and the name from the // buildspec will be used instead. // Default: undefined, and use the name from the buildspec. // Name *string `field:"optional" json:"name" yaml:"name"` // If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to <path>/<name>. // Default: true - files will be archived. // PackageZip *bool `field:"optional" json:"packageZip" yaml:"packageZip"` // The path inside of the bucket for the build output .zip file or folder. If a value is not specified, then build output will be stored at the root of the bucket (or under the <build-id> directory if `includeBuildId` is set to true). // Default: the root of the bucket. // Path *string `field:"optional" json:"path" yaml:"path"` }
Construction properties for `S3Artifacts`.
Example:
var bucket bucket project := codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromObject(map[string]interface{}{ "version": jsii.String("0.2"), }), Artifacts: codebuild.Artifacts_S3(&S3ArtifactsProps{ Bucket: *Bucket, IncludeBuildId: jsii.Boolean(false), PackageZip: jsii.Boolean(true), Path: jsii.String("another/path"), Identifier: jsii.String("AddArtifact1"), }), })
type S3LoggingOptions ¶
type S3LoggingOptions struct { // The S3 Bucket to send logs to. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The current status of the logs in Amazon CloudWatch Logs for a build project. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // Encrypt the S3 build log output. // Default: true. // Encrypted *bool `field:"optional" json:"encrypted" yaml:"encrypted"` // The path prefix for S3 logs. // Default: - no prefix. // Prefix *string `field:"optional" json:"prefix" yaml:"prefix"` }
Information about logs built to an S3 bucket for a build project.
Example:
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Logging: &LoggingOptions{ S3: &S3LoggingOptions{ Bucket: s3.NewBucket(this, jsii.String("LogBucket")), }, }, })
type S3SourceProps ¶
type S3SourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` Path *string `field:"required" json:"path" yaml:"path"` // The version ID of the object that represents the build input ZIP file to use. // Default: latest. // Version *string `field:"optional" json:"version" yaml:"version"` }
Construction properties for `S3Source`.
Example:
bucket := s3.NewBucket(this, jsii.String("MyBucket")) codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ Source: codebuild.Source_S3(&S3SourceProps{ Bucket: bucket, Path: jsii.String("path/to/file.zip"), }), })
type Source ¶
type Source interface { ISource BadgeSupported() *bool Identifier() *string Type() *string // Called by the project when the source is added so that the source can perform binding operations on the source. // // For example, it can grant permissions to the // code build project to read from the S3 bucket. Bind(_scope constructs.Construct, _project IProject) *SourceConfig }
Source provider definition for a CodeBuild Project.
Example:
project := codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{ BuildSpec: codebuild.BuildSpec_FromSourceFilename(jsii.String("my-buildspec.yml")), Source: codebuild.Source_GitHub(&GitHubSourceProps{ Owner: jsii.String("awslabs"), Repo: jsii.String("aws-cdk"), }), })
type SourceConfig ¶
type SourceConfig struct { SourceProperty *CfnProject_SourceProperty `field:"required" json:"sourceProperty" yaml:"sourceProperty"` BuildTriggers *CfnProject_ProjectTriggersProperty `field:"optional" json:"buildTriggers" yaml:"buildTriggers"` // `AWS::CodeBuild::Project.SourceVersion`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-sourceversion // // Default: the latest version. // SourceVersion *string `field:"optional" json:"sourceVersion" yaml:"sourceVersion"` }
The type returned from `ISource#bind`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sourceConfig := &SourceConfig{ SourceProperty: &SourceProperty{ Type: jsii.String("type"), // the properties below are optional Auth: &SourceAuthProperty{ Type: jsii.String("type"), // the properties below are optional Resource: jsii.String("resource"), }, BuildSpec: jsii.String("buildSpec"), BuildStatusConfig: &BuildStatusConfigProperty{ Context: jsii.String("context"), TargetUrl: jsii.String("targetUrl"), }, GitCloneDepth: jsii.Number(123), GitSubmodulesConfig: &GitSubmodulesConfigProperty{ FetchSubmodules: jsii.Boolean(false), }, InsecureSsl: jsii.Boolean(false), Location: jsii.String("location"), ReportBuildStatus: jsii.Boolean(false), SourceIdentifier: jsii.String("sourceIdentifier"), }, // the properties below are optional BuildTriggers: &ProjectTriggersProperty{ BuildType: jsii.String("buildType"), FilterGroups: []interface{}{ []interface{}{ &WebhookFilterProperty{ Pattern: jsii.String("pattern"), Type: jsii.String("type"), // the properties below are optional ExcludeMatchedPattern: jsii.Boolean(false), }, }, }, Webhook: jsii.Boolean(false), }, SourceVersion: jsii.String("sourceVersion"), }
type SourceProps ¶
type SourceProps struct { // The source identifier. // // This property is required on secondary sources. Identifier *string `field:"optional" json:"identifier" yaml:"identifier"` }
Properties common to all Source classes.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" sourceProps := &SourceProps{ Identifier: jsii.String("identifier"), }
type StateChangeEvent ¶
type StateChangeEvent interface { }
Event fields for the CodeBuild "state change" event. See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html#sample-build-notifications-ref
type UntrustedCodeBoundaryPolicy ¶
type UntrustedCodeBoundaryPolicy interface { awsiam.ManagedPolicy // The description of this policy. Description() *string // The policy document. Document() awsiam.PolicyDocument // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The principal to grant permissions to. GrantPrincipal() awsiam.IPrincipal // Returns the ARN of this managed policy. ManagedPolicyArn() *string // The name of this policy. ManagedPolicyName() *string // The tree node. Node() constructs.Node // The path of this policy. Path() *string // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Adds a statement to the policy document. AddStatements(statement ...awsiam.PolicyStatement) // Apply the given removal policy to this resource. // // 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`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Attaches this policy to a group. AttachToGroup(group awsiam.IGroup) // Attaches this policy to a role. AttachToRole(role awsiam.IRole) // Attaches this policy to a user. AttachToUser(user awsiam.IUser) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Permissions Boundary for a CodeBuild Project running untrusted code.
This class is a Policy, intended to be used as a Permissions Boundary for a CodeBuild project. It allows most of the actions necessary to run the CodeBuild project, but disallows reading from Parameter Store and Secrets Manager.
Use this when your CodeBuild project is running untrusted code (for example, if you are using one to automatically build Pull Requests that anyone can submit), and you want to prevent your future self from accidentally exposing Secrets to this build.
(The reason you might want to do this is because otherwise anyone who can submit a Pull Request to your project can write a script to email those secrets to themselves).
Example:
var project project iam.PermissionsBoundary_Of(project).Apply(codebuild.NewUntrustedCodeBoundaryPolicy(this, jsii.String("Boundary")))
func NewUntrustedCodeBoundaryPolicy ¶
func NewUntrustedCodeBoundaryPolicy(scope constructs.Construct, id *string, props *UntrustedCodeBoundaryPolicyProps) UntrustedCodeBoundaryPolicy
type UntrustedCodeBoundaryPolicyProps ¶
type UntrustedCodeBoundaryPolicyProps struct { // Additional statements to add to the default set of statements. // Default: - No additional statements. // AdditionalStatements *[]awsiam.PolicyStatement `field:"optional" json:"additionalStatements" yaml:"additionalStatements"` // The name of the managed policy. // Default: - A name is automatically generated. // ManagedPolicyName *string `field:"optional" json:"managedPolicyName" yaml:"managedPolicyName"` }
Construction properties for UntrustedCodeBoundaryPolicy.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var policyStatement policyStatement untrustedCodeBoundaryPolicyProps := &UntrustedCodeBoundaryPolicyProps{ AdditionalStatements: []*policyStatement{ policyStatement, }, ManagedPolicyName: jsii.String("managedPolicyName"), }
type WindowsBuildImage ¶
type WindowsBuildImage interface { IBuildImage // The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly. DefaultComputeType() ComputeType // The Docker image identifier that the build environment uses. ImageId() *string // The type of principal that CodeBuild will use to pull this build Docker image. ImagePullPrincipalType() ImagePullPrincipalType // An optional ECR repository that the image is hosted in. Repository() awsecr.IRepository // The secretsManagerCredentials for access to a private registry. SecretsManagerCredentials() awssecretsmanager.ISecret // The type of build environment. Type() *string // Make a buildspec to run the indicated script. RunScriptBuildspec(entrypoint *string) BuildSpec // Allows the image a chance to validate whether the passed configuration is correct. Validate(buildEnvironment *BuildEnvironment) *[]*string }
A CodeBuild image running Windows.
This class has a bunch of public constants that represent the most popular images.
You can also specify a custom image using one of the static methods:
- WindowsBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }, imageType]) - WindowsBuildImage.fromEcrRepository(repo[, tag, imageType]) - WindowsBuildImage.fromAsset(parent, id, props, [, imageType])
Example:
var ecrRepository repository codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.WindowsBuildImage_FromEcrRepository(ecrRepository, jsii.String("v1.0"), codebuild.WindowsImageType_SERVER_2019), // optional certificate to include in the build image Certificate: &BuildEnvironmentCertificate{ Bucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("my-bucket")), ObjectKey: jsii.String("path/to/cert.pem"), }, }, })
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
type WindowsImageType ¶
type WindowsImageType string
Environment type for Windows Docker images.
Example:
var ecrRepository repository codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{ Environment: &BuildEnvironment{ BuildImage: codebuild.WindowsBuildImage_FromEcrRepository(ecrRepository, jsii.String("v1.0"), codebuild.WindowsImageType_SERVER_2019), // optional certificate to include in the build image Certificate: &BuildEnvironmentCertificate{ Bucket: s3.Bucket_FromBucketName(this, jsii.String("Bucket"), jsii.String("my-bucket")), ObjectKey: jsii.String("path/to/cert.pem"), }, }, })
const ( // The standard environment type, WINDOWS_CONTAINER. WindowsImageType_STANDARD WindowsImageType = "STANDARD" // The WINDOWS_SERVER_2019_CONTAINER environment type. WindowsImageType_SERVER_2019 WindowsImageType = "SERVER_2019" )
Source Files ¶
- Artifacts.go
- ArtifactsConfig.go
- ArtifactsProps.go
- Artifacts__checks.go
- BatchBuildConfig.go
- BindToCodePipelineOptions.go
- BitBucketSourceCredentials.go
- BitBucketSourceCredentialsProps.go
- BitBucketSourceCredentials__checks.go
- BitBucketSourceProps.go
- BucketCacheOptions.go
- BuildEnvironment.go
- BuildEnvironmentCertificate.go
- BuildEnvironmentVariable.go
- BuildEnvironmentVariableType.go
- BuildImageBindOptions.go
- BuildImageConfig.go
- BuildSpec.go
- BuildSpec__checks.go
- Cache.go
- Cache__checks.go
- CfnFleet.go
- CfnFleetProps.go
- CfnFleet__checks.go
- CfnProject.go
- CfnProjectProps.go
- CfnProject_ArtifactsProperty.go
- CfnProject_BatchRestrictionsProperty.go
- CfnProject_BuildStatusConfigProperty.go
- CfnProject_CloudWatchLogsConfigProperty.go
- CfnProject_EnvironmentProperty.go
- CfnProject_EnvironmentVariableProperty.go
- CfnProject_GitSubmodulesConfigProperty.go
- CfnProject_LogsConfigProperty.go
- CfnProject_ProjectBuildBatchConfigProperty.go
- CfnProject_ProjectCacheProperty.go
- CfnProject_ProjectFileSystemLocationProperty.go
- CfnProject_ProjectFleetProperty.go
- CfnProject_ProjectSourceVersionProperty.go
- CfnProject_ProjectTriggersProperty.go
- CfnProject_RegistryCredentialProperty.go
- CfnProject_S3LogsConfigProperty.go
- CfnProject_SourceAuthProperty.go
- CfnProject_SourceProperty.go
- CfnProject_VpcConfigProperty.go
- CfnProject_WebhookFilterProperty.go
- CfnProject__checks.go
- CfnReportGroup.go
- CfnReportGroupProps.go
- CfnReportGroup_ReportExportConfigProperty.go
- CfnReportGroup_S3ReportExportConfigProperty.go
- CfnReportGroup__checks.go
- CfnSourceCredential.go
- CfnSourceCredentialProps.go
- CfnSourceCredential__checks.go
- CloudWatchLoggingOptions.go
- CodeCommitSourceProps.go
- CommonProjectProps.go
- ComputeType.go
- DockerImageOptions.go
- EfsFileSystemLocationProps.go
- EventAction.go
- FileSystemConfig.go
- FileSystemLocation.go
- FileSystemLocation__checks.go
- FilterGroup.go
- FilterGroup__checks.go
- GitHubEnterpriseSourceCredentials.go
- GitHubEnterpriseSourceCredentialsProps.go
- GitHubEnterpriseSourceCredentials__checks.go
- GitHubEnterpriseSourceProps.go
- GitHubSourceCredentials.go
- GitHubSourceCredentialsProps.go
- GitHubSourceCredentials__checks.go
- GitHubSourceProps.go
- IArtifacts.go
- IArtifacts__checks.go
- IBindableBuildImage.go
- IBindableBuildImage__checks.go
- IBuildImage.go
- IBuildImage__checks.go
- IFileSystemLocation.go
- IFileSystemLocation__checks.go
- IProject.go
- IProject__checks.go
- IReportGroup.go
- IReportGroup__checks.go
- ISource.go
- ISource__checks.go
- ImagePullPrincipalType.go
- LinuxArmBuildImage.go
- LinuxArmBuildImage__checks.go
- LinuxArmLambdaBuildImage.go
- LinuxArmLambdaBuildImage__checks.go
- LinuxBuildImage.go
- LinuxBuildImage__checks.go
- LinuxGpuBuildImage.go
- LinuxGpuBuildImage__checks.go
- LinuxLambdaBuildImage.go
- LinuxLambdaBuildImage__checks.go
- LocalCacheMode.go
- LoggingOptions.go
- PhaseChangeEvent.go
- PipelineProject.go
- PipelineProjectProps.go
- PipelineProject__checks.go
- Project.go
- ProjectNotificationEvents.go
- ProjectNotifyOnOptions.go
- ProjectProps.go
- Project__checks.go
- ReportGroup.go
- ReportGroupProps.go
- ReportGroupType.go
- ReportGroup__checks.go
- S3ArtifactsProps.go
- S3LoggingOptions.go
- S3SourceProps.go
- Source.go
- SourceConfig.go
- SourceProps.go
- Source__checks.go
- StateChangeEvent.go
- UntrustedCodeBoundaryPolicy.go
- UntrustedCodeBoundaryPolicyProps.go
- UntrustedCodeBoundaryPolicy__checks.go
- WindowsBuildImage.go
- WindowsBuildImage__checks.go
- WindowsImageType.go
- main.go