Skip to content
v2.275.0

Experimental

@aws-cdk/aws-neptune-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

LogType Class ​

Neptune log types that can be exported to CloudWatch logs.

Example ​

ts
// Cluster parameter group with the neptune_enable_audit_log param set to 1
const clusterParameterGroup = new neptune.ClusterParameterGroup(this, 'ClusterParams', {
  description: 'Cluster parameter group',
  parameters: {
    neptune_enable_audit_log: '1'
  },
});

const cluster = new neptune.DatabaseCluster(this, 'Database', {
  vpc,
  instanceType: neptune.InstanceType.R5_LARGE,
  // Audit logs are enabled via the clusterParameterGroup
  clusterParameterGroup,
  // Optionally configuring audit logs to be exported to CloudWatch Logs
  cloudwatchLogsExports: [neptune.LogType.AUDIT],
  // Optionally set a retention period on exported CloudWatch Logs
  cloudwatchLogsRetention: logs.RetentionDays.ONE_MONTH,
});
python
# Cluster parameter group with the neptune_enable_audit_log param set to 1
cluster_parameter_group = neptune.ClusterParameterGroup(self, "ClusterParams",
    description="Cluster parameter group",
    parameters={
        "neptune_enable_audit_log": "1"
    }
)

cluster = neptune.DatabaseCluster(self, "Database",
    vpc=vpc,
    instance_type=neptune.InstanceType.R5_LARGE,
    # Audit logs are enabled via the clusterParameterGroup
    cluster_parameter_group=cluster_parameter_group,
    # Optionally configuring audit logs to be exported to CloudWatch Logs
    cloudwatch_logs_exports=[neptune.LogType.AUDIT],
    # Optionally set a retention period on exported CloudWatch Logs
    cloudwatch_logs_retention=logs.RetentionDays.ONE_MONTH
)
java
// Cluster parameter group with the neptune_enable_audit_log param set to 1
ClusterParameterGroup clusterParameterGroup = ClusterParameterGroup.Builder.create(this, "ClusterParams")
        .description("Cluster parameter group")
        .parameters(Map.of(
                "neptune_enable_audit_log", "1"))
        .build();

DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
        .vpc(vpc)
        .instanceType(InstanceType.R5_LARGE)
        // Audit logs are enabled via the clusterParameterGroup
        .clusterParameterGroup(clusterParameterGroup)
        // Optionally configuring audit logs to be exported to CloudWatch Logs
        .cloudwatchLogsExports(List.of(LogType.AUDIT))
        // Optionally set a retention period on exported CloudWatch Logs
        .cloudwatchLogsRetention(RetentionDays.ONE_MONTH)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Neptune.Alpha
// Cluster parameter group with the neptune_enable_audit_log param set to 1
var clusterParameterGroup = new ClusterParameterGroup(this, "ClusterParams", new ClusterParameterGroupProps {
    Description = "Cluster parameter group",
    Parameters = new Dictionary<string, string> {
        { "neptune_enable_audit_log", "1" }
    }
});

var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
    Vpc = vpc,
    InstanceType = InstanceType.R5_LARGE,
    // Audit logs are enabled via the clusterParameterGroup
    ClusterParameterGroup = clusterParameterGroup,
    // Optionally configuring audit logs to be exported to CloudWatch Logs
    CloudwatchLogsExports = new [] { LogType.AUDIT },
    // Optionally set a retention period on exported CloudWatch Logs
    CloudwatchLogsRetention = RetentionDays.ONE_MONTH
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkneptunealpha/v2
// Cluster parameter group with the neptune_enable_audit_log param set to 1
clusterParameterGroup := neptune.NewClusterParameterGroup(this, jsii.String("ClusterParams"), &ClusterParameterGroupProps{
	Description: jsii.String("Cluster parameter group"),
	Parameters: map[string]*string{
		"neptune_enable_audit_log": jsii.String("1"),
	},
})

cluster := neptune.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{
	Vpc: Vpc,
	InstanceType: neptune.InstanceType_R5_LARGE(),
	// Audit logs are enabled via the clusterParameterGroup
	ClusterParameterGroup: ClusterParameterGroup,
	// Optionally configuring audit logs to be exported to CloudWatch Logs
	CloudwatchLogsExports: []LogType{
		neptune.LogType_AUDIT(),
	},
	// Optionally set a retention period on exported CloudWatch Logs
	CloudwatchLogsRetention: logs.RetentionDays_ONE_MONTH,
})

Initializer ​

ts
new LogType(value: string)
python
LogType(value: str)
java
new LogType(String value)
csharp
new LogType(string value)
go
NewLogType(Value *string)

Properties ​

AUDITLogTypeauditLogTypeAUDITLogTypeAUDITLogTypeAUDITLogTypestatic#
Audit logs.
valuestringvaluestrvalueStringValuestringValue*string#
the log type.