{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-network-firewall/json-schema/amazon-network-firewall-create-container-association-request-schema.json",
  "title": "CreateContainerAssociationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-network-firewall-container-association-api-openapi.yml#/components/schemas/CreateContainerAssociationRequest",
  "type": "object",
  "properties": {
    "ContainerAssociationName": {
      "type": "string",
      "description": "The descriptive name of the container association. You can't change the name of a container association after you create it."
    },
    "Description": {
      "type": "string",
      "description": "A description of the container association."
    },
    "Type": {
      "type": "string",
      "enum": [
        "ECS",
        "EKS"
      ],
      "description": "The type of containers to monitor. You can't change the container type after creation. Valid values: ECS - Amazon Elastic Container Service EKS - Amazon Elastic Kubernetes Service"
    },
    "ContainerMonitoringConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContainerMonitoringConfiguration"
      },
      "description": "The monitoring configurations for the container association. Each configuration specifies an Amazon ECS or Amazon EKS cluster to monitor and optional attribute filters to narrow which containers are tracked."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The key:value pairs to associate with the resource."
    }
  },
  "required": [
    "ContainerAssociationName",
    "Type",
    "ContainerMonitoringConfigurations"
  ],
  "$defs": {
    "ContainerAttribute": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The attribute key to filter on. For Amazon EKS, specify namespace to filter by namespace, or specify a Kubernetes label key. For Amazon ECS, specify a container instance attribute name. Keys don't support wildcards. Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods (.), forward slashes (/), and colons (:)."
        },
        "Value": {
          "type": "string",
          "description": "The attribute value to match. You can specify an exact value, such as payments-api, or a wildcard pattern, such as payments-*. Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods (.), forward slashes (/), colons (:), asterisks (*), and backslashes (\\). Network Firewall evaluates the value using the following rules: An asterisk (*) matches zero or more characters. For example, payments-* matches payments-, payments-api, and payments-api-v2, and *-prod matches web-prod. The pattern must match the entire value. For example, payments-* doesn't match my-payments-api"
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "ContainerMonitoringConfiguration": {
      "type": "object",
      "properties": {
        "ClusterArn": {
          "type": "string",
          "description": "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."
        },
        "AttributeFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContainerAttribute"
          },
          "description": "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). Attribute values can contain wildcard patterns, for example payments-*. Attribute keys must match exactly."
        }
      },
      "required": [
        "ClusterArn"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as \"customer.\" Tag keys are case-sensitive."
        },
        "Value": {
          "type": "string",
          "description": "The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as \"companyA\" or \"companyB.\" Tag values are case-sensitive."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}