Class CfnProjectProps
Properties for defining a CfnProject
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnProjectProps : Object, ICfnProjectProps
Syntax (vb)
Public Class CfnProjectProps
Inherits Object
Implements ICfnProjectProps
Remarks
See: 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 cfnProjectProps = 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
CfnProjectProps() |
Properties
Artifacts |
|
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. |
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 |
|
Constructors
CfnProjectProps()
public CfnProjectProps()
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 object Artifacts { get; set; }
Property Value
System.Object
Remarks
BadgeEnabled
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
public 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 object BuildBatchConfig { get; set; }
Property Value
System.Object
Remarks
Cache
Settings that AWS CodeBuild uses to store and reuse build dependencies.
public object Cache { get; set; }
Property Value
System.Object
Remarks
ConcurrentBuildLimit
The maximum number of concurrent builds that are allowed for this project.
public 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 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 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 object Environment { get; set; }
Property Value
System.Object
Remarks
FileSystemLocations
An array of ProjectFileSystemLocation
objects for a CodeBuild build project.
public 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 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 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 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 string ResourceAccessRole { get; set; }
Property Value
System.String
Remarks
SecondaryArtifacts
A list of Artifacts
objects.
public 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 object SecondarySources { get; set; }
Property Value
System.Object
Remarks
SecondarySourceVersions
An array of ProjectSourceVersion
objects.
public 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 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 object Source { get; set; }
Property Value
System.Object
Remarks
SourceVersion
A version of the build input to be built for this project.
public 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 ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
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 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 object Triggers { get; set; }
Property Value
System.Object
Remarks
Visibility
Specifies the visibility of the project's builds. Possible values are:.
public 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 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 .