---
title: "Update a Network security rule"
method: PUT
path: "/network_security_rules/{uuid}"
tags: ["network_security_rules"]
---

# Update a Network security rule

`PUT /network_security_rules/{uuid}`

This operation submits a request to update a Network security rule based on the input parameters.

## Path parameters

- `uuid` string, UUID, required

## Request body

- NetworkSecurityRuleIntentInput — An intentful representation of a network_security_rule
  - `spec` NetworkSecurityRule, required — Network security rule
    - `name` string, required
    - `resources` NetworkSecurityRuleResources, required — Network security rule resources
      - `app_rule` object — These rules govern what flows are allowed. Target group is a required attribute. Empty inbound_allow_list will not anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of deployment of the rule.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `quarantine_rule` object — These rules are used for quarantining suspected VMs. Target group is a required attribute. Empty inbound_allow_list will not allow anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of action.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `isolation_rule` object — These rules are used for environmental isolation.
        - `action` string — Type of action.
        - `first_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
        - `second_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
    - `description` string
  - `api_version` string
  - `metadata` NetworkSecurityRuleMetadata, required — The network_security_rule kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when network_security_rule was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — network_security_rule uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when network_security_rule was created
    - `spec_hash` string — Hash of the spec. This will be returned from server.
    - `should_force_translate` boolean — Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.
    - `owner_reference` UserReference — The reference to a user
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `categories` object — Categories for the network_security_rule
    - `name` string — network_security_rule name

## Response `202`

Request Accepted

- NetworkSecurityRuleIntentResponse — Response object for intentful operations on a network_security_rule
  - `status` NetworkSecurityRuleDefStatus — Network security rule status
    - `state` string
    - `message_list` MessageResource[]
      - `message` string, required — If state is ERROR, a message describing the error.
      - `reason` string, required — If state is ERROR, a machine-readable snake-cased string.
      - `details` object — Custom key-value details relevant to the status.
    - `name` string
    - `resources` NetworkSecurityRuleResources — Network security rule resources
      - `app_rule` object — These rules govern what flows are allowed. Target group is a required attribute. Empty inbound_allow_list will not anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of deployment of the rule.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `quarantine_rule` object — These rules are used for quarantining suspected VMs. Target group is a required attribute. Empty inbound_allow_list will not allow anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of action.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `isolation_rule` object — These rules are used for environmental isolation.
        - `action` string — Type of action.
        - `first_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
        - `second_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
    - `description` string
  - `spec` NetworkSecurityRule — Network security rule
    - `name` string, required
    - `resources` NetworkSecurityRuleResources, required — Network security rule resources
      - `app_rule` object — These rules govern what flows are allowed. Target group is a required attribute. Empty inbound_allow_list will not anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of deployment of the rule.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `quarantine_rule` object — These rules are used for quarantining suspected VMs. Target group is a required attribute. Empty inbound_allow_list will not allow anything into target group. Empty outbound_allow_list will allow everything from target group.
        - `action` string — Type of action.
        - `outbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
        - `target_group` TargetGroup — Target group
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `default_internal_policy` string — Default policy for communication within target group.
          - `peer_specification_type` string — Way to identify the object for which rule is applied.
        - `inbound_allow_list` NetworkRule[]
          - `protocol` string — Select a protocol to allow. Multiple protocols can be allowed by repeating network_rule object. If a protocol is not configured in the network_rule object then it is allowed.
          - `ip_subnet` IpSubnet — IP subnet provided as an address and prefix length.
            - `ip` string — IPV4 address.
            - `prefix_length` integer
          - `tcp_port_range_list` PortRange[] — List of TCP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `udp_port_range_list` PortRange[] — List of UDP ports that are allowed by this rule.
            - `end_port` integer
            - `start_port` integer
          - `peer_specification_type` string — The set of categories that matching VMs need to have.
          - `filter` CategoryFilter — A category filter.
            - `type` string — The type of the filter being used.
            - `kind_list` string[] — List of kinds associated with this filter.
            - `params` object, required — A list of category key and list of values.
          - `icmp_type_code_list` object[] — List of ICMP types and codes allowed by this rule.
            - `code` integer
            - `type` integer
          - `network_function_chain_reference` NetworkFunctionChainReference — The reference to a network_function_chain
            - `kind` string, required — The kind name
            - `name` string
            - `uuid` string, UUID, required
          - `expiration_time` string — Timestamp of expiration time.
      - `isolation_rule` object — These rules are used for environmental isolation.
        - `action` string — Type of action.
        - `first_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
        - `second_entity_filter` CategoryFilter — A category filter.
          - `type` string — The type of the filter being used.
          - `kind_list` string[] — List of kinds associated with this filter.
          - `params` object, required — A list of category key and list of values.
    - `description` string
  - `api_version` string, required
  - `metadata` NetworkSecurityRuleMetadata, required — The network_security_rule kind metadata
    - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when network_security_rule was last updated
    - `kind` string, required — The kind name
    - `uuid` string, UUID — network_security_rule uuid
    - `spec_version` integer — Version number of the latest spec.
    - `creation_time` string, date-time — UTC date and time in RFC-3339 format when network_security_rule was created
    - `spec_hash` string — Hash of the spec. This will be returned from server.
    - `should_force_translate` boolean — Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.
    - `owner_reference` UserReference — The reference to a user
      - `kind` string, required — The kind name
      - `name` string
      - `uuid` string, UUID, required
    - `categories` object — Categories for the network_security_rule
    - `name` string — network_security_rule name

## Other responses

- `default` — Internal Error

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/revisions/40395083ab31/schema)
