# CfnTemplateProps

Properties for defining a `CfnTemplate`.

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

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 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_networksecuritymanager as networksecuritymanager } from 'aws-cdk-lib';
const cfnTemplateProps: networksecuritymanager.CfnTemplateProps = {
  templateName: 'templateName',

  // the properties below are optional
  associatedRuleList: [{
    ruleArn: 'ruleArn',
  }],
  firewallType: 'firewallType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  templateDescription: 'templateDescription',
};
```

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_networksecuritymanager as networksecuritymanager

cfn_template_props = networksecuritymanager.CfnTemplateProps(
    template_name="templateName",

    # the properties below are optional
    associated_rule_list=[networksecuritymanager.CfnTemplate.AssociatedRuleProperty(
        rule_arn="ruleArn"
    )],
    firewall_type="firewallType",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    template_description="templateDescription"
)
```

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

CfnTemplateProps cfnTemplateProps = CfnTemplateProps.builder()
        .templateName("templateName")

        // the properties below are optional
        .associatedRuleList(List.of(AssociatedRuleProperty.builder()
                .ruleArn("ruleArn")
                .build()))
        .firewallType("firewallType")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .templateDescription("templateDescription")
        .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.NetworkSecurityManager;

var cfnTemplateProps = new CfnTemplateProps {
    TemplateName = "templateName",

    // the properties below are optional
    AssociatedRuleList = new [] { new AssociatedRuleProperty {
        RuleArn = "ruleArn"
    } },
    FirewallType = "firewallType",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TemplateDescription = "templateDescription"
};
```

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"

cfnTemplateProps := &CfnTemplateProps{
	TemplateName: jsii.String("templateName"),

	// the properties below are optional
	AssociatedRuleList: []interface{}{
		&AssociatedRuleProperty{
			RuleArn: jsii.String("ruleArn"),
		},
	},
	FirewallType: jsii.String("firewallType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TemplateDescription: jsii.String("templateDescription"),
}
```

## Properties

- `associatedRuleList`: [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) | [CfnTemplate.AssociatedRuleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_networksecuritymanager.CfnTemplate.AssociatedRuleProperty.html)[] — List of rules associated with this template.

- `firewallType`: string — The type of firewall.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags associated with the template.

- `templateDescription`: string — A description of the template.

- `templateName`: string (required) — The name of the template.
