Class TargetObjectKeyFormat
The key format for the log object.
Inheritance
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class TargetObjectKeyFormat : DeputyBase
Syntax (vb)
Public MustInherit Class TargetObjectKeyFormat
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var accessLogsBucket = new Bucket(this, "AccessLogsBucket");
var bucket = new Bucket(this, "MyBucket", new BucketProps {
ServerAccessLogsBucket = accessLogsBucket,
ServerAccessLogsPrefix = "logs",
// You can use a simple prefix with `TargetObjectKeyFormat.simplePrefix()`, but it is the same even if you do not specify `targetObjectKeyFormat` property.
TargetObjectKeyFormat = TargetObjectKeyFormat.SimplePrefix()
});
Synopsis
Constructors
TargetObjectKeyFormat() | |
TargetObjectKeyFormat(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
TargetObjectKeyFormat(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
PartitionedPrefix(Nullable<PartitionDateSource>) | Use partitioned prefix for log objects. If you do not specify the dateSource argument, the default is EventTime. |
SimplePrefix() | Use the simple prefix for log objects. |
Constructors
TargetObjectKeyFormat()
protected TargetObjectKeyFormat()
TargetObjectKeyFormat(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected TargetObjectKeyFormat(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
TargetObjectKeyFormat(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected TargetObjectKeyFormat(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
PartitionedPrefix(Nullable<PartitionDateSource>)
Use partitioned prefix for log objects. If you do not specify the dateSource argument, the default is EventTime.
public static TargetObjectKeyFormat PartitionedPrefix(Nullable<PartitionDateSource> dateSource = null)
Parameters
- dateSource System.Nullable<PartitionDateSource>
Returns
Remarks
The partitioned prefix format as follow: [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]
SimplePrefix()
Use the simple prefix for log objects.
public static TargetObjectKeyFormat SimplePrefix()
Returns
Remarks
The simple prefix format as follow: [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]