{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-umbrella/json-schema/cisco-umbrella-tunnel-resource-object-with-state-schema.json",
  "title": "TunnelResourceObjectWithState",
  "description": "Get the information about the tunnel in the organization.\nTo include the tunnel state information in the response, set the `includeState` request query parameter to `true`.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-umbrella-organization-tunnel-api-openapi.yml#/components/schemas/TunnelResourceObjectWithState",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true,
      "description": "The tunnel resource ID. Use this ID as a reference for subsequent requests."
    },
    "uri": {
      "type": "string",
      "description": "Resource URI",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "The display name of the tunnel. The tunnel name is required, cannot exceed 50 characters in length,\nand cannot have any special characters other than spaces and hyphens."
    },
    "siteOriginId": {
      "type": "integer",
      "description": "Site Origin ID to associate with the tunnel"
    },
    "client": {
      "$ref": "#/$defs/TunnelClientMetadata"
    },
    "transport": {
      "type": "object",
      "properties": {
        "protocol": {
          "description": "The tunnel transport protocol. The default is IPSec.",
          "type": "string",
          "enum": [
            "IPSec"
          ],
          "readOnly": true
        }
      }
    },
    "serviceType": {
      "$ref": "#/$defs/serviceType"
    },
    "networkCIDRs": {
      "$ref": "#/$defs/networkCIDRs"
    },
    "meta": {
      "type": "object",
      "description": "The metadata for the tunnel object that relates to service internals.",
      "readOnly": true,
      "properties": {
        "state": {
          "title": "tunnelState",
          "description": "The tunnel state information.",
          "properties": {
            "tunnelId": {
              "type": "string",
              "readOnly": true,
              "description": "The tunnel ID."
            },
            "status": {
              "type": "string",
              "readOnly": true,
              "description": "The high-level tunnel status:\n* up - the tunnel is active\n* down - the tunnel is inactive\n* failed - the tunnel is in a failed state\n* unknown - the status is unknown and pending updated information\n",
              "enum": [
                "UP",
                "DOWN",
                "FAILED",
                "UNKNOWN"
              ]
            },
            "dc": {
              "type": "string",
              "readOnly": true,
              "description": "The domain name that is associate with the data center."
            },
            "dcName": {
              "type": "string",
              "readOnly": true,
              "description": "The name of the data center."
            },
            "dcDesc": {
              "type": "string",
              "readOnly": true,
              "description": "The city and country or region of the data center."
            },
            "ikeState": {
              "$ref": "#/$defs/ikeState"
            },
            "ipsecState": {
              "$ref": "#/$defs/ipsecState"
            },
            "peerId": {
              "type": "string",
              "readOnly": true,
              "description": "The remote peer IKE ID."
            },
            "peerIp": {
              "type": "string",
              "readOnly": true,
              "description": "The remote peer IP."
            },
            "localIp": {
              "type": "string",
              "readOnly": true,
              "description": "The public IP address, which is assigned to an endpoint device (ISR, Viptela)."
            },
            "peerPort": {
              "type": "string",
              "readOnly": true,
              "description": "The port number of the remote peer."
            },
            "ike": {
              "title": "tunnelIKEState",
              "description": "The tunnel IKE session state.",
              "properties": {
                "age": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The age of the established state in seconds."
                },
                "dhGroup": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The IKE Diffie-Hellman group."
                },
                "prfAlgo": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The IKE pseudo random function."
                },
                "encAlgo": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The IKE encryption algorithm."
                },
                "initiatorSpi": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The hex encoded initiator SPI or cookie."
                },
                "responderSpi": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The hex encoded responder SPI or cookie."
                }
              }
            },
            "ipsec": {
              "title": "tunnelIPSecState",
              "description": "The tunnel IPsec session state.",
              "properties": {
                "age": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The age of the installed state in seconds."
                },
                "integrityAlgo": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The ESP or AH integrity algorithm name."
                },
                "encAlgo": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The ESP encryption algorithm name."
                },
                "encKeySize": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The ESP encryption key size (optional field; not available with NULL encryption."
                },
                "spiIn": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The hex encoded inbound SPI."
                },
                "spiOut": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The hex encoded outbound SPI."
                },
                "peerSelectors": {
                  "type": "array",
                  "readOnly": true,
                  "description": "The peer traffic selectors.",
                  "items": {
                    "type": "string",
                    "description": "The selector expression."
                  }
                }
              }
            },
            "data": {
              "title": "tunnelDataState",
              "description": "The state of the tunnel's data plane.",
              "properties": {
                "packetsIn": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The number of processed input packets (tunnel ingress)."
                },
                "bytesIn": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The number of processed input bytes (tunnel ingress)."
                },
                "idleTimeIn": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The idle time (seconds since last inbound packet)."
                },
                "packetsOut": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The number of processed output packets (tunnel egress)."
                },
                "bytesOut": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The number of processed output bytes (tunnel egress)."
                },
                "idleTimeOut": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The idle time (seconds since last outbound packet)."
                },
                "initialized": {
                  "type": "string",
                  "readOnly": true,
                  "description": "The time when packet and byte counters were initialized to 0."
                }
              }
            },
            "modifiedAt": {
              "type": "string",
              "readOnly": true,
              "format": "date-time",
              "description": "The date and time (UTC time with milliseconds) when the tunnel's state was last updated."
            }
          }
        }
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and n time (UTC time with milliseconds) when the tunnel was created.",
      "readOnly": true
    },
    "modifiedAt": {
      "$ref": "#/$defs/modifiedAt"
    }
  },
  "$defs": {
    "TunnelClientMetadata": {
      "type": "object",
      "description": "The tunnel client's configuration metadata.",
      "properties": {
        "deviceType": {
          "$ref": "#/$defs/deviceType"
        },
        "authentication": {
          "$ref": "#/$defs/authentication"
        }
      }
    },
    "authentication": {
      "type": "object",
      "description": "The authentication context of the client.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "PSK"
          ],
          "readOnly": true
        },
        "parameters": {
          "$ref": "#/$defs/parameters"
        }
      }
    },
    "deviceType": {
      "type": "string",
      "description": "The type of device where the tunnel originates. The default value is `other`.",
      "enum": [
        "ASA",
        "FTD",
        "ISR",
        "Meraki MX",
        "Viptela cEdge",
        "Viptela vEdge",
        "other"
      ]
    },
    "ikeState": {
      "type": "string",
      "readOnly": true,
      "description": "IKE SA State:\n  * CREATED\n  * CONNECTING\n  * ESTABLISHED\n  * PASSIVE\n  * REKEYING\n  * REKEYED\n  * DELETING\n  * DESTROYING\n",
      "enum": [
        "CREATED",
        "CONNECTING",
        "ESTABLISHED",
        "PASSIVE",
        "REKEYING",
        "REKEYED",
        "DELETING",
        "DESTROYING"
      ]
    },
    "ipsecState": {
      "type": "string",
      "readOnly": true,
      "description": "IPSec/Child SA State:\n  * CREATED\n  * ROUTED\n  * INSTALLING\n  * INSTALLED\n  * UPDATING\n  * REKEYING\n  * REKEYED\n  * RETRYING\n  * DELETING\n  * DELETED\n  * DESTROYING\n",
      "enum": [
        "CREATED",
        "ROUTED",
        "INSTALLING",
        "INSTALLED",
        "UPDATING",
        "REKEYING",
        "REKEYED",
        "RETRYING",
        "DELETING",
        "DELETED",
        "DESTROYING"
      ]
    },
    "modifiedAt": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "The data and time (timestamp) when the tunnel was updated."
    },
    "networkCIDRs": {
      "type": "array",
      "description": "Enter IPv4 ranges and CIDR addresses.\nIf `serviceType` is SIG, add all public and private address ranges used internally\nby your organization. Overrides Umbrella's default behavior,\nwhich allows traffic that is destined for RFC-1918 addresses to return through the tunnel.\nIf `serviceType` is Private Access, this field is required.\nThe 0.0.0.0/0 address range is not allowed.",
      "items": {
        "type": "string",
        "description": "An IPv4 CIDR range."
      }
    },
    "parameters": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The PSK ID. If an IP address is used as the ID, the IP address is the value of this field.",
          "readOnly": true
        },
        "modifiedAt": {
          "$ref": "#/$defs/modifiedAt"
        }
      }
    },
    "serviceType": {
      "type": "string",
      "description": "The type of service to associate with the tunnel. The default value is `SIG`.",
      "enum": [
        "SIG",
        "Private Access"
      ]
    }
  }
}