Class CfnProject
The AWS::CodeBuild::Project
resource configures how AWS CodeBuild builds your source code.
Inherited Members
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnProject : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnProject
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html
CloudformationResource: AWS::CodeBuild::Project
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"
} },
Fleet = new ProjectFleetProperty {
FleetArn = "fleetArn"
},
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(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 |
CfnProject(Construct, String, ICfnProjectProps) |
Properties
Artifacts |
|
AttrArn | The ARN of the AWS CodeBuild project, such as |
AttrId | |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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. |
VpcConfig |
|
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
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
CfnProject(Construct, String, ICfnProjectProps)
public CfnProject(Construct scope, string id, ICfnProjectProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnProjectProps
Resource properties.
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
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
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
BuildBatchConfig
A ProjectBuildBatchConfig
object that defines the batch build options for the project.
public virtual object BuildBatchConfig { get; set; }
Property Value
System.Object
Cache
Settings that AWS CodeBuild uses to store and reuse build dependencies.
public virtual object Cache { get; set; }
Property Value
System.Object
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>
Description
A description that makes the build project easy to identify.
public virtual string Description { get; set; }
Property Value
System.String
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
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
FileSystemLocations
An array of ProjectFileSystemLocation
objects for a CodeBuild build project.
public virtual object FileSystemLocations { get; set; }
Property Value
System.Object
LogsConfig
Information about logs for the build project.
public virtual object LogsConfig { get; set; }
Property Value
System.Object
Name
The name of the build project.
public virtual string Name { get; set; }
Property Value
System.String
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>
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
SecondaryArtifacts
A list of Artifacts
objects.
public virtual object SecondaryArtifacts { get; set; }
Property Value
System.Object
SecondarySources
An array of ProjectSource
objects.
public virtual object SecondarySources { get; set; }
Property Value
System.Object
SecondarySourceVersions
An array of ProjectSourceVersion
objects.
public virtual object SecondarySourceVersions { get; set; }
Property Value
System.Object
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
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
SourceVersion
A version of the build input to be built for this project.
public virtual string SourceVersion { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
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>
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
Visibility
Specifies the visibility of the project's builds.
public virtual string Visibility { get; set; }
Property Value
System.String
Remarks
Possible values are:.
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
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>