{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-network-firewall/json-schema/amazon-network-firewall-update-firewall-policy-request-schema.json",
  "title": "UpdateFirewallPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-network-firewall-aws-network-firewall-api-openapi.yml#/components/schemas/UpdateFirewallPolicyRequest",
  "type": "object",
  "properties": {
    "UpdateToken": {
      "type": "string",
      "description": "A token used for optimistic locking. Network Firewall returns a token to your requests that access the firewall policy. The token marks the state of the policy resource at the time of the request. To make changes to the policy, you provide the token in your request. Network Firewall uses the token to ensure that the policy hasn't changed since you last retrieved it. If it has changed, the operation fails with an InvalidTokenException. If this happens, retrieve the firewall policy again to get a current copy of it with current token. Reapply your changes as needed, then try the operation again "
    },
    "FirewallPolicyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the firewall policy. You must specify the ARN or the name, and you can specify both."
    },
    "FirewallPolicyName": {
      "type": "string",
      "description": "The descriptive name of the firewall policy. You can't change the name of a firewall policy after you create it. You must specify the ARN or the name, and you can specify both."
    },
    "FirewallPolicy": {
      "$ref": "#/$defs/FirewallPolicy"
    },
    "Description": {
      "type": "string",
      "description": "A description of the firewall policy."
    },
    "DryRun": {
      "type": "boolean",
      "description": "Indicates whether you want Network Firewall to just check the validity of the request, rather than run the request. If set to TRUE, Network Firewall checks whether the request can run successfully, but doesn't actually make the requested changes. The call returns the value that the request would return if you ran it with dry run set to FALSE, but doesn't make additions or changes to your resources. This option allows you to make sure that you have the required permissions to run the request and that your request parameters are valid. If set to FALSE, Network Firewall makes the requested change"
    },
    "EncryptionConfiguration": {
      "$ref": "#/$defs/EncryptionConfiguration"
    }
  },
  "required": [
    "UpdateToken",
    "FirewallPolicy"
  ],
  "$defs": {
    "ActionDefinition": {
      "type": "object",
      "properties": {
        "PublishMetricAction": {
          "$ref": "#/$defs/PublishMetricAction"
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "AddressDefinition": {
          "type": "string",
          "description": "Specify an IP address or a block of IP addresses in Classless Inter-Domain Routing (CIDR) notation. Network Firewall supports all address ranges for IPv4 and IPv6. Examples: To configure Network Firewall to inspect for the IP address 192.0.2.44, specify 192.0.2.44/32. To configure Network Firewall to inspect for IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24. To configure Network Firewall to inspect for the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128. To configure Network Firewall to inspect for IP addresses from 111"
        }
      },
      "required": [
        "AddressDefinition"
      ]
    },
    "CustomAction": {
      "type": "object",
      "properties": {
        "ActionName": {
          "type": "string",
          "description": "The descriptive name of the custom action. You can't change the name of a custom action after you create it."
        },
        "ActionDefinition": {
          "$ref": "#/$defs/ActionDefinition"
        }
      },
      "required": [
        "ActionName",
        "ActionDefinition"
      ]
    },
    "Dimension": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The value to use in the custom metric dimension."
        }
      },
      "required": [
        "Value"
      ]
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "KeyId": {
          "type": "string",
          "description": "The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you're using a key that's managed by another account. If you're using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide."
        },
        "Type": {
          "type": "string",
          "enum": [
            "CUSTOMER_KMS",
            "AWS_OWNED_KMS_KEY"
          ],
          "description": "The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources."
        }
      },
      "required": [
        "Type"
      ]
    },
    "FirewallPolicy": {
      "type": "object",
      "properties": {
        "StatelessRuleGroupReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatelessRuleGroupReference"
          },
          "description": "References to the stateless rule groups that are used in the policy. These define the matching criteria in stateless rules."
        },
        "StatelessDefaultActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The actions to take on a packet if it doesn't match any of the stateless rules in the policy. If you want non-matching packets to be forwarded for stateful inspection, specify aws:forward_to_sfe. You must specify one of the standard actions: aws:pass, aws:drop, or aws:forward_to_sfe. In addition, you can specify custom actions that are compatible with your standard section choice. For example, you could specify [\"aws:pass\"] or you could specify [\"aws:pass\", “customActionName”]. For information about compatibility, see the custom action descriptions under CustomAction."
        },
        "StatelessFragmentDefaultActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The actions to take on a fragmented UDP packet if it doesn't match any of the stateless rules in the policy. Network Firewall only manages UDP packet fragments and silently drops packet fragments for other protocols. If you want non-matching fragmented UDP packets to be forwarded for stateful inspection, specify aws:forward_to_sfe. You must specify one of the standard actions: aws:pass, aws:drop, or aws:forward_to_sfe. In addition, you can specify custom actions that are compatible with your standard section choice. For example, you could specify [\"aws:pass\"] or you could specify [\"aws:pass\", "
        },
        "StatelessCustomActions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomAction"
          },
          "description": "The custom action definitions that are available for use in the firewall policy's StatelessDefaultActions setting. You name each custom action that you define, and then you can use it by name in your default actions specifications."
        },
        "StatefulRuleGroupReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StatefulRuleGroupReference"
          },
          "description": "References to the stateful rule groups that are used in the policy. These define the inspection criteria in stateful rules."
        },
        "StatefulDefaultActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The default actions to take on a packet that doesn't match any stateful rules. The stateful default action is optional, and is only valid when using the strict rule order. Valid values of the stateful default action: aws:drop_strict aws:drop_established aws:alert_strict aws:alert_established aws:drop_established_app_layer aws:alert_established_app_layer aws:drop_established_app_layer_to_server aws:alert_established_app_layer_to_server For more information, see Strict evaluation order in the Network Firewall Developer Guide."
        },
        "StatefulEngineOptions": {
          "$ref": "#/$defs/StatefulEngineOptions"
        },
        "TLSInspectionConfigurationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the TLS inspection configuration."
        },
        "PolicyVariables": {
          "$ref": "#/$defs/PolicyVariables"
        },
        "EnableTLSSessionHolding": {
          "type": "boolean",
          "description": "When true, prevents TCP and TLS packets from reaching destination servers until TLS Inspection has evaluated Server Name Indication (SNI) rules. Requires an associated TLS Inspection configuration."
        },
        "Route53ResolvedIPValidation": {
          "$ref": "#/$defs/Route53ResolvedIPValidation"
        }
      },
      "required": [
        "StatelessDefaultActions",
        "StatelessFragmentDefaultActions"
      ]
    },
    "FlowTimeouts": {
      "type": "object",
      "properties": {
        "TcpIdleTimeoutSeconds": {
          "type": "integer",
          "description": "The number of seconds that can pass without any TCP traffic sent through the firewall before the firewall determines that the connection is idle. After the idle timeout passes, data packets are dropped, however, the next TCP SYN packet is considered a new flow and is processed by the firewall. Clients or targets can use TCP keepalive packets to reset the idle timeout. You can define the TcpIdleTimeoutSeconds value to be between 60 and 6000 seconds. If no value is provided, it defaults to 350 seconds."
        }
      }
    },
    "IPSet": {
      "type": "object",
      "properties": {
        "Definition": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of IP addresses and address ranges, in CIDR notation."
        }
      },
      "required": [
        "Definition"
      ]
    },
    "PolicyVariables": {
      "type": "object",
      "properties": {
        "RuleVariables": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/IPSet"
          },
          "description": "The IPv4 or IPv6 addresses in CIDR notation to use for the Suricata HOME_NET variable. If your firewall uses an inspection VPC, you might want to override the HOME_NET variable with the CIDRs of your home networks. If you don't override HOME_NET with your own CIDRs, Network Firewall by default uses the CIDR of your inspection VPC."
        }
      }
    },
    "PublishMetricAction": {
      "type": "object",
      "properties": {
        "Dimensions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Dimension"
          }
        }
      },
      "required": [
        "Dimensions"
      ]
    },
    "Route53ResolvedIPValidation": {
      "type": "object",
      "properties": {
        "Action": {
          "type": "string",
          "enum": [
            "REJECT",
            "DROP",
            "ALERT"
          ],
          "description": "The action that Network Firewall takes for a connection whose destination IP address fails resolved IP validation. A destination IP address fails validation when the Route 53 Resolver didn't return it in a DNS response in an associated VPC. Valid values are the following: ALERT – Tags the matching connection in the firewall's flow logs without blocking it, when you enable logging. Use this to observe the effect of resolved IP validation before you enforce it. DROP – Silently blocks the connection without sending any response to the client. REJECT – Blocks the connection and sends a TCP reset ("
        },
        "DNSFirewallRuleGroupId": {
          "type": "string",
          "description": "The ID of the Route 53 Resolver DNS Firewall rule group that determines which VPCs' DNS resolutions count for resolved IP validation. A destination IP address counts as resolved for a domain only when the Route 53 Resolver returned it in a DNS response within a VPC that's associated with this rule group. Associate the rule group with the VPCs that send traffic to the firewall. The ID must match the pattern ^rslvr-frg-[0-9a-f]+$. It must also exist and be accessible from your account. Network Firewall validates this when you create or update the policy. Changing this value swaps the managed rul"
        },
        "DNSExpiryExceptionPolicy": {
          "type": "string",
          "enum": [
            "REJECT",
            "DROP",
            "CONTINUE"
          ],
          "description": "The action that Network Firewall takes when the DNS resolution recorded for a destination IP address has expired from the resolved IP cache. This applies when Network Firewall still sees traffic to that IP address after the expiry. Network Firewall keeps a resolution for longer than the DNS record's time to live (TTL). Valid values are the following: CONTINUE – Treats the expired resolution as still valid and doesn't block the connection because of expiry. DROP – Silently blocks traffic to the IP address after its resolution has expired, without sending any response to the client. REJECT – Blo"
        },
        "BypassDestinationValidationIPRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Address"
          },
          "description": "The destination IP address ranges that are exempt from the policy-level resolved IP check. Network Firewall doesn't apply the Action in this configuration to a connection whose destination falls in these ranges, even if the Route 53 Resolver didn't return that IP address in an associated VPC. Specify each entry as an IPv4 or IPv6 address or CIDR range, up to 100 entries. This exemption applies only to the policy-level check. Stateful rules that use the AWS_ROUTE_53_RESOLVED_DOMAIN target type or the aws_route_53_resolved_domain keyword still evaluate connections to these destinations and match"
        },
        "SourceIPRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Address"
          },
          "description": "The client source IP address ranges whose connections are subject to resolved IP validation. Specify each entry as an IPv4 or IPv6 address or CIDR range, up to 100 entries. If you omit this field, resolved IP validation applies to the CIDR ranges of the firewall's VPC and of any additional VPCs attached to the firewall. Specifying an empty list is not the same as omitting the field: an empty list means that Network Firewall doesn't validate any source addresses. This scope applies to the policy-level check only. Stateful rules that use the AWS_ROUTE_53_RESOLVED_DOMAIN target type or the aws_ro"
        }
      },
      "required": [
        "Action",
        "DNSFirewallRuleGroupId",
        "DNSExpiryExceptionPolicy"
      ]
    },
    "StatefulEngineOptions": {
      "type": "object",
      "properties": {
        "RuleOrder": {
          "type": "string",
          "enum": [
            "DEFAULT_ACTION_ORDER",
            "STRICT_ORDER"
          ],
          "description": "Indicates how to manage the order of stateful rule evaluation for the policy. STRICT_ORDER is the recommended option, but DEFAULT_ACTION_ORDER is the default option. With STRICT_ORDER, provide your rules in the order that you want them to be evaluated. You can then choose one or more default actions for packets that don't match any rules. Choose STRICT_ORDER to have the stateful rules engine determine the evaluation order of your rules. The default action for this rule order is PASS, followed by DROP, REJECT, and ALERT actions. Stateful rules are provided to the rule engine as Suricata compati"
        },
        "StreamExceptionPolicy": {
          "type": "string",
          "enum": [
            "DROP",
            "CONTINUE",
            "REJECT"
          ],
          "description": "Configures how Network Firewall processes traffic when a network connection breaks midstream. Network connections can break due to disruptions in external networks or within the firewall itself. DROP - Network Firewall fails closed and drops all subsequent traffic going to the firewall. This is the default behavior. CONTINUE - Network Firewall continues to apply rules to the subsequent traffic without context from traffic before the break. This impacts the behavior of rules that depend on this context. For example, if you have a stateful rule to drop http traffic, Network Firewall won't match "
        },
        "FlowTimeouts": {
          "$ref": "#/$defs/FlowTimeouts"
        }
      }
    },
    "StatefulRuleGroupOverride": {
      "type": "object",
      "properties": {
        "Action": {
          "type": "string",
          "enum": [
            "DROP_TO_ALERT"
          ],
          "description": "The action that changes the rule group from DROP to ALERT. This only applies to managed rule groups."
        }
      }
    },
    "StatefulRuleGroupReference": {
      "type": "object",
      "properties": {
        "ResourceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the stateful rule group."
        },
        "Priority": {
          "type": "integer",
          "description": "An integer setting that indicates the order in which to run the stateful rule groups in a single FirewallPolicy. This setting only applies to firewall policies that specify the STRICT_ORDER rule order in the stateful engine options settings. Network Firewall evalutes each stateful rule group against a packet starting with the group that has the lowest priority setting. You must ensure that the priority settings are unique within each policy. You can change the priority settings of your rule groups at any time. To make it easier to insert rule groups later, number them so there's a wide range i"
        },
        "Override": {
          "$ref": "#/$defs/StatefulRuleGroupOverride"
        },
        "DeepThreatInspection": {
          "type": "boolean",
          "description": "Network Firewall plans to augment the active threat defense managed rule group with an additional deep threat inspection capability. When this capability is released, Amazon Web Services will analyze service logs of network traffic processed by these rule groups to identify threat indicators across customers. Amazon Web Services will use these threat indicators to improve the active threat defense managed rule groups and protect the security of Amazon Web Services customers and services. Customers can opt-out of deep threat inspection at any time through the Network Firewall console or API. Wh"
        }
      },
      "required": [
        "ResourceArn"
      ]
    },
    "StatelessRuleGroupReference": {
      "type": "object",
      "properties": {
        "ResourceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the stateless rule group."
        },
        "Priority": {
          "type": "integer",
          "description": "An integer setting that indicates the order in which to run the stateless rule groups in a single FirewallPolicy. Network Firewall applies each stateless rule group to a packet starting with the group that has the lowest priority setting. You must ensure that the priority settings are unique within each policy."
        }
      },
      "required": [
        "ResourceArn",
        "Priority"
      ]
    }
  }
}