Interface ICfnProjectProps
Properties for defining a CfnProject
.
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnProjectProps
Syntax (vb)
Public Interface 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
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 |
|
Properties
Artifacts
Artifacts
is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
object Artifacts { get; }
Property Value
System.Object
Remarks
BadgeEnabled
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
virtual object BadgeEnabled { get; }
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.
virtual object BuildBatchConfig { get; }
Property Value
System.Object
Remarks
Cache
Settings that AWS CodeBuild uses to store and reuse build dependencies.
virtual object Cache { get; }
Property Value
System.Object
Remarks
ConcurrentBuildLimit
The maximum number of concurrent builds that are allowed for this project.
virtual Nullable<double> ConcurrentBuildLimit { get; }
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.
virtual string Description { get; }
Property Value
System.String
Remarks
EncryptionKey
The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts.
virtual string EncryptionKey { get; }
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.
object Environment { get; }
Property Value
System.Object
Remarks
FileSystemLocations
An array of ProjectFileSystemLocation
objects for a CodeBuild build project.
virtual object FileSystemLocations { get; }
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.
virtual object LogsConfig { get; }
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.
virtual string Name { get; }
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.
virtual Nullable<double> QueuedTimeoutInMinutes { get; }
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.
virtual string ResourceAccessRole { get; }
Property Value
System.String
Remarks
SecondaryArtifacts
A list of Artifacts
objects.
virtual object SecondaryArtifacts { get; }
Property Value
System.Object
Remarks
Each artifacts object specifies output settings that the project generates during a build.
SecondarySources
An array of ProjectSource
objects.
virtual object SecondarySources { get; }
Property Value
System.Object
Remarks
SecondarySourceVersions
An array of ProjectSourceVersion
objects.
virtual object SecondarySourceVersions { get; }
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.
string ServiceRole { get; }
Property Value
System.String
Remarks
Source
The source code settings for the project, such as the source code's repository type and location.
object Source { get; }
Property Value
System.Object
Remarks
SourceVersion
A version of the build input to be built for this project.
virtual string SourceVersion { get; }
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.
virtual ICfnTag[] Tags { get; }
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.
virtual Nullable<double> TimeoutInMinutes { get; }
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.
virtual object Triggers { get; }
Property Value
System.Object
Remarks
Visibility
Specifies the visibility of the project's builds. Possible values are:.
virtual string Visibility { get; }
Property Value
System.String
Remarks
VpcConfig
VpcConfig
specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC.
virtual object VpcConfig { get; }
Property Value
System.Object
Remarks
For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .