Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICommonProjectProps
Syntax (vb)
Public Interface ICommonProjectProps
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.AWS.S3;
Bucket bucket;
IBuildImage buildImage;
BuildSpec buildSpec;
Cache cache;
IFileSystemLocation fileSystemLocation;
Fleet fleet;
Key key;
LogGroup logGroup;
Role role;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
var value;
Vpc vpc;
var commonProjectProps = new CommonProjectProps {
AllowAllOutbound = false,
AutoRetryLimit = 123,
Badge = false,
BuildSpec = buildSpec,
Cache = cache,
CheckSecretsInPlainTextEnvVariables = false,
ConcurrentBuildLimit = 123,
Description = "description",
EncryptionKey = key,
Environment = new BuildEnvironment {
BuildImage = buildImage,
Certificate = new BuildEnvironmentCertificate {
Bucket = bucket,
ObjectKey = "objectKey"
},
ComputeType = ComputeType.SMALL,
DockerServer = new DockerServerOptions {
ComputeType = DockerServerComputeType.SMALL,
// the properties below are optional
SecurityGroups = new [] { securityGroup }
},
EnvironmentVariables = new Dictionary<string, BuildEnvironmentVariable> {
{ "environmentVariablesKey", new BuildEnvironmentVariable {
Value = value,
// the properties below are optional
Type = BuildEnvironmentVariableType.PLAINTEXT
} }
},
Fleet = fleet,
Privileged = false
},
EnvironmentVariables = new Dictionary<string, BuildEnvironmentVariable> {
{ "environmentVariablesKey", new BuildEnvironmentVariable {
Value = value,
// the properties below are optional
Type = BuildEnvironmentVariableType.PLAINTEXT
} }
},
FileSystemLocations = new [] { fileSystemLocation },
GrantReportGroupPermissions = false,
Logging = new LoggingOptions {
CloudWatch = new CloudWatchLoggingOptions {
Enabled = false,
LogGroup = logGroup,
Prefix = "prefix"
},
S3 = new S3LoggingOptions {
Bucket = bucket,
// the properties below are optional
Enabled = false,
Encrypted = false,
Prefix = "prefix"
}
},
ProjectName = "projectName",
QueuedTimeout = Duration.Minutes(30),
Role = role,
SecurityGroups = new [] { securityGroup },
SsmSessionPermissions = false,
SubnetSelection = new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
Subnets = new [] { subnet },
SubnetType = SubnetType.PRIVATE_ISOLATED
},
Timeout = Duration.Minutes(30),
Visibility = ProjectVisibility.PUBLIC_READ,
Vpc = vpc
};
Synopsis
Properties
| AllowAllOutbound | Whether to allow the CodeBuild to send all network traffic. |
| AutoRetryLimit | CodeBuild will automatically call retry build using the project's service role up to the auto-retry limit. |
| Badge | Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. |
| BuildSpec | Filename or contents of buildspec in JSON format. |
| Cache | Caching strategy to use. |
| CheckSecretsInPlainTextEnvVariables | Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. |
| ConcurrentBuildLimit | Maximum number of concurrent builds. |
| Description | A description of the project. |
| EncryptionKey | Encryption key to use to read and write artifacts. |
| Environment | Build environment to use for the build. |
| EnvironmentVariables | Additional environment variables to add to the build environment. |
| FileSystemLocations | An ProjectFileSystemLocation objects for a CodeBuild build project. |
| GrantReportGroupPermissions | Add permissions to this project's role to create and use test report groups with name starting with the name of this project. |
| Logging | Information about logs for the build project. |
| ProjectName | The physical, human-readable name of the CodeBuild Project. |
| QueuedTimeout | The number of minutes after which AWS CodeBuild stops the build if it's still in queue. |
| Role | Service Role to assume while running the build. |
| SecurityGroups | What security group to associate with the codebuild project's network interfaces. |
| SsmSessionPermissions | Add the permissions necessary for debugging builds with SSM Session Manager. |
| SubnetSelection | Where to place the network interfaces within the VPC. |
| Timeout | The number of minutes after which AWS CodeBuild stops the build if it's not complete. |
| Visibility | Specifies the visibility of the project's builds. |
| Vpc | VPC network to place codebuild network interfaces. |
Properties
AllowAllOutbound
Whether to allow the CodeBuild to send all network traffic.
bool? AllowAllOutbound { get; }
Property Value
bool?
AutoRetryLimit
CodeBuild will automatically call retry build using the project's service role up to the auto-retry limit.
double? AutoRetryLimit { get; }
Property Value
Badge
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
Property Value
bool?
BuildSpec
Filename or contents of buildspec in JSON format.
BuildSpec? BuildSpec { get; }
Property Value
Cache
CheckSecretsInPlainTextEnvVariables
Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable.
bool? CheckSecretsInPlainTextEnvVariables { get; }
Property Value
bool?
ConcurrentBuildLimit
Description
EncryptionKey
Environment
Build environment to use for the build.
IBuildEnvironment? Environment { get; }
Property Value
EnvironmentVariables
FileSystemLocations
An ProjectFileSystemLocation objects for a CodeBuild build project.
IFileSystemLocation[]? FileSystemLocations { get; }
Property Value
GrantReportGroupPermissions
Add permissions to this project's role to create and use test report groups with name starting with the name of this project.
bool? GrantReportGroupPermissions { get; }
Property Value
bool?
Logging
Information about logs for the build project.
ILoggingOptions? Logging { get; }
Property Value
ProjectName
The physical, human-readable name of the CodeBuild Project.
string? ProjectName { get; }
Property Value
QueuedTimeout
The number of minutes after which AWS CodeBuild stops the build if it's still in queue.
Duration? QueuedTimeout { get; }
Property Value
Role
SecurityGroups
What security group to associate with the codebuild project's network interfaces.
ISecurityGroup[]? SecurityGroups { get; }
Property Value
SsmSessionPermissions
Add the permissions necessary for debugging builds with SSM Session Manager.
bool? SsmSessionPermissions { get; }
Property Value
bool?
SubnetSelection
Where to place the network interfaces within the VPC.
ISubnetSelection? SubnetSelection { get; }
Property Value
Timeout
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
Duration? Timeout { get; }
Property Value
Visibility
Specifies the visibility of the project's builds.
ProjectVisibility? Visibility { get; }