# LoggingPropertiesProperty

Specifies logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster.

- Source: Generated at build time
- Type last changed: v2.154.0 · 22 Aug 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_redshift as redshift } from 'aws-cdk-lib';
const loggingPropertiesProperty: redshift.CfnCluster.LoggingPropertiesProperty = {
  bucketName: 'bucketName',
  logDestinationType: 'logDestinationType',
  logExports: ['logExports'],
  s3KeyPrefix: 's3KeyPrefix',
};
```

Python:

```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_redshift as redshift

logging_properties_property = redshift.CfnCluster.LoggingPropertiesProperty(
    bucket_name="bucketName",
    log_destination_type="logDestinationType",
    log_exports=["logExports"],
    s3_key_prefix="s3KeyPrefix"
)
```

Java:

```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.redshift.*;

LoggingPropertiesProperty loggingPropertiesProperty = LoggingPropertiesProperty.builder()
        .bucketName("bucketName")
        .logDestinationType("logDestinationType")
        .logExports(List.of("logExports"))
        .s3KeyPrefix("s3KeyPrefix")
        .build();
```

C# / .NET:

```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.Redshift;

var loggingPropertiesProperty = new LoggingPropertiesProperty {
    BucketName = "bucketName",
    LogDestinationType = "logDestinationType",
    LogExports = new [] { "logExports" },
    S3KeyPrefix = "s3KeyPrefix"
};
```

Golang:

```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"

loggingPropertiesProperty := &LoggingPropertiesProperty{
	BucketName: jsii.String("bucketName"),
	LogDestinationType: jsii.String("logDestinationType"),
	LogExports: []*string{
		jsii.String("logExports"),
	},
	S3KeyPrefix: jsii.String("s3KeyPrefix"),
}
```

## Properties

- `bucketName`: string — The name of an existing S3 bucket where the log files are to be stored.

  Constraints:

  - Must be in the same region as the cluster
  - The cluster must have read bucket and put object permissions

- `logDestinationType`: string — The log destination type.

  An enum with possible values of `s3` and `cloudwatch` .

- `logExports`: string[] — The collection of exported log types.

  Possible values are `connectionlog` , `useractivitylog` , and `userlog` .

- `s3KeyPrefix`: string — The prefix applied to the log file names.

  Valid characters are any letter from any language, any whitespace character, any numeric character, and the following characters: underscore ( `_` ), period ( `.` ), colon ( `:` ), slash ( `/` ), equal ( `=` ), plus ( `+` ), backslash ( `\` ), hyphen ( `-` ), at symbol ( `@` ).
