CfnLoggingProps Struct
Properties for defining a CfnLogging.
| 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_iot as iot } from 'aws-cdk-lib';
const cfnLoggingProps: iot.CfnLoggingProps = {
accountId: 'accountId',
defaultLogLevel: 'defaultLogLevel',
roleArn: 'roleArn',
// the properties below are optional
eventConfigurations: [{
eventType: 'eventType',
// the properties below are optional
logDestination: 'logDestination',
logLevel: 'logLevel',
}],
};
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_iot as iot
cfn_logging_props = iot.CfnLoggingProps(
account_id="accountId",
default_log_level="defaultLogLevel",
role_arn="roleArn",
# the properties below are optional
event_configurations=[iot.CfnLogging.EventConfigurationProperty(
event_type="eventType",
# the properties below are optional
log_destination="logDestination",
log_level="logLevel"
)]
)
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.iot.*;
CfnLoggingProps cfnLoggingProps = CfnLoggingProps.builder()
.accountId("accountId")
.defaultLogLevel("defaultLogLevel")
.roleArn("roleArn")
// the properties below are optional
.eventConfigurations(List.of(EventConfigurationProperty.builder()
.eventType("eventType")
// the properties below are optional
.logDestination("logDestination")
.logLevel("logLevel")
.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.IoT;
var cfnLoggingProps = new CfnLoggingProps {
AccountId = "accountId",
DefaultLogLevel = "defaultLogLevel",
RoleArn = "roleArn",
// the properties below are optional
EventConfigurations = new [] { new EventConfigurationProperty {
EventType = "eventType",
// the properties below are optional
LogDestination = "logDestination",
LogLevel = "logLevel"
} }
};
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"
cfnLoggingProps := &CfnLoggingProps{
AccountId: jsii.String("accountId"),
DefaultLogLevel: jsii.String("defaultLogLevel"),
RoleArn: jsii.String("roleArn"),
// the properties below are optional
EventConfigurations: []interface{}{
&EventConfigurationProperty{
EventType: jsii.String("eventType"),
// the properties below are optional
LogDestination: jsii.String("logDestination"),
LogLevel: jsii.String("logLevel"),
},
},
}
Properties
The account ID.
defaultLogLevelstringdefault_log_levelstrdefaultLogLevelStringDefaultLogLevelstringDefaultLogLevel*string required #The default log level.
Valid Values: DEBUG | INFO | ERROR | WARN | DISABLED
eventConfigurationsoptionalIResolvable | IResolvable | CfnLogging.event_configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EventConfigurationProperty]]]eventConfigurationsoptionalIResolvableEventConfigurationsoptionalIResolvableEventConfigurationsoptionalinterface{} #Configurations for event-based logging that specifies which event types to log and their logging settings.
Overrides account-level logging for the specified event