CfnProject L1 construct
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
const cfnProject = new codebuild.CfnProject(this, 'MyCfnProject', {
artifacts: {
type: 'type',
// the properties below are optional
artifactIdentifier: 'artifactIdentifier',
encryptionDisabled: false,
location: 'location',
name: 'name',
namespaceType: 'namespaceType',
overrideArtifactName: false,
packaging: 'packaging',
path: 'path',
},
environment: {
computeType: 'computeType',
image: 'image',
type: 'type',
// the properties below are optional
certificate: 'certificate',
dockerServer: {
computeType: 'computeType',
// the properties below are optional
securityGroupIds: ['securityGroupIds'],
},
environmentVariables: [{
name: 'name',
value: 'value',
// the properties below are optional
type: 'type',
}],
fleet: {
fleetArn: 'fleetArn',
},
hostKernel: 'hostKernel',
imagePullCredentialsType: 'imagePullCredentialsType',
privilegedMode: false,
registryCredential: {
credential: 'credential',
credentialProvider: 'credentialProvider',
},
},
serviceRole: 'serviceRole',
source: {
type: 'type',
// the properties below are optional
auth: {
type: 'type',
// the properties below are optional
resource: 'resource',
},
buildSpec: 'buildSpec',
buildStatusConfig: {
context: 'context',
targetUrl: 'targetUrl',
},
gitCloneDepth: 123,
gitSubmodulesConfig: {
fetchSubmodules: false,
},
insecureSsl: false,
location: 'location',
reportBuildStatus: false,
sourceIdentifier: 'sourceIdentifier',
},
// the properties below are optional
autoRetryLimit: 123,
badgeEnabled: false,
buildBatchConfig: {
batchReportMode: 'batchReportMode',
combineArtifacts: false,
restrictions: {
computeTypesAllowed: ['computeTypesAllowed'],
maximumBuildsAllowed: 123,
},
serviceRole: 'serviceRole',
timeoutInMins: 123,
},
cache: {
type: 'type',
// the properties below are optional
cacheNamespace: 'cacheNamespace',
location: 'location',
modes: ['modes'],
},
concurrentBuildLimit: 123,
description: 'description',
encryptionKey: 'encryptionKey',
fileSystemLocations: [{
identifier: 'identifier',
location: 'location',
mountPoint: 'mountPoint',
type: 'type',
// the properties below are optional
mountOptions: 'mountOptions',
}],
logsConfig: {
cloudWatchLogs: {
status: 'status',
// the properties below are optional
groupName: 'groupName',
streamName: 'streamName',
},
s3Logs: {
status: 'status',
// the properties below are optional
encryptionDisabled: false,
location: 'location',
},
},
name: 'name',
queuedTimeoutInMinutes: 123,
resourceAccessRole: 'resourceAccessRole',
secondaryArtifacts: [{
type: 'type',
// the properties below are optional
artifactIdentifier: 'artifactIdentifier',
encryptionDisabled: false,
location: 'location',
name: 'name',
namespaceType: 'namespaceType',
overrideArtifactName: false,
packaging: 'packaging',
path: 'path',
}],
secondarySources: [{
type: 'type',
// the properties below are optional
auth: {
type: 'type',
// the properties below are optional
resource: 'resource',
},
buildSpec: 'buildSpec',
buildStatusConfig: {
context: 'context',
targetUrl: 'targetUrl',
},
gitCloneDepth: 123,
gitSubmodulesConfig: {
fetchSubmodules: false,
},
insecureSsl: false,
location: 'location',
reportBuildStatus: false,
sourceIdentifier: 'sourceIdentifier',
}],
secondarySourceVersions: [{
sourceIdentifier: 'sourceIdentifier',
// the properties below are optional
sourceVersion: 'sourceVersion',
}],
sourceVersion: 'sourceVersion',
tags: [{
key: 'key',
value: 'value',
}],
timeoutInMinutes: 123,
triggers: {
buildType: 'buildType',
filterGroups: [[{
pattern: 'pattern',
type: 'type',
// the properties below are optional
excludeMatchedPattern: false,
}]],
pullRequestBuildPolicy: {
requiresCommentApproval: 'requiresCommentApproval',
// the properties below are optional
approverRoles: ['approverRoles'],
},
scopeConfiguration: {
name: 'name',
// the properties below are optional
domain: 'domain',
scope: 'scope',
},
webhook: false,
},
visibility: 'visibility',
vpcConfig: {
securityGroupIds: ['securityGroupIds'],
subnets: ['subnets'],
vpcId: 'vpcId',
},
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codebuild as codebuild
cfn_project = codebuild.CfnProject(self, "MyCfnProject",
artifacts=codebuild.CfnProject.ArtifactsProperty(
type="type",
# the properties below are optional
artifact_identifier="artifactIdentifier",
encryption_disabled=False,
location="location",
name="name",
namespace_type="namespaceType",
override_artifact_name=False,
packaging="packaging",
path="path"
),
environment=codebuild.CfnProject.EnvironmentProperty(
compute_type="computeType",
image="image",
type="type",
# the properties below are optional
certificate="certificate",
docker_server=codebuild.CfnProject.DockerServerProperty(
compute_type="computeType",
# the properties below are optional
security_group_ids=["securityGroupIds"]
),
environment_variables=[codebuild.CfnProject.EnvironmentVariableProperty(
name="name",
value="value",
# the properties below are optional
type="type"
)],
fleet=codebuild.CfnProject.ProjectFleetProperty(
fleet_arn="fleetArn"
),
host_kernel="hostKernel",
image_pull_credentials_type="imagePullCredentialsType",
privileged_mode=False,
registry_credential=codebuild.CfnProject.RegistryCredentialProperty(
credential="credential",
credential_provider="credentialProvider"
)
),
service_role="serviceRole",
source=codebuild.CfnProject.SourceProperty(
type="type",
# the properties below are optional
auth=codebuild.CfnProject.SourceAuthProperty(
type="type",
# the properties below are optional
resource="resource"
),
build_spec="buildSpec",
build_status_config=codebuild.CfnProject.BuildStatusConfigProperty(
context="context",
target_url="targetUrl"
),
git_clone_depth=123,
git_submodules_config=codebuild.CfnProject.GitSubmodulesConfigProperty(
fetch_submodules=False
),
insecure_ssl=False,
location="location",
report_build_status=False,
source_identifier="sourceIdentifier"
),
# the properties below are optional
auto_retry_limit=123,
badge_enabled=False,
build_batch_config=codebuild.CfnProject.ProjectBuildBatchConfigProperty(
batch_report_mode="batchReportMode",
combine_artifacts=False,
restrictions=codebuild.CfnProject.BatchRestrictionsProperty(
compute_types_allowed=["computeTypesAllowed"],
maximum_builds_allowed=123
),
service_role="serviceRole",
timeout_in_mins=123
),
cache=codebuild.CfnProject.ProjectCacheProperty(
type="type",
# the properties below are optional
cache_namespace="cacheNamespace",
location="location",
modes=["modes"]
),
concurrent_build_limit=123,
description="description",
encryption_key="encryptionKey",
file_system_locations=[codebuild.CfnProject.ProjectFileSystemLocationProperty(
identifier="identifier",
location="location",
mount_point="mountPoint",
type="type",
# the properties below are optional
mount_options="mountOptions"
)],
logs_config=codebuild.CfnProject.LogsConfigProperty(
cloud_watch_logs=codebuild.CfnProject.CloudWatchLogsConfigProperty(
status="status",
# the properties below are optional
group_name="groupName",
stream_name="streamName"
),
s3_logs=codebuild.CfnProject.S3LogsConfigProperty(
status="status",
# the properties below are optional
encryption_disabled=False,
location="location"
)
),
name="name",
queued_timeout_in_minutes=123,
resource_access_role="resourceAccessRole",
secondary_artifacts=[codebuild.CfnProject.ArtifactsProperty(
type="type",
# the properties below are optional
artifact_identifier="artifactIdentifier",
encryption_disabled=False,
location="location",
name="name",
namespace_type="namespaceType",
override_artifact_name=False,
packaging="packaging",
path="path"
)],
secondary_sources=[codebuild.CfnProject.SourceProperty(
type="type",
# the properties below are optional
auth=codebuild.CfnProject.SourceAuthProperty(
type="type",
# the properties below are optional
resource="resource"
),
build_spec="buildSpec",
build_status_config=codebuild.CfnProject.BuildStatusConfigProperty(
context="context",
target_url="targetUrl"
),
git_clone_depth=123,
git_submodules_config=codebuild.CfnProject.GitSubmodulesConfigProperty(
fetch_submodules=False
),
insecure_ssl=False,
location="location",
report_build_status=False,
source_identifier="sourceIdentifier"
)],
secondary_source_versions=[codebuild.CfnProject.ProjectSourceVersionProperty(
source_identifier="sourceIdentifier",
# the properties below are optional
source_version="sourceVersion"
)],
source_version="sourceVersion",
tags=[CfnTag(
key="key",
value="value"
)],
timeout_in_minutes=123,
triggers=codebuild.CfnProject.ProjectTriggersProperty(
build_type="buildType",
filter_groups=[[codebuild.CfnProject.WebhookFilterProperty(
pattern="pattern",
type="type",
# the properties below are optional
exclude_matched_pattern=False
)]],
pull_request_build_policy=codebuild.CfnProject.PullRequestBuildPolicyProperty(
requires_comment_approval="requiresCommentApproval",
# the properties below are optional
approver_roles=["approverRoles"]
),
scope_configuration=codebuild.CfnProject.ScopeConfigurationProperty(
name="name",
# the properties below are optional
domain="domain",
scope="scope"
),
webhook=False
),
visibility="visibility",
vpc_config=codebuild.CfnProject.VpcConfigProperty(
security_group_ids=["securityGroupIds"],
subnets=["subnets"],
vpc_id="vpcId"
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codebuild.*;
CfnProject cfnProject = CfnProject.Builder.create(this, "MyCfnProject")
.artifacts(ArtifactsProperty.builder()
.type("type")
// the properties below are optional
.artifactIdentifier("artifactIdentifier")
.encryptionDisabled(false)
.location("location")
.name("name")
.namespaceType("namespaceType")
.overrideArtifactName(false)
.packaging("packaging")
.path("path")
.build())
.environment(EnvironmentProperty.builder()
.computeType("computeType")
.image("image")
.type("type")
// the properties below are optional
.certificate("certificate")
.dockerServer(DockerServerProperty.builder()
.computeType("computeType")
// the properties below are optional
.securityGroupIds(List.of("securityGroupIds"))
.build())
.environmentVariables(List.of(EnvironmentVariableProperty.builder()
.name("name")
.value("value")
// the properties below are optional
.type("type")
.build()))
.fleet(ProjectFleetProperty.builder()
.fleetArn("fleetArn")
.build())
.hostKernel("hostKernel")
.imagePullCredentialsType("imagePullCredentialsType")
.privilegedMode(false)
.registryCredential(RegistryCredentialProperty.builder()
.credential("credential")
.credentialProvider("credentialProvider")
.build())
.build())
.serviceRole("serviceRole")
.source(SourceProperty.builder()
.type("type")
// the properties below are optional
.auth(SourceAuthProperty.builder()
.type("type")
// the properties below are optional
.resource("resource")
.build())
.buildSpec("buildSpec")
.buildStatusConfig(BuildStatusConfigProperty.builder()
.context("context")
.targetUrl("targetUrl")
.build())
.gitCloneDepth(123)
.gitSubmodulesConfig(GitSubmodulesConfigProperty.builder()
.fetchSubmodules(false)
.build())
.insecureSsl(false)
.location("location")
.reportBuildStatus(false)
.sourceIdentifier("sourceIdentifier")
.build())
// the properties below are optional
.autoRetryLimit(123)
.badgeEnabled(false)
.buildBatchConfig(ProjectBuildBatchConfigProperty.builder()
.batchReportMode("batchReportMode")
.combineArtifacts(false)
.restrictions(BatchRestrictionsProperty.builder()
.computeTypesAllowed(List.of("computeTypesAllowed"))
.maximumBuildsAllowed(123)
.build())
.serviceRole("serviceRole")
.timeoutInMins(123)
.build())
.cache(ProjectCacheProperty.builder()
.type("type")
// the properties below are optional
.cacheNamespace("cacheNamespace")
.location("location")
.modes(List.of("modes"))
.build())
.concurrentBuildLimit(123)
.description("description")
.encryptionKey("encryptionKey")
.fileSystemLocations(List.of(ProjectFileSystemLocationProperty.builder()
.identifier("identifier")
.location("location")
.mountPoint("mountPoint")
.type("type")
// the properties below are optional
.mountOptions("mountOptions")
.build()))
.logsConfig(LogsConfigProperty.builder()
.cloudWatchLogs(CloudWatchLogsConfigProperty.builder()
.status("status")
// the properties below are optional
.groupName("groupName")
.streamName("streamName")
.build())
.s3Logs(S3LogsConfigProperty.builder()
.status("status")
// the properties below are optional
.encryptionDisabled(false)
.location("location")
.build())
.build())
.name("name")
.queuedTimeoutInMinutes(123)
.resourceAccessRole("resourceAccessRole")
.secondaryArtifacts(List.of(ArtifactsProperty.builder()
.type("type")
// the properties below are optional
.artifactIdentifier("artifactIdentifier")
.encryptionDisabled(false)
.location("location")
.name("name")
.namespaceType("namespaceType")
.overrideArtifactName(false)
.packaging("packaging")
.path("path")
.build()))
.secondarySources(List.of(SourceProperty.builder()
.type("type")
// the properties below are optional
.auth(SourceAuthProperty.builder()
.type("type")
// the properties below are optional
.resource("resource")
.build())
.buildSpec("buildSpec")
.buildStatusConfig(BuildStatusConfigProperty.builder()
.context("context")
.targetUrl("targetUrl")
.build())
.gitCloneDepth(123)
.gitSubmodulesConfig(GitSubmodulesConfigProperty.builder()
.fetchSubmodules(false)
.build())
.insecureSsl(false)
.location("location")
.reportBuildStatus(false)
.sourceIdentifier("sourceIdentifier")
.build()))
.secondarySourceVersions(List.of(ProjectSourceVersionProperty.builder()
.sourceIdentifier("sourceIdentifier")
// the properties below are optional
.sourceVersion("sourceVersion")
.build()))
.sourceVersion("sourceVersion")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.timeoutInMinutes(123)
.triggers(ProjectTriggersProperty.builder()
.buildType("buildType")
.filterGroups(List.of(List.of(WebhookFilterProperty.builder()
.pattern("pattern")
.type("type")
// the properties below are optional
.excludeMatchedPattern(false)
.build())))
.pullRequestBuildPolicy(PullRequestBuildPolicyProperty.builder()
.requiresCommentApproval("requiresCommentApproval")
// the properties below are optional
.approverRoles(List.of("approverRoles"))
.build())
.scopeConfiguration(ScopeConfigurationProperty.builder()
.name("name")
// the properties below are optional
.domain("domain")
.scope("scope")
.build())
.webhook(false)
.build())
.visibility("visibility")
.vpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.vpcId("vpcId")
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// 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",
DockerServer = new DockerServerProperty {
ComputeType = "computeType",
// the properties below are optional
SecurityGroupIds = new [] { "securityGroupIds" }
},
EnvironmentVariables = new [] { new EnvironmentVariableProperty {
Name = "name",
Value = "value",
// the properties below are optional
Type = "type"
} },
Fleet = new ProjectFleetProperty {
FleetArn = "fleetArn"
},
HostKernel = "hostKernel",
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
AutoRetryLimit = 123,
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
CacheNamespace = "cacheNamespace",
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
} } },
PullRequestBuildPolicy = new PullRequestBuildPolicyProperty {
RequiresCommentApproval = "requiresCommentApproval",
// the properties below are optional
ApproverRoles = new [] { "approverRoles" }
},
ScopeConfiguration = new ScopeConfigurationProperty {
Name = "name",
// the properties below are optional
Domain = "domain",
Scope = "scope"
},
Webhook = false
},
Visibility = "visibility",
VpcConfig = new VpcConfigProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
Subnets = new [] { "subnets" },
VpcId = "vpcId"
}
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnProject := awscdk.Aws_codebuild.NewCfnProject(this, jsii.String("MyCfnProject"), &CfnProjectProps{
Artifacts: &ArtifactsProperty{
Type: jsii.String("type"),
// the properties below are optional
ArtifactIdentifier: jsii.String("artifactIdentifier"),
EncryptionDisabled: jsii.Boolean(false),
Location: jsii.String("location"),
Name: jsii.String("name"),
NamespaceType: jsii.String("namespaceType"),
OverrideArtifactName: jsii.Boolean(false),
Packaging: jsii.String("packaging"),
Path: jsii.String("path"),
},
Environment: &EnvironmentProperty{
ComputeType: jsii.String("computeType"),
Image: jsii.String("image"),
Type: jsii.String("type"),
// the properties below are optional
Certificate: jsii.String("certificate"),
DockerServer: &DockerServerProperty{
ComputeType: jsii.String("computeType"),
// the properties below are optional
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
},
EnvironmentVariables: []interface{}{
&EnvironmentVariableProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
// the properties below are optional
Type: jsii.String("type"),
},
},
Fleet: &ProjectFleetProperty{
FleetArn: jsii.String("fleetArn"),
},
HostKernel: jsii.String("hostKernel"),
ImagePullCredentialsType: jsii.String("imagePullCredentialsType"),
PrivilegedMode: jsii.Boolean(false),
RegistryCredential: &RegistryCredentialProperty{
Credential: jsii.String("credential"),
CredentialProvider: jsii.String("credentialProvider"),
},
},
ServiceRole: jsii.String("serviceRole"),
Source: &SourceProperty{
Type: jsii.String("type"),
// the properties below are optional
Auth: &SourceAuthProperty{
Type: jsii.String("type"),
// the properties below are optional
Resource: jsii.String("resource"),
},
BuildSpec: jsii.String("buildSpec"),
BuildStatusConfig: &BuildStatusConfigProperty{
Context: jsii.String("context"),
TargetUrl: jsii.String("targetUrl"),
},
GitCloneDepth: jsii.Number(123),
GitSubmodulesConfig: &GitSubmodulesConfigProperty{
FetchSubmodules: jsii.Boolean(false),
},
InsecureSsl: jsii.Boolean(false),
Location: jsii.String("location"),
ReportBuildStatus: jsii.Boolean(false),
SourceIdentifier: jsii.String("sourceIdentifier"),
},
// the properties below are optional
AutoRetryLimit: jsii.Number(123),
BadgeEnabled: jsii.Boolean(false),
BuildBatchConfig: &ProjectBuildBatchConfigProperty{
BatchReportMode: jsii.String("batchReportMode"),
CombineArtifacts: jsii.Boolean(false),
Restrictions: &BatchRestrictionsProperty{
ComputeTypesAllowed: []*string{
jsii.String("computeTypesAllowed"),
},
MaximumBuildsAllowed: jsii.Number(123),
},
ServiceRole: jsii.String("serviceRole"),
TimeoutInMins: jsii.Number(123),
},
Cache: &ProjectCacheProperty{
Type: jsii.String("type"),
// the properties below are optional
CacheNamespace: jsii.String("cacheNamespace"),
Location: jsii.String("location"),
Modes: []*string{
jsii.String("modes"),
},
},
ConcurrentBuildLimit: jsii.Number(123),
Description: jsii.String("description"),
EncryptionKey: jsii.String("encryptionKey"),
FileSystemLocations: []interface{}{
&ProjectFileSystemLocationProperty{
Identifier: jsii.String("identifier"),
Location: jsii.String("location"),
MountPoint: jsii.String("mountPoint"),
Type: jsii.String("type"),
// the properties below are optional
MountOptions: jsii.String("mountOptions"),
},
},
LogsConfig: &LogsConfigProperty{
CloudWatchLogs: &CloudWatchLogsConfigProperty{
Status: jsii.String("status"),
// the properties below are optional
GroupName: jsii.String("groupName"),
StreamName: jsii.String("streamName"),
},
S3Logs: &S3LogsConfigProperty{
Status: jsii.String("status"),
// the properties below are optional
EncryptionDisabled: jsii.Boolean(false),
Location: jsii.String("location"),
},
},
Name: jsii.String("name"),
QueuedTimeoutInMinutes: jsii.Number(123),
ResourceAccessRole: jsii.String("resourceAccessRole"),
SecondaryArtifacts: []interface{}{
&ArtifactsProperty{
Type: jsii.String("type"),
// the properties below are optional
ArtifactIdentifier: jsii.String("artifactIdentifier"),
EncryptionDisabled: jsii.Boolean(false),
Location: jsii.String("location"),
Name: jsii.String("name"),
NamespaceType: jsii.String("namespaceType"),
OverrideArtifactName: jsii.Boolean(false),
Packaging: jsii.String("packaging"),
Path: jsii.String("path"),
},
},
SecondarySources: []interface{}{
&SourceProperty{
Type: jsii.String("type"),
// the properties below are optional
Auth: &SourceAuthProperty{
Type: jsii.String("type"),
// the properties below are optional
Resource: jsii.String("resource"),
},
BuildSpec: jsii.String("buildSpec"),
BuildStatusConfig: &BuildStatusConfigProperty{
Context: jsii.String("context"),
TargetUrl: jsii.String("targetUrl"),
},
GitCloneDepth: jsii.Number(123),
GitSubmodulesConfig: &GitSubmodulesConfigProperty{
FetchSubmodules: jsii.Boolean(false),
},
InsecureSsl: jsii.Boolean(false),
Location: jsii.String("location"),
ReportBuildStatus: jsii.Boolean(false),
SourceIdentifier: jsii.String("sourceIdentifier"),
},
},
SecondarySourceVersions: []interface{}{
&ProjectSourceVersionProperty{
SourceIdentifier: jsii.String("sourceIdentifier"),
// the properties below are optional
SourceVersion: jsii.String("sourceVersion"),
},
},
SourceVersion: jsii.String("sourceVersion"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TimeoutInMinutes: jsii.Number(123),
Triggers: &ProjectTriggersProperty{
BuildType: jsii.String("buildType"),
FilterGroups: []interface{}{
[]interface{}{
&WebhookFilterProperty{
Pattern: jsii.String("pattern"),
Type: jsii.String("type"),
// the properties below are optional
ExcludeMatchedPattern: jsii.Boolean(false),
},
},
},
PullRequestBuildPolicy: &PullRequestBuildPolicyProperty{
RequiresCommentApproval: jsii.String("requiresCommentApproval"),
// the properties below are optional
ApproverRoles: []*string{
jsii.String("approverRoles"),
},
},
ScopeConfiguration: &ScopeConfigurationProperty{
Name: jsii.String("name"),
// the properties below are optional
Domain: jsii.String("domain"),
Scope: jsii.String("scope"),
},
Webhook: jsii.Boolean(false),
},
Visibility: jsii.String("visibility"),
VpcConfig: &VpcConfigProperty{
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
Subnets: []*string{
jsii.String("subnets"),
},
VpcId: jsii.String("vpcId"),
},
})
Initializer
new CfnProject(scope: Construct, id: string, props: CfnProjectProps)
CfnProject(scope: Construct, id: str, props: CfnProjectProps)
new CfnProject(Construct scope, String id, CfnProjectProps props)
new CfnProject(Construct scope, string id, CfnProjectProps props)
NewCfnProject(Scope Construct, Id *string, Props CfnProjectProps)
Construct Props
artifactsIResolvable | CfnProject.ArtifactsPropertyartifactstyping.Union[IResolvable, ArtifactsProperty]artifactsIResolvableArtifactsIResolvableArtifactsinterface{}required#autoRetryLimitnumberauto_retry_limitint | floatautoRetryLimitNumberAutoRetryLimitdoubleAutoRetryLimit*float64#badgeEnabledboolean | IResolvablebadge_enabledtyping.Union[bool, IResolvable]badgeEnabledBooleanBadgeEnabledboolBadgeEnabledinterface{}#notes
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
CODEPIPELINEfor theSourceproperty, do not specify theBadgeEnabledproperty.
buildBatchConfigIResolvable | CfnProject.ProjectBuildBatchConfigPropertybuild_batch_configtyping.Union[IResolvable, ProjectBuildBatchConfigProperty]buildBatchConfigIResolvableBuildBatchConfigIResolvableBuildBatchConfiginterface{}#cacheIResolvable | CfnProject.ProjectCachePropertycachetyping.Union[IResolvable, ProjectCacheProperty]cacheIResolvableCacheIResolvableCacheinterface{}#concurrentBuildLimitnumberconcurrent_build_limitint | floatconcurrentBuildLimitNumberConcurrentBuildLimitdoubleConcurrentBuildLimit*float64#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.
notes
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).
environmentIResolvable | CfnProject.EnvironmentPropertyenvironmenttyping.Union[IResolvable, EnvironmentProperty]environmentIResolvableEnvironmentIResolvableEnvironmentinterface{}required#fileSystemLocationsIResolvable | IResolvable | CfnProject.ProjectFileSystemLocationProperty[]file_system_locationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectFileSystemLocationProperty]]]fileSystemLocationsIResolvableFileSystemLocationsIResolvableFileSystemLocationsinterface{}#A ProjectFileSystemLocation object specifies the identifier , location , mountOptions , mountPoint , and type of a file system created using Amazon Elastic File System.
logsConfigIResolvable | CfnProject.LogsConfigPropertylogs_configtyping.Union[IResolvable, LogsConfigProperty]logsConfigIResolvableLogsConfigIResolvableLogsConfiginterface{}#A project can create logs in CloudWatch Logs, an S3 bucket, or both.
The name must be unique across all of the projects in your AWS account .
queuedTimeoutInMinutesnumberqueued_timeout_in_minutesint | floatqueuedTimeoutInMinutesNumberQueuedTimeoutInMinutesdoubleQueuedTimeoutInMinutes*float64#resourceAccessRolestringresource_access_rolestrresourceAccessRoleStringResourceAccessRolestringResourceAccessRole*string#secondaryArtifactsIResolvable | IResolvable | CfnProject.ArtifactsProperty[]secondary_artifactstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ArtifactsProperty]]]secondaryArtifactsIResolvableSecondaryArtifactsIResolvableSecondaryArtifactsinterface{}#Each artifacts object specifies output settings that the project generates during a build.
secondarySourcesIResolvable | IResolvable | CfnProject.SourceProperty[]secondary_sourcestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SourceProperty]]]secondarySourcesIResolvableSecondarySourcesIResolvableSecondarySourcesinterface{}#secondarySourceVersionsIResolvable | IResolvable | CfnProject.ProjectSourceVersionProperty[]secondary_source_versionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectSourceVersionProperty]]]secondarySourceVersionsIResolvableSecondarySourceVersionsIResolvableSecondarySourceVersionsinterface{}#If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).
sourceIResolvable | CfnProject.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}required#notes
If not specified, the latest version is used. If specified, it must be one of:
- For CodeCommit: the commit ID, branch, or Git tag to use.
- For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID(for examplepr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. - For GitLab: the commit ID, branch, or Git tag to use.
- For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
- For Amazon S3: the version ID of the object that represents the build input ZIP file to use.
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 .
These tags are available for use by AWS services that support AWS CodeBuild build project tags.
timeoutInMinutesnumbertimeout_in_minutesint | floattimeoutInMinutesNumberTimeoutInMinutesdoubleTimeoutInMinutes*float64#The default is 60 minutes.
triggersIResolvable | CfnProject.ProjectTriggersPropertytriggerstyping.Union[IResolvable, ProjectTriggersProperty]triggersIResolvableTriggersIResolvableTriggersinterface{}#- PUBLIC_READ - The project builds are visible to the public.
- PRIVATE - The project builds are not visible to the public.
vpcConfigIResolvable | CfnProject.VpcConfigPropertyvpc_configtyping.Union[IResolvable, VpcConfigProperty]vpcConfigIResolvableVpcConfigIResolvableVpcConfiginterface{}#For more information, see Use AWS CodeBuild with Amazon Virtual Private Cloud in the AWS CodeBuild User Guide .
Properties
artifactsIResolvable | CfnProject.ArtifactsPropertyartifactstyping.Union[IResolvable, ArtifactsProperty]artifactsIResolvableArtifactsIResolvableArtifactsinterface{}required#autoRetryLimitnumberauto_retry_limitint | floatautoRetryLimitNumberAutoRetryLimitdoubleAutoRetryLimit*float64#badgeEnabledboolean | IResolvablebadge_enabledtyping.Union[bool, IResolvable]badgeEnabledBooleanBadgeEnabledboolBadgeEnabledinterface{}#buildBatchConfigIResolvable | CfnProject.ProjectBuildBatchConfigPropertybuild_batch_configtyping.Union[IResolvable, ProjectBuildBatchConfigProperty]buildBatchConfigIResolvableBuildBatchConfigIResolvableBuildBatchConfiginterface{}#cacheIResolvable | CfnProject.ProjectCachePropertycachetyping.Union[IResolvable, ProjectCacheProperty]cacheIResolvableCacheIResolvableCacheinterface{}#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringrequiredstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsrequired#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*stringrequired#concurrentBuildLimitnumberconcurrent_build_limitint | floatconcurrentBuildLimitNumberConcurrentBuildLimitdoubleConcurrentBuildLimit*float64#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#environmentIResolvable | CfnProject.EnvironmentPropertyenvironmenttyping.Union[IResolvable, EnvironmentProperty]environmentIResolvableEnvironmentIResolvableEnvironmentinterface{}required#fileSystemLocationsIResolvable | IResolvable | CfnProject.ProjectFileSystemLocationProperty[]file_system_locationstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectFileSystemLocationProperty]]]fileSystemLocationsIResolvableFileSystemLocationsIResolvableFileSystemLocationsinterface{}#The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId).
logsConfigIResolvable | CfnProject.LogsConfigPropertylogs_configtyping.Union[IResolvable, LogsConfigProperty]logsConfigIResolvableLogsConfigIResolvableLogsConfiginterface{}#projectRefProjectReferenceproject_refProjectReferenceprojectRefProjectReferenceProjectRefProjectReferenceProjectRefProjectReferencerequired#queuedTimeoutInMinutesnumberqueued_timeout_in_minutesint | floatqueuedTimeoutInMinutesNumberQueuedTimeoutInMinutesdoubleQueuedTimeoutInMinutes*float64#If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
resourceAccessRolestringresource_access_rolestrresourceAccessRoleStringResourceAccessRolestringResourceAccessRole*string#secondaryArtifactsIResolvable | IResolvable | CfnProject.ArtifactsProperty[]secondary_artifactstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ArtifactsProperty]]]secondaryArtifactsIResolvableSecondaryArtifactsIResolvableSecondaryArtifactsinterface{}#secondarySourcesIResolvable | IResolvable | CfnProject.SourceProperty[]secondary_sourcestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SourceProperty]]]secondarySourcesIResolvableSecondarySourcesIResolvableSecondarySourcesinterface{}#secondarySourceVersionsIResolvable | IResolvable | CfnProject.ProjectSourceVersionProperty[]secondary_source_versionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProjectSourceVersionProperty]]]secondarySourceVersionsIResolvableSecondarySourceVersionsIResolvableSecondarySourceVersionsinterface{}#sourceIResolvable | CfnProject.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{}required#CfnElements must be defined within a stack scope (directly or indirectly).
timeoutInMinutesnumbertimeout_in_minutesint | floattimeoutInMinutesNumberTimeoutInMinutesdoubleTimeoutInMinutes*float64#triggersIResolvable | CfnProject.ProjectTriggersPropertytriggerstyping.Union[IResolvable, ProjectTriggersProperty]triggersIResolvableTriggersIResolvableTriggersinterface{}#Possible values are:.
vpcConfigIResolvable | CfnProject.VpcConfigPropertyvpc_configtyping.Union[IResolvable, VpcConfigProperty]vpcConfigIResolvableVpcConfigIResolvableVpcConfiginterface{}#Methods
addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#1 parameter
Parameters
pathpathpathpathPath— The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.
addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.
addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#notes · 2 parameters
To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
Parameters
pathpathpathpathPath— - The path of the property, you can use dot notation to override values in complex types.valuevaluevaluevalueValue— - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#1 parameter
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#Syntactic sugar for addOverride("Properties.<...>", value).
2 parameters
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path of the property.valuevaluevaluevalueValue— The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
1 parameter
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:
arnForProject(resource: IProjectRef): string@staticmethod def arn_for_project(resource: IProjectRef) -> strpublic static String arnForProject(IProjectRef resource)public static string ArnForProject(IProjectRef resource)func ArnForProject(Resource IProjectRef) *stringstatic#cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#fromProjectArn(scope: Construct, id: string, arn: string): IProjectRef@staticmethod def from_project_arn(scope: Construct, id: str, arn: str) -> IProjectRefpublic static IProjectRef fromProjectArn(Construct scope, String id, String arn)public static IProjectRef FromProjectArn(Construct scope, string id, string arn)func FromProjectArn(Scope Construct, Id *string, Arn *string) IProjectRefstatic#fromProjectName(scope: Construct, id: string, projectName: string): IProjectRef@staticmethod def from_project_name(scope: Construct, id: str, project_name: str) -> IProjectRefpublic static IProjectRef fromProjectName(Construct scope, String id, String projectName)public static IProjectRef FromProjectName(Construct scope, string id, string projectName)func FromProjectName(Scope Construct, Id *string, ProjectName *string) IProjectRefstatic#getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.
1 parameter
Parameters
attributeNameattribute_nameattributeNameattributeNameAttributeName— The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isCfnProject(x: any): boolean@staticmethod def is_cfn_project(x: Any) -> boolpublic static Boolean isCfnProject(Object x)public static bool IsCfnProject(object x)func IsCfnProject(X interface{}) *boolstatic#isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#2 parameters
Parameters
targettargettargettargetTarget— The dependency to replace.newTargetnew_targetnewTargetnewTargetNewTarget— The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#returns
Returns: a string representation of this resource
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.