Skip to content
v2.278.0

ContainerMonitoringConfigurationProperty Struct ​

Contains the monitoring configuration for a single cluster in a container association.

Specifies the cluster ARN and optional attribute filters to narrow which containers are tracked.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const containerMonitoringConfigurationProperty: networkfirewall.CfnContainerAssociation.ContainerMonitoringConfigurationProperty = {
  clusterArn: 'clusterArn',

  // the properties below are optional
  attributeFilters: [{
    key: 'key',
    value: 'value',
  }],
};
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_networkfirewall as networkfirewall

container_monitoring_configuration_property = networkfirewall.CfnContainerAssociation.ContainerMonitoringConfigurationProperty(
    cluster_arn="clusterArn",

    # the properties below are optional
    attribute_filters=[networkfirewall.CfnContainerAssociation.ContainerAttributeProperty(
        key="key",
        value="value"
    )]
)
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.networkfirewall.*;

ContainerMonitoringConfigurationProperty containerMonitoringConfigurationProperty = ContainerMonitoringConfigurationProperty.builder()
        .clusterArn("clusterArn")

        // the properties below are optional
        .attributeFilters(List.of(ContainerAttributeProperty.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
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.NetworkFirewall;

var containerMonitoringConfigurationProperty = new ContainerMonitoringConfigurationProperty {
    ClusterArn = "clusterArn",

    // the properties below are optional
    AttributeFilters = new [] { new ContainerAttributeProperty {
        Key = "key",
        Value = "value"
    } }
};
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"

containerMonitoringConfigurationProperty := &ContainerMonitoringConfigurationProperty{
	ClusterArn: jsii.String("clusterArn"),

	// the properties below are optional
	AttributeFilters: []interface{}{
		&ContainerAttributeProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

attributeFiltersoptionalIResolvable | IResolvable | CfnContainerAssociation.ContainerAttributeProperty[]attribute_filtersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ContainerAttributeProperty]]]attributeFiltersoptionalIResolvableAttributeFiltersoptionalIResolvableAttributeFiltersoptionalinterface{} #
Key-value pairs that filter which containers are tracked.

For Amazon EKS, you can filter by namespace and Kubernetes labels. For Amazon ECS, you can filter by container instance attributes (EC2 launch type only).

clusterArnstringcluster_arnstrclusterArnStringClusterArnstringClusterArn*string required #
The ARN of the Amazon ECS or Amazon EKS cluster to monitor.

The cluster must be in the same Region and account as the container association.