{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cdn/json-schema/microsoft-azure-cdn-endpoint-update-parameters-schema.json",
  "title": "EndpointUpdateParameters",
  "description": "Properties required to create or update an endpoint.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-cdn-endpoints-api-openapi.yml#/components/schemas/EndpointUpdateParameters",
  "type": "object",
  "properties": {
    "tags": {
      "type": "object",
      "description": "Endpoint tags.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "properties": {
      "$ref": "#/$defs/EndpointPropertiesUpdateParameters",
      "description": "The JSON object containing endpoint update parameters.",
      "x-ms-client-flatten": true
    }
  },
  "$defs": {
    "DeliveryRule": {
      "type": "object",
      "description": "A rule that specifies a set of actions and conditions",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the rule"
        },
        "order": {
          "type": "integer",
          "format": "int32",
          "description": "The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied."
        },
        "conditions": {
          "type": "array",
          "description": "A list of conditions that must be matched for the actions to be executed",
          "items": {
            "$ref": "#/$defs/DeliveryRuleCondition"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "actions": {
          "type": "array",
          "description": "A list of actions that are executed when all the conditions of a rule are satisfied.",
          "items": {
            "$ref": "#/$defs/DeliveryRuleAction"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      },
      "required": [
        "order",
        "actions"
      ]
    },
    "DeliveryRuleAction": {
      "type": "object",
      "description": "An action for the delivery rule.",
      "properties": {
        "name": {
          "$ref": "#/$defs/DeliveryRuleActionName",
          "description": "The name of the action for the delivery rule."
        }
      },
      "required": [
        "name"
      ]
    },
    "DeliveryRuleActionName": {
      "type": "string",
      "description": "The name of the action for the delivery rule.",
      "enum": [
        "CacheExpiration",
        "CacheKeyQueryString",
        "ModifyRequestHeader",
        "ModifyResponseHeader",
        "UrlRedirect",
        "UrlRewrite",
        "UrlSigning",
        "OriginGroupOverride",
        "RouteConfigurationOverride",
        "EdgeAction",
        "AfdUrlSigning"
      ],
      "x-ms-enum": {
        "name": "DeliveryRuleActionName",
        "modelAsString": true,
        "values": [
          {
            "name": "CacheExpiration",
            "value": "CacheExpiration"
          },
          {
            "name": "CacheKeyQueryString",
            "value": "CacheKeyQueryString"
          },
          {
            "name": "ModifyRequestHeader",
            "value": "ModifyRequestHeader"
          },
          {
            "name": "ModifyResponseHeader",
            "value": "ModifyResponseHeader"
          },
          {
            "name": "UrlRedirect",
            "value": "UrlRedirect"
          },
          {
            "name": "UrlRewrite",
            "value": "UrlRewrite"
          },
          {
            "name": "UrlSigning",
            "value": "UrlSigning"
          },
          {
            "name": "OriginGroupOverride",
            "value": "OriginGroupOverride"
          },
          {
            "name": "RouteConfigurationOverride",
            "value": "RouteConfigurationOverride"
          },
          {
            "name": "EdgeAction",
            "value": "EdgeAction"
          },
          {
            "name": "AfdUrlSigning",
            "value": "AfdUrlSigning"
          }
        ]
      }
    },
    "DeliveryRuleCondition": {
      "type": "object",
      "description": "A condition for the delivery rule.",
      "properties": {
        "name": {
          "$ref": "#/$defs/MatchVariable",
          "description": "The name of the condition for the delivery rule."
        }
      },
      "required": [
        "name"
      ]
    },
    "EndpointPropertiesUpdateParameters": {
      "type": "object",
      "description": "The JSON object containing endpoint update parameters.",
      "properties": {
        "originPath": {
          "type": "string",
          "description": "A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath."
        },
        "contentTypesToCompress": {
          "type": "array",
          "description": "List of content types on which compression applies. The value should be a valid MIME type.",
          "items": {
            "type": "string"
          }
        },
        "originHostHeader": {
          "type": "string",
          "description": "The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default."
        },
        "isCompressionEnabled": {
          "type": "boolean",
          "description": "Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB."
        },
        "isHttpAllowed": {
          "type": "boolean",
          "description": "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.",
          "default": true
        },
        "isHttpsAllowed": {
          "type": "boolean",
          "description": "Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.",
          "default": true
        },
        "queryStringCachingBehavior": {
          "type": "string",
          "description": "Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.",
          "default": "NotSet",
          "enum": [
            "IgnoreQueryString",
            "BypassCaching",
            "UseQueryString",
            "NotSet"
          ],
          "x-ms-enum": {
            "name": "QueryStringCachingBehavior",
            "modelAsString": false
          }
        },
        "optimizationType": {
          "$ref": "#/$defs/OptimizationType",
          "description": "Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization."
        },
        "probePath": {
          "type": "string",
          "description": "Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin."
        },
        "geoFilters": {
          "type": "array",
          "description": "List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/",
          "items": {
            "$ref": "#/$defs/GeoFilter"
          },
          "x-ms-identifiers": []
        },
        "defaultOriginGroup": {
          "$ref": "#/$defs/ResourceReference",
          "description": "A reference to the origin group."
        },
        "urlSigningKeys": {
          "type": "array",
          "description": "List of keys used to validate the signed URL hashes.",
          "items": {
            "$ref": "#/$defs/UrlSigningKey"
          },
          "x-ms-identifiers": [
            "keyId"
          ]
        },
        "deliveryPolicy": {
          "$ref": "#/$defs/EndpointPropertiesUpdateParametersDeliveryPolicy",
          "description": "A policy that specifies the delivery rules to be used for an endpoint."
        },
        "webApplicationFirewallPolicyLink": {
          "$ref": "#/$defs/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink",
          "description": "Defines the Web Application Firewall policy for the endpoint (if applicable)"
        }
      }
    },
    "EndpointPropertiesUpdateParametersDeliveryPolicy": {
      "type": "object",
      "description": "A policy that specifies the delivery rules to be used for an endpoint.",
      "properties": {
        "description": {
          "type": "string",
          "description": "User-friendly description of the policy."
        },
        "rules": {
          "type": "array",
          "description": "A list of the delivery rules.",
          "items": {
            "$ref": "#/$defs/DeliveryRule"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      },
      "required": [
        "rules"
      ]
    },
    "EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink": {
      "type": "object",
      "description": "Defines the Web Application Firewall policy for the endpoint (if applicable)",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "GeoFilter": {
      "type": "object",
      "description": "Rules defining user's geo access within a CDN endpoint.",
      "properties": {
        "relativePath": {
          "type": "string",
          "description": "Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)"
        },
        "action": {
          "$ref": "#/$defs/GeoFilterActions",
          "description": "Action of the geo filter, i.e. allow or block access."
        },
        "countryCodes": {
          "type": "array",
          "description": "Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US.",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "relativePath",
        "action",
        "countryCodes"
      ]
    },
    "GeoFilterActions": {
      "type": "string",
      "description": "Action of the geo filter, i.e. allow or block access.",
      "enum": [
        "Block",
        "Allow"
      ],
      "x-ms-enum": {
        "name": "GeoFilterActions",
        "modelAsString": false
      }
    },
    "KeyVaultSigningKeyParameters": {
      "type": "object",
      "description": "Describes the parameters for using a user's KeyVault for URL Signing Key.",
      "properties": {
        "typeName": {
          "$ref": "#/$defs/KeyVaultSigningKeyParametersType"
        },
        "subscriptionId": {
          "type": "string",
          "description": "Subscription Id of the user's Key Vault containing the secret"
        },
        "resourceGroupName": {
          "type": "string",
          "description": "Resource group of the user's Key Vault containing the secret"
        },
        "vaultName": {
          "type": "string",
          "description": "The name of the user's Key Vault containing the secret"
        },
        "secretName": {
          "type": "string",
          "description": "The name of secret in Key Vault."
        },
        "secretVersion": {
          "type": "string",
          "description": "The version(GUID) of secret in Key Vault."
        }
      },
      "required": [
        "typeName",
        "subscriptionId",
        "resourceGroupName",
        "vaultName",
        "secretName",
        "secretVersion"
      ]
    },
    "KeyVaultSigningKeyParametersType": {
      "type": "string",
      "enum": [
        "KeyVaultSigningKeyParameters"
      ],
      "x-ms-enum": {
        "name": "KeyVaultSigningKeyParametersType",
        "modelAsString": true,
        "values": [
          {
            "name": "KeyVaultSigningKeyParameters",
            "value": "KeyVaultSigningKeyParameters"
          }
        ]
      }
    },
    "MatchVariable": {
      "type": "string",
      "description": "Request variable to compare with.",
      "enum": [
        "RemoteAddress",
        "RequestMethod",
        "QueryString",
        "PostArgs",
        "RequestUri",
        "RequestHeader",
        "RequestBody",
        "RequestScheme",
        "UrlPath",
        "UrlFileExtension",
        "UrlFileName",
        "HttpVersion",
        "Cookies",
        "IsDevice",
        "SocketAddr",
        "ClientPort",
        "ServerPort",
        "HostName",
        "SslProtocol"
      ],
      "x-ms-enum": {
        "name": "MatchVariable",
        "modelAsString": true,
        "values": [
          {
            "name": "RemoteAddress",
            "value": "RemoteAddress"
          },
          {
            "name": "RequestMethod",
            "value": "RequestMethod"
          },
          {
            "name": "QueryString",
            "value": "QueryString"
          },
          {
            "name": "PostArgs",
            "value": "PostArgs"
          },
          {
            "name": "RequestUri",
            "value": "RequestUri"
          },
          {
            "name": "RequestHeader",
            "value": "RequestHeader"
          },
          {
            "name": "RequestBody",
            "value": "RequestBody"
          },
          {
            "name": "RequestScheme",
            "value": "RequestScheme"
          },
          {
            "name": "UrlPath",
            "value": "UrlPath"
          },
          {
            "name": "UrlFileExtension",
            "value": "UrlFileExtension"
          },
          {
            "name": "UrlFileName",
            "value": "UrlFileName"
          },
          {
            "name": "HttpVersion",
            "value": "HttpVersion"
          },
          {
            "name": "Cookies",
            "value": "Cookies"
          },
          {
            "name": "IsDevice",
            "value": "IsDevice"
          },
          {
            "name": "SocketAddr",
            "value": "SocketAddr"
          },
          {
            "name": "ClientPort",
            "value": "ClientPort"
          },
          {
            "name": "ServerPort",
            "value": "ServerPort"
          },
          {
            "name": "HostName",
            "value": "HostName"
          },
          {
            "name": "SslProtocol",
            "value": "SslProtocol"
          }
        ]
      }
    },
    "OptimizationType": {
      "type": "string",
      "description": "Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information we can apply scenario driven optimization.",
      "enum": [
        "GeneralWebDelivery",
        "GeneralMediaStreaming",
        "VideoOnDemandMediaStreaming",
        "LargeFileDownload",
        "DynamicSiteAcceleration"
      ],
      "x-ms-enum": {
        "name": "OptimizationType",
        "modelAsString": true,
        "values": [
          {
            "name": "GeneralWebDelivery",
            "value": "GeneralWebDelivery"
          },
          {
            "name": "GeneralMediaStreaming",
            "value": "GeneralMediaStreaming"
          },
          {
            "name": "VideoOnDemandMediaStreaming",
            "value": "VideoOnDemandMediaStreaming"
          },
          {
            "name": "LargeFileDownload",
            "value": "LargeFileDownload"
          },
          {
            "name": "DynamicSiteAcceleration",
            "value": "DynamicSiteAcceleration"
          }
        ]
      }
    },
    "ResourceReference": {
      "type": "object",
      "description": "Reference to another resource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "UrlSigningKey": {
      "type": "object",
      "description": "Url signing key",
      "properties": {
        "keyId": {
          "type": "string",
          "description": "Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash."
        },
        "keySourceParameters": {
          "$ref": "#/$defs/KeyVaultSigningKeyParameters",
          "description": "Defines the parameters for using customer key vault for Url Signing Key."
        }
      },
      "required": [
        "keyId",
        "keySourceParameters"
      ]
    }
  }
}