# CfnComponentTypeProps

Properties for defining a `CfnComponentType`.

Extends: CfnComponentTypeProps
Used as props by: CfnComponentType

- Source: Generated code
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

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

declare const dataTypeProperty_: iottwinmaker.CfnComponentType.DataTypeProperty;
declare const dataValueProperty_: iottwinmaker.CfnComponentType.DataValueProperty;
declare const relationshipValue: any;
const cfnComponentTypeProps: iottwinmaker.CfnComponentTypeProps = {
  componentTypeId: 'componentTypeId',
  workspaceId: 'workspaceId',

  // the properties below are optional
  compositeComponentTypes: {
    compositeComponentTypesKey: {
      componentTypeId: 'componentTypeId',
    },
  },
  description: 'description',
  extendsFrom: ['extendsFrom'],
  functions: {
    functionsKey: {
      implementedBy: {
        isNative: false,
        lambda: {
          arn: 'arn',
        },
      },
      requiredProperties: ['requiredProperties'],
      scope: 'scope',
    },
  },
  isSingleton: false,
  propertyDefinitions: {
    propertyDefinitionsKey: {
      configurations: {
        configurationsKey: 'configurations',
      },
      dataType: {
        type: 'type',

        // the properties below are optional
        allowedValues: [{
          booleanValue: false,
          doubleValue: 123,
          expression: 'expression',
          integerValue: 123,
          listValue: [dataValueProperty_],
          longValue: 123,
          mapValue: {
            mapValueKey: dataValueProperty_,
          },
          relationshipValue: relationshipValue,
          stringValue: 'stringValue',
        }],
        nestedType: dataTypeProperty_,
        relationship: {
          relationshipType: 'relationshipType',
          targetComponentTypeId: 'targetComponentTypeId',
        },
        unitOfMeasure: 'unitOfMeasure',
      },
      defaultValue: {
        booleanValue: false,
        doubleValue: 123,
        expression: 'expression',
        integerValue: 123,
        listValue: [dataValueProperty_],
        longValue: 123,
        mapValue: {
          mapValueKey: dataValueProperty_,
        },
        relationshipValue: relationshipValue,
        stringValue: 'stringValue',
      },
      isExternalId: false,
      isRequiredInEntity: false,
      isStoredExternally: false,
      isTimeSeries: false,
    },
  },
  propertyGroups: {
    propertyGroupsKey: {
      groupType: 'groupType',
      propertyNames: ['propertyNames'],
    },
  },
  tags: {
    tagsKey: 'tags',
  },
};
```

## Properties

- `componentTypeId`: string (required) — The ID of the component type.

- `compositeComponentTypes`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComponentType.CompositeComponentTypeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iottwinmaker.CfnComponentType.CompositeComponentTypeProperty.html) } — Maps strings to `compositeComponentTypes` of the `componentType` .

  `CompositeComponentType` is referenced by `componentTypeId` .

- `description`: string — The description of the component type.

- `extendsFrom`: string[] — The name of the parent component type that this component type extends.

- `functions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComponentType.FunctionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iottwinmaker.CfnComponentType.FunctionProperty.html) } — An object that maps strings to the functions in the component type.

  Each string in the mapping must be unique to this object.

  For information on the FunctionResponse object see the [FunctionResponse](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_FunctionResponse.html) API reference.

- `isSingleton`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A boolean value that specifies whether an entity can have more than one component of this type.

- `propertyDefinitions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComponentType.PropertyDefinitionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iottwinmaker.CfnComponentType.PropertyDefinitionProperty.html) } — An object that maps strings to the property definitions in the component type.

  Each string in the mapping must be unique to this object.

  For information about the PropertyDefinitionResponse object, see the [PropertyDefinitionResponse](https://docs.aws.amazon.com//iot-twinmaker/latest/apireference/API_PropertyDefinitionResponse.html) API reference.

- `propertyGroups`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComponentType.PropertyGroupProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iottwinmaker.CfnComponentType.PropertyGroupProperty.html) } — An object that maps strings to the property groups in the component type.

  Each string in the mapping must be unique to this object.

- `tags`: { [key: string]: string } — The ComponentType tags.

- `workspaceId`: string (required) — The ID of the workspace that contains the component type.
