AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates a session logger.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateSessionLoggerAsync.
Namespace: Amazon.WorkSpacesWeb
Assembly: AWSSDK.WorkSpacesWeb.dll
Version: 3.x.y.z
public abstract CreateSessionLoggerResponse CreateSessionLogger( CreateSessionLoggerRequest request )
Container for the necessary parameters to execute the CreateSessionLogger service method.
| Exception | Condition |
|---|---|
| AccessDeniedException | Access is denied. |
| ConflictException | There is a conflict. |
| InternalServerException | There is an internal server error. |
| ServiceQuotaExceededException | The service quota has been exceeded. |
| ThrottlingException | There is a throttling error. |
| ValidationException | There is a validation error. |
Creates a session logger that captures all events and stores them in S3 with JSON format and flat folder structure
var client = new AmazonWorkSpacesWebClient();
var response = client.AssociateSessionLogger(new AssociateSessionLoggerRequest
{
PortalArn = "arn:aws:workspaces-web:us-west-2:123456789012:portal/12345678-1234-1234-1234-123456789012",
SessionLoggerArn = "arn:aws:workspaces-web:us-west-2:123456789012:sessionLogger/11111111-1111-1111-1111-111111111111"
});
string portalArn = response.PortalArn;
string sessionLoggerArn = response.SessionLoggerArn;
Creates a session logger that captures only specific events with JSONLines format and nested folder structure
var client = new AmazonWorkSpacesWebClient();
var response = client.CreateSessionLogger(new CreateSessionLoggerRequest
{
AdditionalEncryptionContext = new Dictionary<string, string> {
{ "EncryptionContextKey", "EncryptionContextValue" }
},
CustomerManagedKey = "arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012",
DisplayName = "Session Logger with Each Events",
EventFilter = new EventFilter { Include = new List<string> {
"SessionStart",
"SessionEnd",
"UrlLoad",
"WebsiteInteract"
} },
LogConfiguration = new LogConfiguration { S3 = new S3LogConfiguration {
Bucket = "my-session-logs-bucket",
BucketOwner = "123456789012",
FolderStructure = "NestedByDate",
KeyPrefix = "session-logs/each/event",
LogFileFormat = "JSONLines"
} },
Tags = new List<Tag> {
new Tag {
Key = "KEY-1",
Value = "VALUE-1"
},
new Tag {
Key = "KEY-2",
Value = "VALUE-2"
}
}
});
string sessionLoggerArn = response.SessionLoggerArn;
.NET Framework:
Supported in: 4.7.2 and newer