# CfnObjectTypeProps

Properties for defining a `CfnObjectType`.

Used as props by: [CfnObjectType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_customerprofiles.CfnObjectType.html)

- Source: Generated at build time
- Type last changed: v2.241.0 · 2 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_customerprofiles as customerprofiles } from 'aws-cdk-lib';
const cfnObjectTypeProps: customerprofiles.CfnObjectTypeProps = {
  description: 'description',
  domainName: 'domainName',
  objectTypeName: 'objectTypeName',

  // the properties below are optional
  allowProfileCreation: false,
  encryptionKey: 'encryptionKey',
  expirationDays: 123,
  fields: [{
    name: 'name',
    objectTypeField: {
      contentType: 'contentType',
      source: 'source',
      target: 'target',
    },
  }],
  keys: [{
    name: 'name',
    objectTypeKeyList: [{
      fieldNames: ['fieldNames'],
      standardIdentifiers: ['standardIdentifiers'],
    }],
  }],
  maxProfileObjectCount: 123,
  sourceLastUpdatedTimestampFormat: 'sourceLastUpdatedTimestampFormat',
  sourcePriority: 123,
  tags: [{
    key: 'key',
    value: 'value',
  }],
  templateId: 'templateId',
};
```

Python:

```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_customerprofiles as customerprofiles

cfn_object_type_props = customerprofiles.CfnObjectTypeProps(
    description="description",
    domain_name="domainName",
    object_type_name="objectTypeName",

    # the properties below are optional
    allow_profile_creation=False,
    encryption_key="encryptionKey",
    expiration_days=123,
    fields=[customerprofiles.CfnObjectType.FieldMapProperty(
        name="name",
        object_type_field=customerprofiles.CfnObjectType.ObjectTypeFieldProperty(
            content_type="contentType",
            source="source",
            target="target"
        )
    )],
    keys=[customerprofiles.CfnObjectType.KeyMapProperty(
        name="name",
        object_type_key_list=[customerprofiles.CfnObjectType.ObjectTypeKeyProperty(
            field_names=["fieldNames"],
            standard_identifiers=["standardIdentifiers"]
        )]
    )],
    max_profile_object_count=123,
    source_last_updated_timestamp_format="sourceLastUpdatedTimestampFormat",
    source_priority=123,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    template_id="templateId"
)
```

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

CfnObjectTypeProps cfnObjectTypeProps = CfnObjectTypeProps.builder()
        .description("description")
        .domainName("domainName")
        .objectTypeName("objectTypeName")

        // the properties below are optional
        .allowProfileCreation(false)
        .encryptionKey("encryptionKey")
        .expirationDays(123)
        .fields(List.of(FieldMapProperty.builder()
                .name("name")
                .objectTypeField(ObjectTypeFieldProperty.builder()
                        .contentType("contentType")
                        .source("source")
                        .target("target")
                        .build())
                .build()))
        .keys(List.of(KeyMapProperty.builder()
                .name("name")
                .objectTypeKeyList(List.of(ObjectTypeKeyProperty.builder()
                        .fieldNames(List.of("fieldNames"))
                        .standardIdentifiers(List.of("standardIdentifiers"))
                        .build()))
                .build()))
        .maxProfileObjectCount(123)
        .sourceLastUpdatedTimestampFormat("sourceLastUpdatedTimestampFormat")
        .sourcePriority(123)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .templateId("templateId")
        .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.CustomerProfiles;

var cfnObjectTypeProps = new CfnObjectTypeProps {
    Description = "description",
    DomainName = "domainName",
    ObjectTypeName = "objectTypeName",

    // the properties below are optional
    AllowProfileCreation = false,
    EncryptionKey = "encryptionKey",
    ExpirationDays = 123,
    Fields = new [] { new FieldMapProperty {
        Name = "name",
        ObjectTypeField = new ObjectTypeFieldProperty {
            ContentType = "contentType",
            Source = "source",
            Target = "target"
        }
    } },
    Keys = new [] { new KeyMapProperty {
        Name = "name",
        ObjectTypeKeyList = new [] { new ObjectTypeKeyProperty {
            FieldNames = new [] { "fieldNames" },
            StandardIdentifiers = new [] { "standardIdentifiers" }
        } }
    } },
    MaxProfileObjectCount = 123,
    SourceLastUpdatedTimestampFormat = "sourceLastUpdatedTimestampFormat",
    SourcePriority = 123,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TemplateId = "templateId"
};
```

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"

cfnObjectTypeProps := &CfnObjectTypeProps{
	Description: jsii.String("description"),
	DomainName: jsii.String("domainName"),
	ObjectTypeName: jsii.String("objectTypeName"),

	// the properties below are optional
	AllowProfileCreation: jsii.Boolean(false),
	EncryptionKey: jsii.String("encryptionKey"),
	ExpirationDays: jsii.Number(123),
	Fields: []interface{}{
		&FieldMapProperty{
			Name: jsii.String("name"),
			ObjectTypeField: &ObjectTypeFieldProperty{
				ContentType: jsii.String("contentType"),
				Source: jsii.String("source"),
				Target: jsii.String("target"),
			},
		},
	},
	Keys: []interface{}{
		&KeyMapProperty{
			Name: jsii.String("name"),
			ObjectTypeKeyList: []interface{}{
				&ObjectTypeKeyProperty{
					FieldNames: []*string{
						jsii.String("fieldNames"),
					},
					StandardIdentifiers: []*string{
						jsii.String("standardIdentifiers"),
					},
				},
			},
		},
	},
	MaxProfileObjectCount: jsii.Number(123),
	SourceLastUpdatedTimestampFormat: jsii.String("sourceLastUpdatedTimestampFormat"),
	SourcePriority: jsii.Number(123),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateId: jsii.String("templateId"),
}
```

## Properties

- `allowProfileCreation`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether a profile should be created when data is received if one doesn’t exist for an object of this type.

  The default is `FALSE` . If the AllowProfileCreation flag is set to `FALSE` , then the service tries to fetch a standard profile and associate this object with the profile. If it is set to `TRUE` , and if no match is found, then the service creates a new standard profile.

- `description`: string (required) — The description of the profile object type mapping.

- `domainName`: string (required) — The unique name of the domain.

- `encryptionKey`: string — The customer-provided key to encrypt the profile object that will be created in this profile object type mapping.

  If not specified the system will use the encryption key of the domain.

- `expirationDays`: number — The number of days until the data of this type expires.

- `fields`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnObjectType.FieldMapProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_customerprofiles.CfnObjectType.FieldMapProperty.html)[] — A list of field definitions for the object type mapping.

- `keys`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnObjectType.KeyMapProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_customerprofiles.CfnObjectType.KeyMapProperty.html)[] — A list of keys that can be used to map data to the profile or search for the profile.

- `maxProfileObjectCount`: number — The amount of profile object max count assigned to the object type.

- `objectTypeName`: string (required) — The name of the profile object type.

- `sourceLastUpdatedTimestampFormat`: string — The format of your sourceLastUpdatedTimestamp that was previously set up.

- `sourcePriority`: number — Defines the priority order of object types.

  Lower value indicates higher priority.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags used to organize, track, or control access for this resource.

- `templateId`: string — A unique identifier for the template mapping.

  This can be used instead of specifying the Keys and Fields properties directly.
