LogsConfigProperty Struct
LogsConfig is a property of the AWS CodeBuild Project resource that specifies information about logs for a build project. These can be logs in Amazon CloudWatch Logs, built in a specified S3 bucket, or both.
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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 logsConfigProperty: codebuild.CfnProject.LogsConfigProperty = {
cloudWatchLogs: {
status: 'status',
// the properties below are optional
groupName: 'groupName',
streamName: 'streamName',
},
s3Logs: {
status: 'status',
// the properties below are optional
encryptionDisabled: false,
location: 'location',
},
};
python
# 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
logs_config_property = 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"
)
)
java
// 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.*;
LogsConfigProperty logsConfigProperty = 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();
csharp
// 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 logsConfigProperty = 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"
}
};
go
// 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"
logsConfigProperty := &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"),
},
}
Properties
cloudWatchLogsoptionalIResolvable | CfnProject.cloud_watch_logsoptionaltyping.Union[IResolvable, CloudWatchLogsConfigProperty]cloudWatchLogsoptionalIResolvableCloudWatchLogsoptionalIResolvableCloudWatchLogsoptionalinterface{} #Information about CloudWatch Logs for a build project.
CloudWatch Logs are enabled by default.
s3LogsoptionalIResolvable | CfnProject.S3LogsConfigPropertys3_logsoptionaltyping.Union[IResolvable, S3LogsConfigProperty]s3LogsoptionalIResolvableS3LogsoptionalIResolvableS3Logsoptionalinterface{} #Information about logs built to an S3 bucket for a build project.
S3 logs are not enabled by default.