Class CfnProject
A CloudFormation AWS::CodeBuild::Project
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public class CfnProject : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnProject
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
var cfnProject = new CfnProject(this, "MyCfnProject", new CfnProjectProps {
Artifacts = new ArtifactsProperty {
Type = "type",
// the properties below are optional
ArtifactIdentifier = "artifactIdentifier",
EncryptionDisabled = false,
Location = "location",
Name = "name",
NamespaceType = "namespaceType",
OverrideArtifactName = false,
Packaging = "packaging",
Path = "path"
},
Environment = new EnvironmentProperty {
ComputeType = "computeType",
Image = "image",
Type = "type",
// the properties below are optional
Certificate = "certificate",
EnvironmentVariables = new [] { new EnvironmentVariableProperty {
Name = "name",
Value = "value",
// the properties below are optional
Type = "type"
} },
ImagePullCredentialsType = "imagePullCredentialsType",
PrivilegedMode = false,
RegistryCredential = new RegistryCredentialProperty {
Credential = "credential",
CredentialProvider = "credentialProvider"
}
},
ServiceRole = "serviceRole",
Source = new SourceProperty {
Type = "type",
// the properties below are optional
Auth = new SourceAuthProperty {
Type = "type",
// the properties below are optional
Resource = "resource"
},
BuildSpec = "buildSpec",
BuildStatusConfig = new BuildStatusConfigProperty {
Context = "context",
TargetUrl = "targetUrl"
},
GitCloneDepth = 123,
GitSubmodulesConfig = new GitSubmodulesConfigProperty {
FetchSubmodules = false
},
InsecureSsl = false,
Location = "location",
ReportBuildStatus = false,
SourceIdentifier = "sourceIdentifier"
},
// the properties below are optional
BadgeEnabled = false,
BuildBatchConfig = new ProjectBuildBatchConfigProperty {
BatchReportMode = "batchReportMode",
CombineArtifacts = false,
Restrictions = new BatchRestrictionsProperty {
ComputeTypesAllowed = new [] { "computeTypesAllowed" },
MaximumBuildsAllowed = 123
},
ServiceRole = "serviceRole",
TimeoutInMins = 123
},
Cache = new ProjectCacheProperty {
Type = "type",
// the properties below are optional
Location = "location",
Modes = new [] { "modes" }
},
ConcurrentBuildLimit = 123,
Description = "description",
EncryptionKey = "encryptionKey",
FileSystemLocations = new [] { new ProjectFileSystemLocationProperty {
Identifier = "identifier",
Location = "location",
MountPoint = "mountPoint",
Type = "type",
// the properties below are optional
MountOptions = "mountOptions"
} },
LogsConfig = new LogsConfigProperty {
CloudWatchLogs = new CloudWatchLogsConfigProperty {
Status = "status",
// the properties below are optional
GroupName = "groupName",
StreamName = "streamName"
},
S3Logs = new S3LogsConfigProperty {
Status = "status",
// the properties below are optional
EncryptionDisabled = false,
Location = "location"
}
},
Name = "name",
QueuedTimeoutInMinutes = 123,
ResourceAccessRole = "resourceAccessRole",
SecondaryArtifacts = new [] { new ArtifactsProperty {
Type = "type",
// the properties below are optional
ArtifactIdentifier = "artifactIdentifier",
EncryptionDisabled = false,
Location = "location",
Name = "name",
NamespaceType = "namespaceType",
OverrideArtifactName = false,
Packaging = "packaging",
Path = "path"
} },
SecondarySources = new [] { new SourceProperty {
Type = "type",
// the properties below are optional
Auth = new SourceAuthProperty {
Type = "type",
// the properties below are optional
Resource = "resource"
},
BuildSpec = "buildSpec",
BuildStatusConfig = new BuildStatusConfigProperty {
Context = "context",
TargetUrl = "targetUrl"
},
GitCloneDepth = 123,
GitSubmodulesConfig = new GitSubmodulesConfigProperty {
FetchSubmodules = false
},
InsecureSsl = false,
Location = "location",
ReportBuildStatus = false,
SourceIdentifier = "sourceIdentifier"
} },
SecondarySourceVersions = new [] { new ProjectSourceVersionProperty {
SourceIdentifier = "sourceIdentifier",
// the properties below are optional
SourceVersion = "sourceVersion"
} },
SourceVersion = "sourceVersion",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TimeoutInMinutes = 123,
Triggers = new ProjectTriggersProperty {
BuildType = "buildType",
FilterGroups = new [] { new [] { new WebhookFilterProperty {
Pattern = "pattern",
Type = "type",
// the properties below are optional
ExcludeMatchedPattern = false
} } },
Webhook = false
},
Visibility = "visibility",
VpcConfig = new VpcConfigProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
Subnets = new [] { "subnets" },
VpcId = "vpcId"
}
});
Synopsis
Constructors
CfnProject(Construct, String, ICfnProjectProps) | Create a new |
CfnProject(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnProject(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Artifacts |
|
AttrArn | The ARN of the AWS CodeBuild project, such as |
BadgeEnabled | Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. |
BuildBatchConfig | A |
Cache | Settings that AWS CodeBuild uses to store and reuse build dependencies. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ConcurrentBuildLimit | The maximum number of concurrent builds that are allowed for this project. |
Description | A description that makes the build project easy to identify. |
EncryptionKey | The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. |
Environment | The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. |
FileSystemLocations | An array of |
LogsConfig | Information about logs for the build project. |
Name | The name of the build project. |
QueuedTimeoutInMinutes | The number of minutes a build is allowed to be queued before it times out. |
ResourceAccessRole | The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds. |
SecondaryArtifacts | A list of |
SecondarySources | An array of |
SecondarySourceVersions | An array of |
ServiceRole | The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. |
Source | The source code settings for the project, such as the source code's repository type and location. |
SourceVersion | A version of the build input to be built for this project. |
Tags | An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project. |
TimeoutInMinutes | 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. |
Triggers | For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding the source code every time a code change is pushed to the repository. |
Visibility | Specifies the visibility of the project's builds. Possible values are:. |
VpcConfig |
|
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnProject(Construct, String, ICfnProjectProps)
Create a new AWS::CodeBuild::Project
.
public CfnProject(Construct scope, string id, ICfnProjectProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnProjectProps
- resource properties.
CfnProject(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnProject(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnProject(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnProject(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Artifacts
Artifacts
is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
public virtual object Artifacts { get; set; }
Property Value
System.Object
Remarks
AttrArn
The ARN of the AWS CodeBuild project, such as arn:aws:codebuild:us-west-2:123456789012:project/myProjectName
.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
BadgeEnabled
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
public virtual object BadgeEnabled { get; set; }
Property Value
System.Object
Remarks
For more information, see Build Badges Sample in the AWS CodeBuild User Guide .
Including build badges with your project is currently not supported if the source type is CodePipeline. If you specify CODEPIPELINE
for the Source
property, do not specify the BadgeEnabled
property.
BuildBatchConfig
A ProjectBuildBatchConfig
object that defines the batch build options for the project.
public virtual object BuildBatchConfig { get; set; }
Property Value
System.Object
Remarks
Cache
Settings that AWS CodeBuild uses to store and reuse build dependencies.
public virtual object Cache { get; set; }
Property Value
System.Object
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ConcurrentBuildLimit
The maximum number of concurrent builds that are allowed for this project.
public virtual Nullable<double> ConcurrentBuildLimit { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
New builds are only started if the current number of builds is less than or equal to this limit. If the current build count meets this limit, new builds are throttled and are not run.
Description
A description that makes the build project easy to identify.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
EncryptionKey
The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
public virtual string EncryptionKey { get; set; }
Property Value
System.String
Remarks
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).
Environment
The build environment settings for the project, such as the environment type or the environment variables to use for the build environment.
public virtual object Environment { get; set; }
Property Value
System.Object
Remarks
FileSystemLocations
An array of ProjectFileSystemLocation
objects for a CodeBuild build project.
public virtual object FileSystemLocations { get; set; }
Property Value
System.Object
Remarks
A ProjectFileSystemLocation
object specifies the identifier
, location
, mountOptions
, mountPoint
, and type
of a file system created using Amazon Elastic File System.
LogsConfig
Information about logs for the build project.
public virtual object LogsConfig { get; set; }
Property Value
System.Object
Remarks
A project can create logs in CloudWatch Logs, an S3 bucket, or both.
Name
The name of the build project.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
The name must be unique across all of the projects in your AWS account .
QueuedTimeoutInMinutes
The number of minutes a build is allowed to be queued before it times out.
public virtual Nullable<double> QueuedTimeoutInMinutes { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
ResourceAccessRole
The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.
public virtual string ResourceAccessRole { get; set; }
Property Value
System.String
Remarks
SecondaryArtifacts
A list of Artifacts
objects.
public virtual object SecondaryArtifacts { get; set; }
Property Value
System.Object
Remarks
Each artifacts object specifies output settings that the project generates during a build.
SecondarySources
An array of ProjectSource
objects.
public virtual object SecondarySources { get; set; }
Property Value
System.Object
Remarks
SecondarySourceVersions
An array of ProjectSourceVersion
objects.
public virtual object SecondarySourceVersions { get; set; }
Property Value
System.Object
Remarks
If secondarySourceVersions
is specified at the build level, then they take over these secondarySourceVersions
(at the project level).
ServiceRole
The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
public virtual string ServiceRole { get; set; }
Property Value
System.String
Remarks
Source
The source code settings for the project, such as the source code's repository type and location.
public virtual object Source { get; set; }
Property Value
System.Object
Remarks
SourceVersion
A version of the build input to be built for this project.
public virtual string SourceVersion { get; set; }
Property Value
System.String
Remarks
If not specified, the latest version is used. If specified, it must be one of:
If sourceVersion
is specified at the build level, then that version takes precedence over this sourceVersion
(at the project level).
For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide .
Tags
An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
public virtual TagManager Tags { get; }
Property Value
Remarks
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
TimeoutInMinutes
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.
public virtual Nullable<double> TimeoutInMinutes { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Triggers
For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding the source code every time a code change is pushed to the repository.
public virtual object Triggers { get; set; }
Property Value
System.Object
Remarks
Visibility
Specifies the visibility of the project's builds. Possible values are:.
public virtual string Visibility { get; set; }
Property Value
System.String
Remarks
VpcConfig
VpcConfig
specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
public virtual object VpcConfig { get; set; }
Property Value
System.Object
Remarks
For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>