Skip to content
v2.277.0

CfnSessionLoggerProps Struct ​

Properties for defining a CfnSessionLogger.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_workspacesweb as workspacesweb } from 'aws-cdk-lib';

declare const all: any;
const cfnSessionLoggerProps: workspacesweb.CfnSessionLoggerProps = {
  eventFilter: {
    all: all,
    include: ['include'],
  },
  logConfiguration: {
    s3: {
      bucket: 'bucket',
      folderStructure: 'folderStructure',
      logFileFormat: 'logFileFormat',

      // the properties below are optional
      bucketOwner: 'bucketOwner',
      keyPrefix: 'keyPrefix',
    },
  },

  // the properties below are optional
  additionalEncryptionContext: {
    additionalEncryptionContextKey: 'additionalEncryptionContext',
  },
  customerManagedKey: 'customerManagedKey',
  displayName: 'displayName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
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_workspacesweb as workspacesweb

# all: Any

cfn_session_logger_props = workspacesweb.CfnSessionLoggerProps(
    event_filter=workspacesweb.CfnSessionLogger.EventFilterProperty(
        all=all,
        include=["include"]
    ),
    log_configuration=workspacesweb.CfnSessionLogger.LogConfigurationProperty(
        s3=workspacesweb.CfnSessionLogger.S3LogConfigurationProperty(
            bucket="bucket",
            folder_structure="folderStructure",
            log_file_format="logFileFormat",

            # the properties below are optional
            bucket_owner="bucketOwner",
            key_prefix="keyPrefix"
        )
    ),

    # the properties below are optional
    additional_encryption_context={
        "additional_encryption_context_key": "additionalEncryptionContext"
    },
    customer_managed_key="customerManagedKey",
    display_name="displayName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.workspacesweb.*;

Object all;

CfnSessionLoggerProps cfnSessionLoggerProps = CfnSessionLoggerProps.builder()
        .eventFilter(EventFilterProperty.builder()
                .all(all)
                .include(List.of("include"))
                .build())
        .logConfiguration(LogConfigurationProperty.builder()
                .s3(S3LogConfigurationProperty.builder()
                        .bucket("bucket")
                        .folderStructure("folderStructure")
                        .logFileFormat("logFileFormat")

                        // the properties below are optional
                        .bucketOwner("bucketOwner")
                        .keyPrefix("keyPrefix")
                        .build())
                .build())

        // the properties below are optional
        .additionalEncryptionContext(Map.of(
                "additionalEncryptionContextKey", "additionalEncryptionContext"))
        .customerManagedKey("customerManagedKey")
        .displayName("displayName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .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.WorkSpacesWeb;

var all;

var cfnSessionLoggerProps = new CfnSessionLoggerProps {
    EventFilter = new EventFilterProperty {
        All = all,
        Include = new [] { "include" }
    },
    LogConfiguration = new LogConfigurationProperty {
        S3 = new S3LogConfigurationProperty {
            Bucket = "bucket",
            FolderStructure = "folderStructure",
            LogFileFormat = "logFileFormat",

            // the properties below are optional
            BucketOwner = "bucketOwner",
            KeyPrefix = "keyPrefix"
        }
    },

    // the properties below are optional
    AdditionalEncryptionContext = new Dictionary<string, string> {
        { "additionalEncryptionContextKey", "additionalEncryptionContext" }
    },
    CustomerManagedKey = "customerManagedKey",
    DisplayName = "displayName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

var all interface{}

cfnSessionLoggerProps := &CfnSessionLoggerProps{
	EventFilter: &EventFilterProperty{
		All: all,
		Include: []*string{
			jsii.String("include"),
		},
	},
	LogConfiguration: &LogConfigurationProperty{
		S3: &S3LogConfigurationProperty{
			Bucket: jsii.String("bucket"),
			FolderStructure: jsii.String("folderStructure"),
			LogFileFormat: jsii.String("logFileFormat"),

			// the properties below are optional
			BucketOwner: jsii.String("bucketOwner"),
			KeyPrefix: jsii.String("keyPrefix"),
		},
	},

	// the properties below are optional
	AdditionalEncryptionContext: map[string]*string{
		"additionalEncryptionContextKey": jsii.String("additionalEncryptionContext"),
	},
	CustomerManagedKey: jsii.String("customerManagedKey"),
	DisplayName: jsii.String("displayName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

additionalEncryptionContextoptionalIResolvable | { [key: string]: string }additional_encryption_contextoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]additionalEncryptionContextoptionalIResolvableAdditionalEncryptionContextoptionalIResolvableAdditionalEncryptionContextoptionalinterface{} #
The additional encryption context of the session logger.
customerManagedKeyoptionalstringcustomer_managed_keyoptionalstrcustomerManagedKeyoptionalStringCustomerManagedKeyoptionalstringCustomerManagedKeyoptional*string #
The custom managed key of the session logger.
displayNameoptionalstringdisplay_nameoptionalstrdisplayNameoptionalStringDisplayNameoptionalstringDisplayNameoptional*string #
The human-readable display name.
eventFilterIResolvable | CfnSessionLogger.EventFilterPropertyevent_filtertyping.Union[IResolvable, EventFilterProperty]eventFilterIResolvableEventFilterIResolvableEventFilterinterface{} required #
The filter that specifies which events to monitor.
logConfigurationIResolvable | CfnSessionLogger.LogConfigurationPropertylog_configurationtyping.Union[IResolvable, LogConfigurationProperty]logConfigurationIResolvableLogConfigurationIResolvableLogConfigurationinterface{} required #
The configuration that specifies where logs are fowarded.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags of the session logger.