aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
843 lines • 142 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { FleetReference, IFleetRef, IProjectRef, IReportGroupRef, ISourceCredentialRef, ProjectReference, ReportGroupReference, SourceCredentialReference } from "../../interfaces/generated/aws-codebuild-interfaces.generated";
/**
* 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.
*
* @cloudformationResource AWS::CodeBuild::Project
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
*/
export declare class CfnProject extends cdk.CfnResource implements cdk.IInspectable, IProjectRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnProject from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnProject;
/**
* Checks whether the given object is a CfnProject
*/
static isCfnProject(x: any): x is CfnProject;
/**
* Creates a new IProjectRef from an ARN
*/
static fromProjectArn(scope: constructs.Construct, id: string, arn: string): IProjectRef;
/**
* Creates a new IProjectRef from a projectName
*/
static fromProjectName(scope: constructs.Construct, id: string, projectName: string): IProjectRef;
static arnForProject(resource: IProjectRef): string;
/**
* `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.
*/
private _artifacts;
private _autoRetryLimit?;
/**
* Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
*/
private _badgeEnabled?;
/**
* A `ProjectBuildBatchConfig` object that defines the batch build options for the project.
*/
private _buildBatchConfig?;
/**
* Settings that AWS CodeBuild uses to store and reuse build dependencies.
*/
private _cache?;
/**
* The maximum number of concurrent builds that are allowed for this project.
*/
private _concurrentBuildLimit?;
/**
* A description that makes the build project easy to identify.
*/
private _description?;
/**
* The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
*/
private _encryptionKey?;
/**
* The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
*/
private _environment;
/**
* An array of `ProjectFileSystemLocation` objects for a CodeBuild build project.
*/
private _fileSystemLocations?;
/**
* Information about logs for the build project.
*/
private _logsConfig?;
/**
* The name of the build project.
*/
private _name?;
/**
* The number of minutes a build is allowed to be queued before it times out.
*/
private _queuedTimeoutInMinutes?;
/**
* The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
*/
private _resourceAccessRole?;
/**
* A list of `Artifacts` objects.
*/
private _secondaryArtifacts?;
/**
* An array of `ProjectSource` objects.
*/
private _secondarySources?;
/**
* An array of `ProjectSourceVersion` objects.
*/
private _secondarySourceVersions?;
/**
* The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
*/
private _serviceRole;
/**
* The source code settings for the project, such as the source code's repository type and location.
*/
private _source;
/**
* A version of the build input to be built for this project.
*/
private _sourceVersion?;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
*/
private _tagsRaw?;
/**
* How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
*/
private _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.
*/
private _triggers?;
/**
* Specifies the visibility of the project's builds. Possible values are:.
*/
private _visibility?;
/**
* `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
*/
private _vpcConfig?;
/**
* Create a new `AWS::CodeBuild::Project`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnProjectProps);
get projectRef(): ProjectReference;
/**
* `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.
*/
get artifacts(): CfnProject.ArtifactsProperty | cdk.IResolvable;
/**
* `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.
*/
set artifacts(value: CfnProject.ArtifactsProperty | cdk.IResolvable);
get autoRetryLimit(): number | undefined;
set autoRetryLimit(value: number | undefined);
/**
* Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
*/
get badgeEnabled(): boolean | cdk.IResolvable | undefined;
/**
* Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
*/
set badgeEnabled(value: boolean | cdk.IResolvable | undefined);
/**
* A `ProjectBuildBatchConfig` object that defines the batch build options for the project.
*/
get buildBatchConfig(): cdk.IResolvable | CfnProject.ProjectBuildBatchConfigProperty | undefined;
/**
* A `ProjectBuildBatchConfig` object that defines the batch build options for the project.
*/
set buildBatchConfig(value: cdk.IResolvable | CfnProject.ProjectBuildBatchConfigProperty | undefined);
/**
* Settings that AWS CodeBuild uses to store and reuse build dependencies.
*/
get cache(): cdk.IResolvable | CfnProject.ProjectCacheProperty | undefined;
/**
* Settings that AWS CodeBuild uses to store and reuse build dependencies.
*/
set cache(value: cdk.IResolvable | CfnProject.ProjectCacheProperty | undefined);
/**
* The maximum number of concurrent builds that are allowed for this project.
*/
get concurrentBuildLimit(): number | undefined;
/**
* The maximum number of concurrent builds that are allowed for this project.
*/
set concurrentBuildLimit(value: number | undefined);
/**
* A description that makes the build project easy to identify.
*/
get description(): string | undefined;
/**
* A description that makes the build project easy to identify.
*/
set description(value: string | undefined);
/**
* The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
*/
get encryptionKey(): string | undefined;
/**
* The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
*/
set encryptionKey(value: string | undefined);
/**
* The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
*/
get environment(): CfnProject.EnvironmentProperty | cdk.IResolvable;
/**
* The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
*/
set environment(value: CfnProject.EnvironmentProperty | cdk.IResolvable);
/**
* An array of `ProjectFileSystemLocation` objects for a CodeBuild build project.
*/
get fileSystemLocations(): Array<cdk.IResolvable | CfnProject.ProjectFileSystemLocationProperty> | cdk.IResolvable | undefined;
/**
* An array of `ProjectFileSystemLocation` objects for a CodeBuild build project.
*/
set fileSystemLocations(value: Array<cdk.IResolvable | CfnProject.ProjectFileSystemLocationProperty> | cdk.IResolvable | undefined);
/**
* Information about logs for the build project.
*/
get logsConfig(): cdk.IResolvable | CfnProject.LogsConfigProperty | undefined;
/**
* Information about logs for the build project.
*/
set logsConfig(value: cdk.IResolvable | CfnProject.LogsConfigProperty | undefined);
/**
* The name of the build project.
*/
get name(): string | undefined;
/**
* The name of the build project.
*/
set name(value: string | undefined);
/**
* The number of minutes a build is allowed to be queued before it times out.
*/
get queuedTimeoutInMinutes(): number | undefined;
/**
* The number of minutes a build is allowed to be queued before it times out.
*/
set queuedTimeoutInMinutes(value: number | undefined);
/**
* The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
*/
get resourceAccessRole(): string | undefined;
/**
* The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
*/
set resourceAccessRole(value: string | undefined);
/**
* A list of `Artifacts` objects.
*/
get secondaryArtifacts(): Array<CfnProject.ArtifactsProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* A list of `Artifacts` objects.
*/
set secondaryArtifacts(value: Array<CfnProject.ArtifactsProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* An array of `ProjectSource` objects.
*/
get secondarySources(): Array<cdk.IResolvable | CfnProject.SourceProperty> | cdk.IResolvable | undefined;
/**
* An array of `ProjectSource` objects.
*/
set secondarySources(value: Array<cdk.IResolvable | CfnProject.SourceProperty> | cdk.IResolvable | undefined);
/**
* An array of `ProjectSourceVersion` objects.
*/
get secondarySourceVersions(): Array<cdk.IResolvable | CfnProject.ProjectSourceVersionProperty> | cdk.IResolvable | undefined;
/**
* An array of `ProjectSourceVersion` objects.
*/
set secondarySourceVersions(value: Array<cdk.IResolvable | CfnProject.ProjectSourceVersionProperty> | cdk.IResolvable | undefined);
/**
* The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
*/
get serviceRole(): string;
/**
* The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
*/
set serviceRole(value: string);
/**
* The source code settings for the project, such as the source code's repository type and location.
*/
get source(): cdk.IResolvable | CfnProject.SourceProperty;
/**
* The source code settings for the project, such as the source code's repository type and location.
*/
set source(value: cdk.IResolvable | CfnProject.SourceProperty);
/**
* A version of the build input to be built for this project.
*/
get sourceVersion(): string | undefined;
/**
* A version of the build input to be built for this project.
*/
set sourceVersion(value: string | undefined);
/**
* An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
*/
get tagsRaw(): Array<cdk.CfnTag> | undefined;
/**
* An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
*/
set tagsRaw(value: Array<cdk.CfnTag> | undefined);
/**
* How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
*/
get timeoutInMinutes(): number | undefined;
/**
* How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
*/
set timeoutInMinutes(value: number | undefined);
/**
* 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.
*/
get triggers(): cdk.IResolvable | CfnProject.ProjectTriggersProperty | undefined;
/**
* 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.
*/
set triggers(value: cdk.IResolvable | CfnProject.ProjectTriggersProperty | undefined);
/**
* Specifies the visibility of the project's builds. Possible values are:.
*/
get visibility(): string | undefined;
/**
* Specifies the visibility of the project's builds. Possible values are:.
*/
set visibility(value: string | undefined);
/**
* `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
*/
get vpcConfig(): cdk.IResolvable | CfnProject.VpcConfigProperty | undefined;
/**
* `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
*/
set vpcConfig(value: cdk.IResolvable | CfnProject.VpcConfigProperty | undefined);
/**
* The ARN of the AWS CodeBuild project, such as `arn:aws:codebuild:us-west-2:123456789012:project/myProjectName` .
*
* @cloudformationAttribute Arn
*/
get attrArn(): string;
/**
* @cloudformationAttribute Id
*/
get attrId(): string;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnProject {
/**
* `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* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html
*/
interface VpcConfigProperty {
/**
* 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
*/
readonly securityGroupIds?: Array<string>;
/**
* 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
*/
readonly subnets?: Array<string>;
/**
* 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
*/
readonly vpcId?: string;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html
*/
interface SourceProperty {
/**
* Information about the authorization settings for AWS CodeBuild to access the source code to be built.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-auth
*/
readonly auth?: cdk.IResolvable | CfnProject.SourceAuthProperty;
/**
* 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
*/
readonly buildSpec?: string;
/**
* 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
*/
readonly buildStatusConfig?: CfnProject.BuildStatusConfigProperty | cdk.IResolvable;
/**
* 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
*/
readonly gitCloneDepth?: number;
/**
* 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
*/
readonly gitSubmodulesConfig?: CfnProject.GitSubmodulesConfigProperty | cdk.IResolvable;
/**
* 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
*/
readonly insecureSsl?: boolean | cdk.IResolvable;
/**
* 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
*/
readonly location?: string;
/**
* Set to true to report the status of a build's start and finish to your source provider.
*
* This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, an `invalidInputException` is thrown.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-reportbuildstatus
*/
readonly reportBuildStatus?: boolean | cdk.IResolvable;
/**
* 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
*/
readonly sourceIdentifier?: string;
/**
* 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
*/
readonly type: string;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html
*/
interface SourceAuthProperty {
/**
* The resource value that applies to the specified authorization type.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-resource
*/
readonly resource?: string;
/**
* The authorization type to use.
*
* Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-type
*/
readonly type: string;
}
/**
* Contains information that defines how the AWS CodeBuild build project reports the build status to the source provider.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html
*/
interface BuildStatusConfigProperty {
/**
* 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
*/
readonly context?: string;
/**
* 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
*/
readonly targetUrl?: string;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html
*/
interface GitSubmodulesConfigProperty {
/**
* 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
*/
readonly fetchSubmodules: boolean | cdk.IResolvable;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html
*/
interface ProjectTriggersProperty {
/**
* 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
*/
readonly buildType?: string;
/**
* 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
*/
readonly filterGroups?: Array<Array<cdk.IResolvable | CfnProject.WebhookFilterProperty> | cdk.IResolvable> | cdk.IResolvable;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-pullrequestbuildpolicy
*/
readonly pullRequestBuildPolicy?: cdk.IResolvable | CfnProject.PullRequestBuildPolicyProperty;
/**
* Contains configuration information about the scope for a webhook.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-scopeconfiguration
*/
readonly scopeConfiguration?: cdk.IResolvable | CfnProject.ScopeConfigurationProperty;
/**
* 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
*/
readonly webhook?: boolean | cdk.IResolvable;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html
*/
interface WebhookFilterProperty {
/**
* 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
*/
readonly excludeMatchedPattern?: boolean | cdk.IResolvable;
/**
* 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
*/
readonly pattern: string;
/**
* The type of webhook filter.
*
* There are 11 webhook filter types: `EVENT` , `ACTOR_ACCOUNT_ID` , `HEAD_REF` , `BASE_REF` , `FILE_PATH` , `COMMIT_MESSAGE` , `TAG_NAME` , `RELEASE_NAME` , `REPOSITORY_NAME` , `ORGANIZATION_NAME` , 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.
*
* > Types `PULL_REQUEST_REOPENED` and `WORKFLOW_JOB_QUEUED` work with GitHub and GitHub Enterprise only. Types `RELEASED` and `PRERELEASED` 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 push and pull request events only.
* - COMMIT_MESSAGE
*
* - A webhook triggers a build when the head commit message matches the regular expression `pattern` .
*
* > Works with push and pull request events only.
* - TAG_NAME
*
* - A webhook triggers a build when the tag name of the release matches the regular expression `pattern` .
*
* > Works with `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.
* - REPOSITORY_NAME
*
* - A webhook triggers a build when the repository name matches the regular expression `pattern` .
*
* > Works with GitHub global or organization webhooks only.
* - ORGANIZATION_NAME
*
* - A webhook triggers a build when the organization name matches the regular expression `pattern` .
*
* > Works with GitHub global webhooks only.
* - WORKFLOW_NAME
*
* - A webhook triggers a build when the workflow name matches the regular expression `pattern` .
*
* > Works with `WORKFLOW_JOB_QUEUED` events only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-type
*/
readonly type: string;
}
/**
* Contains configuration information about the scope for a webhook.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html
*/
interface ScopeConfigurationProperty {
/**
* The domain of the GitHub Enterprise organization or the GitLab Self Managed group.
*
* Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html#cfn-codebuild-project-scopeconfiguration-domain
*/
readonly domain?: string;
/**
* The name of either the enterprise or organization that will send webhook events to CodeBuild , depending on if the webhook is a global or organization webhook respectively.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html#cfn-codebuild-project-scopeconfiguration-name
*/
readonly name: string;
/**
* The type of scope for a GitHub or GitLab webhook.
*
* The scope default is GITHUB_ORGANIZATION.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html#cfn-codebuild-project-scopeconfiguration-scope
*/
readonly scope?: string;
}
/**
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-pullrequestbuildpolicy.html
*/
interface PullRequestBuildPolicyProperty {
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-pullrequestbuildpolicy.html#cfn-codebuild-project-pullrequestbuildpolicy-approverroles
*/
readonly approverRoles?: Array<string>;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-pullrequestbuildpolicy.html#cfn-codebuild-project-pullrequestbuildpolicy-requirescommentapproval
*/
readonly requiresCommentApproval: string;
}
/**
* `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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html
*/
interface ArtifactsProperty {
/**
* 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
*/
readonly artifactIdentifier?: string;
/**
* 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
*/
readonly encryptionDisabled?: boolean | cdk.IResolvable;
/**
* 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
*/
readonly location?: string;
/**
* 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
*/
readonly name?: string;
/**
* 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
*/
readonly namespaceType?: string;
/**
* 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
*/
readonly overrideArtifactName?: boolean | cdk.IResolvable;
/**
* 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
*/
readonly packaging?: string;
/**
* 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 bu