# ConstraintsProperty

Describes constraints that apply to the template fields.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 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_connect as connect } from 'aws-cdk-lib';
const constraintsProperty: connect.CfnTaskTemplate.ConstraintsProperty = {
  invisibleFields: [{
    id: {
      name: 'name',
    },
  }],
  readOnlyFields: [{
    id: {
      name: 'name',
    },
  }],
  requiredFields: [{
    id: {
      name: 'name',
    },
  }],
};
```

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_connect as connect

constraints_property = connect.CfnTaskTemplate.ConstraintsProperty(
    invisible_fields=[connect.CfnTaskTemplate.InvisibleFieldInfoProperty(
        id=connect.CfnTaskTemplate.FieldIdentifierProperty(
            name="name"
        )
    )],
    read_only_fields=[connect.CfnTaskTemplate.ReadOnlyFieldInfoProperty(
        id=connect.CfnTaskTemplate.FieldIdentifierProperty(
            name="name"
        )
    )],
    required_fields=[connect.CfnTaskTemplate.RequiredFieldInfoProperty(
        id=connect.CfnTaskTemplate.FieldIdentifierProperty(
            name="name"
        )
    )]
)
```

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

ConstraintsProperty constraintsProperty = ConstraintsProperty.builder()
        .invisibleFields(List.of(InvisibleFieldInfoProperty.builder()
                .id(FieldIdentifierProperty.builder()
                        .name("name")
                        .build())
                .build()))
        .readOnlyFields(List.of(ReadOnlyFieldInfoProperty.builder()
                .id(FieldIdentifierProperty.builder()
                        .name("name")
                        .build())
                .build()))
        .requiredFields(List.of(RequiredFieldInfoProperty.builder()
                .id(FieldIdentifierProperty.builder()
                        .name("name")
                        .build())
                .build()))
        .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.Connect;

var constraintsProperty = new ConstraintsProperty {
    InvisibleFields = new [] { new InvisibleFieldInfoProperty {
        Id = new FieldIdentifierProperty {
            Name = "name"
        }
    } },
    ReadOnlyFields = new [] { new ReadOnlyFieldInfoProperty {
        Id = new FieldIdentifierProperty {
            Name = "name"
        }
    } },
    RequiredFields = new [] { new RequiredFieldInfoProperty {
        Id = new FieldIdentifierProperty {
            Name = "name"
        }
    } }
};
```

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"

constraintsProperty := &ConstraintsProperty{
	InvisibleFields: []interface{}{
		&InvisibleFieldInfoProperty{
			Id: &FieldIdentifierProperty{
				Name: jsii.String("name"),
			},
		},
	},
	ReadOnlyFields: []interface{}{
		&ReadOnlyFieldInfoProperty{
			Id: &FieldIdentifierProperty{
				Name: jsii.String("name"),
			},
		},
	},
	RequiredFields: []interface{}{
		&RequiredFieldInfoProperty{
			Id: &FieldIdentifierProperty{
				Name: jsii.String("name"),
			},
		},
	},
}
```

## Properties

- `invisibleFields`: [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) | [CfnTaskTemplate.InvisibleFieldInfoProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnTaskTemplate.InvisibleFieldInfoProperty.html)[] — Lists the fields that are invisible to agents.

- `readOnlyFields`: [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) | [CfnTaskTemplate.ReadOnlyFieldInfoProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnTaskTemplate.ReadOnlyFieldInfoProperty.html)[] — Lists the fields that are read-only to agents, and cannot be edited.

- `requiredFields`: [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) | [CfnTaskTemplate.RequiredFieldInfoProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnTaskTemplate.RequiredFieldInfoProperty.html)[] — Lists the fields that are required to be filled by agents.
