# CfnTaskTemplateProps

Properties for defining a `CfnTaskTemplate`.

Extends: CfnTaskTemplateProps
Used as props by: CfnTaskTemplate

- Source: Generated code
- Type last changed: v2.174.0 · 4 Jan 2025

## Example

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

declare const constraints: any;
const cfnTaskTemplateProps: connect.CfnTaskTemplateProps = {
  instanceArn: 'instanceArn',

  // the properties below are optional
  clientToken: 'clientToken',
  constraints: constraints,
  contactFlowArn: 'contactFlowArn',
  defaults: [{
    defaultValue: 'defaultValue',
    id: {
      name: 'name',
    },
  }],
  description: 'description',
  fields: [{
    id: {
      name: 'name',
    },
    type: 'type',

    // the properties below are optional
    description: 'description',
    singleSelectOptions: ['singleSelectOptions'],
  }],
  name: 'name',
  selfAssignContactFlowArn: 'selfAssignContactFlowArn',
  status: 'status',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `clientToken`: string — A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

- `constraints`: any — Constraints that are applicable to the fields listed.

  The values can be represented in either JSON or YAML format. For an example of the JSON configuration, see *Examples* at the bottom of this page.

- `contactFlowArn`: string — The Amazon Resource Name (ARN) of the flow that runs by default when a task is created by referencing this template.

  `ContactFlowArn` is not required when there is a field with `fieldType` = `QUICK_CONNECT` .

- `defaults`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTaskTemplate.DefaultFieldValueProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnTaskTemplate.DefaultFieldValueProperty.html)[] — The default values for fields when a task is created by referencing this template.

- `description`: string — The description of the task template.

- `fields`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTaskTemplate.FieldProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnTaskTemplate.FieldProperty.html)[] — Fields that are part of the template.

  A template requires at least one field that has type `Name` .

- `instanceArn`: string (required) — The Amazon Resource Name (ARN) of the Connect Customer instance.

- `name`: string — The name of the task template.

- `selfAssignContactFlowArn`: string — The Amazon Resource Name (ARN) of the flow.

- `status`: string — The status of the task template.

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