{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/azure-containerapp-template.json",
  "description": "Container App versioned application definition.\nDefines the desired state of an immutable revision.\nAny changes to this section Will result in a new revision being created",
  "properties": {
    "containers": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "args": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container start command arguments"
              },
              "command": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container start command"
              },
              "env": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Environment variable name"
                        },
                        "secretRef": {
                          "type": "string",
                          "description": "Name of the Container App secret from which to pull the environment variable value"
                        },
                        "value": {
                          "type": "string",
                          "description": "Non-secret environment variable value"
                        }
                      },
                      "description": "Container App container environment variable",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container environment variables"
              },
              "image": {
                "type": "string",
                "description": "Container image tag"
              },
              "name": {
                "type": "string",
                "description": "Custom container name"
              },
              "probes": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "failureThreshold": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10"
                        },
                        "httpGet": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "host": {
                                  "type": "string",
                                  "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead"
                                },
                                "httpHeaders": {
                                  "oneOf": [
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "The header field name"
                                          },
                                          "value": {
                                            "type": "string",
                                            "description": "The header field value"
                                          }
                                        },
                                        "required": [],
                                        "description": "HTTPHeader describes a custom header to be used in HTTP probes",
                                        "additionalProperties": false
                                      }
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\[([^\\[].*)?\\]$",
                                      "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                    }
                                  ],
                                  "description": "Custom headers to set in the request. HTTP allows repeated headers"
                                },
                                "path": {
                                  "type": "string",
                                  "description": "Path to access on the HTTP server"
                                },
                                "port": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\[([^\\[].*)?\\]$",
                                      "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                    }
                                  ],
                                  "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME"
                                },
                                "scheme": {
                                  "oneOf": [
                                    {
                                      "enum": ["HTTP", "HTTPS"]
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\[([^\\[].*)?\\]$",
                                      "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                    }
                                  ],
                                  "description": "Scheme to use for connecting to the host. Defaults to HTTP"
                                }
                              },
                              "required": [],
                              "description": "HTTPGet specifies the http request to perform",
                              "additionalProperties": false
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "HTTPGet specifies the http request to perform"
                        },
                        "initialDelaySeconds": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60"
                        },
                        "periodSeconds": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240"
                        },
                        "successThreshold": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10"
                        },
                        "tcpSocket": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "host": {
                                  "type": "string",
                                  "description": "Optional: Host name to connect to, defaults to the pod IP"
                                },
                                "port": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\[([^\\[].*)?\\]$",
                                      "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                    }
                                  ],
                                  "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME"
                                }
                              },
                              "required": [],
                              "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
                              "additionalProperties": false
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported"
                        },
                        "terminationGracePeriodSeconds": {
                          "$comment": "The value of 'null' is UNDOCUMENTED.",
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour)"
                        },
                        "timeoutSeconds": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240"
                        },
                        "type": {
                          "oneOf": [
                            {
                              "enum": ["Liveness", "Readiness", "Startup"]
                            },
                            {
                              "type": "string",
                              "pattern": "^\\[([^\\[].*)?\\]$",
                              "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                            }
                          ],
                          "description": "The type of probe"
                        }
                      },
                      "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "List of probes for the container"
              },
              "resources": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cpu": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Required CPU in cores, e.g. 0.5"
                      },
                      "memory": {
                        "type": "string",
                        "description": "Required memory, e.g. \"250Mb\""
                      },
                      "ephemeralStorage": {
                        "type": "string",
                        "description": "UNDOCUMENTED. The total amount of storage available to each replica"
                      }
                    },
                    "description": "Container App container resource requirements",
                    "additionalProperties": false
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container App container resource requirements"
              },
              "volumeMounts": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "mountPath": {
                          "type": "string",
                          "description": "Path within the container at which the volume should be mounted.Must not contain ':'"
                        },
                        "subPath": {
                          "type": "string",
                          "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)"
                        },
                        "volumeName": {
                          "type": "string",
                          "description": "This must match the Name of a Volume"
                        }
                      },
                      "description": "Volume mount for the Container App",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container volume mounts"
              }
            },
            "description": "Container App container definition",
            "additionalProperties": false
          }
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "List of container definitions for the Container App"
    },
    "initContainers": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "args": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container start command arguments"
              },
              "command": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container start command"
              },
              "env": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Environment variable name"
                        },
                        "secretRef": {
                          "type": "string",
                          "description": "Name of the Container App secret from which to pull the environment variable value"
                        },
                        "value": {
                          "type": "string",
                          "description": "Non-secret environment variable value"
                        }
                      },
                      "description": "Container App container environment variable",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container environment variables"
              },
              "image": {
                "type": "string",
                "description": "Container image tag"
              },
              "name": {
                "type": "string",
                "description": "Custom container name"
              },
              "resources": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "cpu": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Required CPU in cores, e.g. 0.5"
                      },
                      "memory": {
                        "type": "string",
                        "description": "Required memory, e.g. \"250Mb\""
                      }
                    },
                    "description": "Container App container resource requirements",
                    "additionalProperties": false
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container App container resource requirements"
              },
              "volumeMounts": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "mountPath": {
                          "type": "string",
                          "description": "Path within the container at which the volume should be mounted.Must not contain ':'"
                        },
                        "subPath": {
                          "type": "string",
                          "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)"
                        },
                        "volumeName": {
                          "type": "string",
                          "description": "This must match the Name of a Volume"
                        }
                      },
                      "description": "Volume mount for the Container App",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Container volume mounts"
              }
            },
            "description": "Container App init container definition",
            "additionalProperties": false
          }
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "List of specialized containers that run before app containers"
    },
    "revisionSuffix": {
      "type": "string",
      "description": "User friendly suffix that is appended to the revision name"
    },
    "scale": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "maxReplicas": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string",
                  "pattern": "^\\[([^\\[].*)?\\]$",
                  "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                }
              ],
              "description": "Optional. Maximum number of container replicas. Defaults to 10 if not set"
            },
            "minReplicas": {
              "$comment": "The value of 'null' is UNDOCUMENTED.",
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "pattern": "^\\[([^\\[].*)?\\]$",
                  "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                }
              ],
              "description": "Optional. Minimum number of container replicas"
            },
            "rules": {
              "$comment": "The value of 'null' is UNDOCUMENTED.",
              "oneOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "azureQueue": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "auth": {
                                "oneOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "secretRef": {
                                          "type": "string",
                                          "description": "Name of the secret from which to pull the auth params"
                                        },
                                        "triggerParameter": {
                                          "type": "string",
                                          "description": "Trigger Parameter that uses the secret"
                                        }
                                      },
                                      "description": "Auth Secrets for Scale Rule",
                                      "additionalProperties": false
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Authentication secrets for the queue scale rule"
                              },
                              "queueLength": {
                                "oneOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Queue length"
                              },
                              "queueName": {
                                "type": "string",
                                "description": "Queue name"
                              }
                            },
                            "description": "Container App container Azure Queue based scaling rule",
                            "additionalProperties": false
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Container App container Azure Queue based scaling rule"
                      },
                      "custom": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "auth": {
                                "oneOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "secretRef": {
                                          "type": "string",
                                          "description": "Name of the secret from which to pull the auth params"
                                        },
                                        "triggerParameter": {
                                          "type": "string",
                                          "description": "Trigger Parameter that uses the secret"
                                        }
                                      },
                                      "description": "Auth Secrets for Scale Rule",
                                      "additionalProperties": false
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Authentication secrets for the custom scale rule"
                              },
                              "metadata": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Metadata properties to describe custom scale rule"
                              },
                              "type": {
                                "type": "string",
                                "description": "Type of the custom scale rule\neg: azure-servicebus, redis etc"
                              }
                            },
                            "description": "Container App container Custom scaling rule",
                            "additionalProperties": false
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Container App container Custom scaling rule"
                      },
                      "http": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "auth": {
                                "oneOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "secretRef": {
                                          "type": "string",
                                          "description": "Name of the secret from which to pull the auth params"
                                        },
                                        "triggerParameter": {
                                          "type": "string",
                                          "description": "Trigger Parameter that uses the secret"
                                        }
                                      },
                                      "description": "Auth Secrets for Scale Rule",
                                      "additionalProperties": false
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Authentication secrets for the custom scale rule"
                              },
                              "metadata": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Metadata properties to describe http scale rule"
                              }
                            },
                            "description": "Container App container Http scaling rule",
                            "additionalProperties": false
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Container App container Http scaling rule"
                      },
                      "name": {
                        "type": "string",
                        "description": "Scale Rule Name"
                      },
                      "tcp": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "auth": {
                                "oneOf": [
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "secretRef": {
                                          "type": "string",
                                          "description": "Name of the secret from which to pull the auth params"
                                        },
                                        "triggerParameter": {
                                          "type": "string",
                                          "description": "Trigger Parameter that uses the secret"
                                        }
                                      },
                                      "description": "Auth Secrets for Scale Rule",
                                      "additionalProperties": false
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Authentication secrets for the tcp scale rule"
                              },
                              "metadata": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "string"
                                    }
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\[([^\\[].*)?\\]$",
                                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                                  }
                                ],
                                "description": "Metadata properties to describe tcp scale rule"
                              }
                            },
                            "description": "Container App container Tcp scaling rule",
                            "additionalProperties": false
                          },
                          {
                            "type": "string",
                            "pattern": "^\\[([^\\[].*)?\\]$",
                            "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                          }
                        ],
                        "description": "Container App container Tcp scaling rule"
                      }
                    },
                    "description": "Container App container scaling rule",
                    "additionalProperties": false
                  }
                },
                {
                  "type": "null"
                },
                {
                  "type": "string",
                  "pattern": "^\\[([^\\[].*)?\\]$",
                  "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                }
              ],
              "description": "Scaling rules"
            }
          },
          "description": "Container App scaling configurations",
          "additionalProperties": false
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "Container App scaling configurations"
    },
    "serviceBinds": {
      "$comment": "The value of 'null' is UNDOCUMENTED.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the service bind"
              },
              "serviceId": {
                "type": "string",
                "description": "Resource id of the target service"
              }
            },
            "description": "Configuration to bind a ContainerApp to a dev ContainerApp Service",
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "List of container app services bound to the app"
    },
    "terminationGracePeriodSeconds": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds"
    },
    "volumes": {
      "$comment": "The value of 'null' is UNDOCUMENTED.",
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "mountOptions": {
                "type": "string",
                "description": "Mount options used while mounting the AzureFile. Must be a comma-separated string"
              },
              "name": {
                "type": "string",
                "description": "Volume name"
              },
              "secrets": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "description": "Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef"
                        },
                        "secretRef": {
                          "type": "string",
                          "description": "Name of the Container App secret from which to pull the secret value"
                        }
                      },
                      "description": "Secret to be added to volume",
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume"
              },
              "storageName": {
                "type": "string",
                "description": "Name of storage resource. No need to provide for EmptyDir and Secret"
              },
              "storageType": {
                "oneOf": [
                  {
                    "enum": ["AzureFile", "EmptyDir", "Secret"]
                  },
                  {
                    "type": "string",
                    "pattern": "^\\[([^\\[].*)?\\]$",
                    "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
                  }
                ],
                "description": "Storage type for the volume. If not provided, use EmptyDir"
              }
            },
            "description": "Volume definitions for the Container App",
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        },
        {
          "type": "string",
          "pattern": "^\\[([^\\[].*)?\\]$",
          "description": "Deployment template expression. See https://aka.ms/arm-template-expressions for more details on the ARM expression syntax"
        }
      ],
      "description": "List of volume definitions for the Container App"
    }
  },
  "type": "object"
}
