Class CfnContainerAssociation

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.networkfirewall.CfnContainerAssociation
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IContainerAssociationRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:56.347Z") @Stability(Stable) public class CfnContainerAssociation extends CfnResource implements IInspectable, IContainerAssociationRef, ITaggableV2
Resource type definition for AWS::NetworkFirewall::ContainerAssociation.

A container association monitors container lifecycle events in your Amazon ECS or Amazon EKS clusters and resolves running container addresses for use in Network Firewall rules.

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.networkfirewall.*;
 CfnContainerAssociation cfnContainerAssociation = CfnContainerAssociation.Builder.create(this, "MyCfnContainerAssociation")
         .containerAssociationName("containerAssociationName")
         .containerMonitoringConfigurations(List.of(ContainerMonitoringConfigurationProperty.builder()
                 .clusterArn("clusterArn")
                 // the properties below are optional
                 .attributeFilters(List.of(ContainerAttributeProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .build()))
         .type("type")
         // the properties below are optional
         .description("description")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnContainerAssociation

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

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

      @Stability(Stable) public CfnContainerAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerAssociationProps props)
      Create a new AWS::NetworkFirewall::ContainerAssociation.

      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

    • arnForContainerAssociation

      @Stability(Stable) @NotNull public static String arnForContainerAssociation(@NotNull IContainerAssociationRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnContainerAssociation

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

      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.
    • getAttrContainerAssociationArn

      @Stability(Stable) @NotNull public String getAttrContainerAssociationArn()
      The Amazon Resource Name (ARN) of the container association.
    • getAttrResolvedCidrCount

      @Stability(Stable) @NotNull public Number getAttrResolvedCidrCount()
      The number of CIDR blocks resolved from the monitored containers.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The current status of the container association.
    • 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
    • getContainerAssociationRef

      @Stability(Stable) @NotNull public ContainerAssociationReference getContainerAssociationRef()
      A reference to a ContainerAssociation resource.
      Specified by:
      getContainerAssociationRef in interface IContainerAssociationRef
    • getContainerAssociationName

      @Stability(Stable) @NotNull public String getContainerAssociationName()
      The descriptive name of the container association.
    • setContainerAssociationName

      @Stability(Stable) public void setContainerAssociationName(@NotNull String value)
      The descriptive name of the container association.
    • getContainerMonitoringConfigurations

      @Stability(Stable) @NotNull public Object getContainerMonitoringConfigurations()
      The monitoring configurations for the container association.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnContainerAssociation.ContainerMonitoringConfigurationProperty>

    • setContainerMonitoringConfigurations

      @Stability(Stable) public void setContainerMonitoringConfigurations(@NotNull IResolvable value)
      The monitoring configurations for the container association.
    • setContainerMonitoringConfigurations

      @Stability(Stable) public void setContainerMonitoringConfigurations(@NotNull List<Object> value)
      The monitoring configurations for the container association.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of containers to monitor.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of containers to monitor.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the container association.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the container association.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.