{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-blob-storage/json-schema/microsoft-azure-blob-storage-storage-service-properties-schema.json",
  "title": "StorageServiceProperties",
  "description": "Storage Service Properties.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-blob-storage-openapi.yml#/components/schemas/StorageServiceProperties",
  "type": "object",
  "properties": {
    "Logging": {
      "$ref": "#/$defs/Logging"
    },
    "HourMetrics": {
      "$ref": "#/$defs/Metrics"
    },
    "MinuteMetrics": {
      "$ref": "#/$defs/Metrics"
    },
    "Cors": {
      "description": "The set of CORS rules.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CorsRule"
      }
    },
    "DefaultServiceVersion": {
      "description": "The default version to use for requests to the Blob service if an incoming request's version is not specified. Possible values include version 2008-10-27 and all more recent versions",
      "type": "string"
    },
    "DeleteRetentionPolicy": {
      "$ref": "#/$defs/RetentionPolicy"
    },
    "StaticWebsite": {
      "$ref": "#/$defs/StaticWebsite"
    }
  },
  "$defs": {
    "CorsRule": {
      "description": "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain",
      "type": "object",
      "required": [
        "AllowedOrigins",
        "AllowedMethods",
        "AllowedHeaders",
        "ExposedHeaders",
        "MaxAgeInSeconds"
      ],
      "properties": {
        "AllowedOrigins": {
          "description": "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.",
          "type": "string"
        },
        "AllowedMethods": {
          "description": "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)",
          "type": "string"
        },
        "AllowedHeaders": {
          "description": "the request headers that the origin domain may specify on the CORS request.",
          "type": "string"
        },
        "ExposedHeaders": {
          "description": "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer",
          "type": "string"
        },
        "MaxAgeInSeconds": {
          "description": "The maximum amount time that a browser should cache the preflight OPTIONS request.",
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "Logging": {
      "description": "Azure Analytics Logging settings.",
      "type": "object",
      "required": [
        "Version",
        "Delete",
        "Read",
        "Write",
        "RetentionPolicy"
      ],
      "properties": {
        "Version": {
          "description": "The version of Storage Analytics to configure.",
          "type": "string"
        },
        "Delete": {
          "description": "Indicates whether all delete requests should be logged.",
          "type": "boolean"
        },
        "Read": {
          "description": "Indicates whether all read requests should be logged.",
          "type": "boolean"
        },
        "Write": {
          "description": "Indicates whether all write requests should be logged.",
          "type": "boolean"
        },
        "RetentionPolicy": {
          "$ref": "#/$defs/RetentionPolicy"
        }
      }
    },
    "Metrics": {
      "description": "a summary of request statistics grouped by API in hour or minute aggregates for blobs",
      "required": [
        "Enabled"
      ],
      "properties": {
        "Version": {
          "description": "The version of Storage Analytics to configure.",
          "type": "string"
        },
        "Enabled": {
          "description": "Indicates whether metrics are enabled for the Blob service.",
          "type": "boolean"
        },
        "IncludeAPIs": {
          "description": "Indicates whether metrics should generate summary statistics for called API operations.",
          "type": "boolean"
        },
        "RetentionPolicy": {
          "$ref": "#/$defs/RetentionPolicy"
        }
      }
    },
    "RetentionPolicy": {
      "description": "the retention policy which determines how long the associated data should persist",
      "type": "object",
      "required": [
        "Enabled"
      ],
      "properties": {
        "Enabled": {
          "description": "Indicates whether a retention policy is enabled for the storage service",
          "type": "boolean"
        },
        "Days": {
          "description": "Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older than this value will be deleted",
          "type": "integer",
          "minimum": 1
        },
        "AllowPermanentDelete": {
          "description": "Indicates whether permanent delete is allowed on this storage account.",
          "type": "boolean"
        }
      }
    },
    "StaticWebsite": {
      "description": "The properties that enable an account to host a static website",
      "type": "object",
      "required": [
        "Enabled"
      ],
      "properties": {
        "Enabled": {
          "description": "Indicates whether this account is hosting a static website",
          "type": "boolean"
        },
        "IndexDocument": {
          "description": "The default name of the index page under each directory",
          "type": "string"
        },
        "ErrorDocument404Path": {
          "description": "The absolute path of the custom 404 page",
          "type": "string"
        },
        "DefaultIndexDocumentPath": {
          "description": "Absolute path of the default index page",
          "type": "string"
        }
      }
    }
  }
}