java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.networksecuritymanager.CfnTemplate
All Implemented Interfaces:
IInspectable, IEnvironmentAware, ITemplateRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-10-08T16:59:59.242Z") @Stability(Stable) public class CfnTemplate extends CfnResource implements IInspectable, ITemplateRef, ITaggableV2
Resource Type definition for AWS::NetworkSecurityManager::Template.

Creates and manages a Network Security Manager template.

Example:

 // 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.*;
 CfnTemplate cfnTemplate = CfnTemplate.Builder.create(this, "MyCfnTemplate")
         .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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTemplate

      protected CfnTemplate(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTemplate

      protected CfnTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTemplate

      @Stability(Stable) public CfnTemplate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTemplateProps props)
      Create a new AWS::NetworkSecurityManager::Template.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForTemplate

      @Stability(Stable) @NotNull public static String arnForTemplate(@NotNull ITemplateRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnTemplate

      @Stability(Stable) @NotNull public static Boolean isCfnTemplate(@NotNull Object x)
      Checks whether the given object is a CfnTemplate.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the template.
    • getAttrTemplateArn

      @Stability(Stable) @NotNull public String getAttrTemplateArn()
      The ARN of the template.
    • getAttrTemplateId

      @Stability(Stable) @NotNull public String getAttrTemplateId()
      The unique identifier of the template.
    • getAttrVersion

      @Stability(Stable) @NotNull public String getAttrVersion()
      The version number.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getTemplateRef

      @Stability(Stable) @NotNull public TemplateReference getTemplateRef()
      A reference to a Template resource.
      Specified by:
      getTemplateRef in interface ITemplateRef
    • getTemplateName

      @Stability(Stable) @NotNull public String getTemplateName()
      The name of the template.
    • setTemplateName

      @Stability(Stable) public void setTemplateName(@NotNull String value)
      The name of the template.
    • getAssociatedRuleList

      @Stability(Stable) @Nullable public Object getAssociatedRuleList()
      List of rules associated with this template.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnTemplate.AssociatedRuleProperty>

    • setAssociatedRuleList

      @Stability(Stable) public void setAssociatedRuleList(@Nullable IResolvable value)
      List of rules associated with this template.
    • setAssociatedRuleList

      @Stability(Stable) public void setAssociatedRuleList(@Nullable List<Object> value)
      List of rules associated with this template.
    • getFirewallType

      @Stability(Stable) @Nullable public String getFirewallType()
      The type of firewall.
    • setFirewallType

      @Stability(Stable) public void setFirewallType(@Nullable String value)
      The type of firewall.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags associated with the template.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags associated with the template.
    • getTemplateDescription

      @Stability(Stable) @Nullable public String getTemplateDescription()
      A description of the template.
    • setTemplateDescription

      @Stability(Stable) public void setTemplateDescription(@Nullable String value)
      A description of the template.