# TargetObjectKeyFormatProperty

Amazon S3 key format for log objects.

Only one format, PartitionedPrefix or SimplePrefix, is allowed.

- Source: Generated at build time
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

TypeScript:

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

declare const simplePrefix: any;
const targetObjectKeyFormatProperty: s3.CfnBucket.TargetObjectKeyFormatProperty = {
  partitionedPrefix: {
    partitionDateSource: 'partitionDateSource',
  },
  simplePrefix: simplePrefix,
};
```

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_s3 as s3

# simple_prefix: Any

target_object_key_format_property = s3.CfnBucket.TargetObjectKeyFormatProperty(
    partitioned_prefix=s3.CfnBucket.PartitionedPrefixProperty(
        partition_date_source="partitionDateSource"
    ),
    simple_prefix=simple_prefix
)
```

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.s3.*;

Object simplePrefix;

TargetObjectKeyFormatProperty targetObjectKeyFormatProperty = TargetObjectKeyFormatProperty.builder()
        .partitionedPrefix(PartitionedPrefixProperty.builder()
                .partitionDateSource("partitionDateSource")
                .build())
        .simplePrefix(simplePrefix)
        .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.S3;

var simplePrefix;

var targetObjectKeyFormatProperty = new TargetObjectKeyFormatProperty {
    PartitionedPrefix = new PartitionedPrefixProperty {
        PartitionDateSource = "partitionDateSource"
    },
    SimplePrefix = simplePrefix
};
```

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"

var simplePrefix interface{}

targetObjectKeyFormatProperty := &TargetObjectKeyFormatProperty{
	PartitionedPrefix: &PartitionedPrefixProperty{
		PartitionDateSource: jsii.String("partitionDateSource"),
	},
	SimplePrefix: simplePrefix,
}
```

## Properties

- `partitionedPrefix`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBucket.PartitionedPrefixProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.CfnBucket.PartitionedPrefixProperty.html) — Partitioned S3 key for log objects.

- `simplePrefix`: any — To use the simple format for S3 keys for log objects.

  To specify SimplePrefix format, set SimplePrefix to {}.
