{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "resources": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z0-9_-]+$": {
          "properties": {
            "component": {
              "type": "string"
            },
            "props": {
              "anyOf": [
                {
                  "$ref": "#/definitions/fc3Schema"
                },
                {
                  "$ref": "#/definitions/fc3DomainSchema"
                },
                {
                  "$ref": "#/definitions/rosSchema"
                },
                {
                  "$ref": "#/definitions/rosTransformerSchema"
                },
                {
                  "$ref": "#/definitions/aliyunOSSBucketSchema"
                },
                {
                  "$ref": "#/definitions/aliyunSlsProjectSchema"
                },
                {
                  "$ref": "#/definitions/aliyunSlsLogstoreSchema"
                }
              ]
            }
          }
        }
      }
    }
  },
  "definitions": {
    "aliyunSlsLogstoreSchema": {
      "type": "object",
      "properties": {
        "project": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "retention_period": {
          "type": "integer",
          "minimum": 1
        },
        "shard_count": {
          "type": "integer",
          "minimum": 1
        },
        "auto_split": {
          "type": "boolean"
        },
        "max_split_shard_count": {
          "type": "integer",
          "minimum": 1
        },
        "retention_forever": {
          "type": "boolean"
        },
        "enable_web_tracking": {
          "type": "boolean"
        },
        "append_meta": {
          "type": "boolean"
        }
      },
      "required": [
        "project",
        "name"
      ],
      "examples": [
        "https://github.com/devsapp/aliyun-resources/tree/master/aliyun_sls_logstore/examples"
      ]
    },
    "aliyunSlsProjectSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "examples": [
        "https://github.com/devsapp/aliyun-resources/tree/master/aliyun_sls_project/examples"
      ]
    },
    "aliyunOSSBucketSchema": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string"
        },
        "acl": {
          "enum": [
            "private",
            "public-read",
            "public-read-write"
          ],
          "type": "string"
        },
        "storage_class": {
          "enum": [
            "Standard",
            "IA",
            "Archive",
            "ColdArchive"
          ],
          "type": "string"
        },
        "redundancy_type": {
          "enum": [
            "LRS",
            "ZRS"
          ],
          "type": "string"
        },
        "versioning": {
          "properties": {
            "status": {
              "enum": [
                "Enabled",
                "Suspended"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "bucket"
      ],
      "examples": [
        "https://github.com/devsapp/aliyun-resources/tree/master/aliyun_oss_bucket/examples"
      ]
    },
    "rosTransformerSchema": {
      "type": "object",
      "properties": {
        "region": {
          "$ref": "#/definitions/IRegion"
        },
        "name": {
          "type": "string",
          "default": "test"
        },
        "refs": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "region",
        "name",
        "refs"
      ],
      "examples": [
        "https://github.com/devsapp/aliyun-resources/tree/master/ros_transformer/examples"
      ]
    },
    "rosSchema": {
      "type": "object",
      "properties": {
        "region": {
          "$ref": "#/definitions/IRegion"
        },
        "name": {
          "type": "string",
          "default": "test"
        },
        "template": {
          "type": "string"
        },
        "policy": {
          "properties": {
            "body": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "parameters": {
          "properties": {},
          "type": "object"
        }
      },
      "required": [
        "region",
        "name",
        "template"
      ],
      "examples": [
        "https://github.com/devsapp/ros/blob/master/examples/s.yaml"
      ]
    },
    "fc3DomainSchema": {
      "type": "object",
      "properties": {
        "region": {
          "$ref": "#/definitions/IRegion"
        },
        "domainName": {
          "type": "string",
          "default": "auto"
        },
        "protocol": {
          "type": "string",
          "enum": [
            "HTTP",
            "HTTPS",
            "HTTP,HTTPS"
          ],
          "default": "HTTP"
        },
        "routeConfig": {
          "$ref": "#/definitions/IRouteConfig"
        },
        "certConfig": {
          "$ref": "#/definitions/ICertConfig"
        },
        "wafConfig": {
          "$ref": "#/definitions/IWafConfig"
        },
        "tlsConfig": {
          "$ref": "#/definitions/ITLSConfig"
        },
        "authConfig": {
          "properties": {
            "authInfo": {
              "type": "string"
            },
            "authType": {
              "type": "string",
              "enum": [
                "jwt",
                "function",
                "anonymous"
              ]
            }
          },
          "required": [
            "authType"
          ],
          "type": "object"
        }
      },
      "required": [
        "region",
        "domainName",
        "protocol",
        "routeConfig"
      ],
      "examples": [
        "https://github.com/devsapp/fc3-domain/blob/master/examples/s.yaml"
      ]
    },
    "fc3Schema": {
      "type": "object",
      "properties": {
        "asyncInvokeConfig": {
          "$ref": "#/definitions/IAsyncInvokeConfig"
        },
        "code": {
          "$ref": "#/definitions/ICodeUri"
        },
        "cpu": {
          "type": "number",
          "default": 0.35,
          "minimum": 0.05,
          "maximum": 16
        },
        "customContainerConfig": {
          "$ref": "#/definitions/ICustomContainerConfig"
        },
        "customDNS": {
          "$ref": "#/definitions/ICustomDNS"
        },
        "customRuntimeConfig": {
          "$ref": "#/definitions/ICustomRuntimeConfig"
        },
        "description": {
          "type": "string"
        },
        "diskSize": {
          "enum": [
            10240,
            512
          ],
          "type": "integer",
          "default": 512
        },
        "endpoint": {
          "type": "string"
        },
        "environmentVariables": {
          "$ref": "#/definitions/IKV"
        },
        "functionName": {
          "type": "string",
          "default": "my-func"
        },
        "gpuConfig": {
          "$ref": "#/definitions/IGpuConfig",
          "default": {
            "gpuMemorySize": 1024,
            "gpuType": "fc.gpu.tesla.1"
          }
        },
        "handler": {
          "type": "string",
          "default": "index.handler"
        },
        "instanceLifecycleConfig": {
          "properties": {
            "initializer": {
              "$ref": "#/definitions/ILifecycleHook"
            },
            "preStop": {
              "$ref": "#/definitions/ILifecycleHook"
            }
          },
          "type": "object",
          "default": {
            "initializer": {
              "handler": "index.init",
              "timeout": 30
            },
            "preStop": {
              "handler": "index.preStop",
              "timeout": 30
            }
          }
        },
        "internetAccess": {
          "type": "boolean",
          "default": true
        },
        "layers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "logConfig": {
          "anyOf": [
            {
              "$ref": "#/definitions/ILogConfig"
            },
            {
              "const": "auto",
              "type": "string"
            }
          ],
          "default": {
            "enableInstanceMetrics": true,
            "enableRequestMetrics": true,
            "logBeginRule": "DefaultRegex",
            "project": "my-logproject",
            "logstore": "my-logstore"
          }
        },
        "memorySize": {
          "type": "integer",
          "default": 512,
          "multipleOf": 64,
          "minimum": 128,
          "maximum": 32768
        },
        "nasConfig": {
          "anyOf": [
            {
              "$ref": "#/definitions/INasConfig"
            },
            {
              "const": "auto",
              "type": "string"
            }
          ],
          "default": {
            "userId": 0,
            "groupId": 0
          }
        },
        "ossMountConfig": {
          "$ref": "#/definitions/IOssMountConfig"
        },
        "region": {
          "$ref": "#/definitions/IRegion",
          "default": "cn-hangzhou"
        },
        "role": {
          "type": "string"
        },
        "runtime": {
          "$ref": "#/definitions/IRuntime",
          "default": "nodejs16"
        },
        "timeout": {
          "type": "integer",
          "default": 3,
          "minimum": 1,
          "maximum": 86400
        },
        "instanceConcurrency": {
          "type": "integer",
          "default": 1,
          "minimum": 1,
          "maximum": 100
        },
        "tracingConfig": {
          "$ref": "#/definitions/ITracingConfig"
        },
        "triggers": {
          "items": {
            "$ref": "#/definitions/ITrigger"
          },
          "type": "array"
        },
        "vpcBinding": {
          "properties": {
            "vpcIds": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "vpcIds"
          ],
          "type": "object",
          "default": {
            "vpcIds": [
              "my-vpcid1"
            ]
          }
        },
        "vpcConfig": {
          "anyOf": [
            {
              "$ref": "#/definitions/IVpcConfig"
            },
            {
              "const": "auto",
              "type": "string"
            }
          ],
          "default": {
            "securityGroupId": "my-sg-id",
            "vSwitchIds": [
              "my-vSwitchId-1"
            ],
            "vpcId": "my-vpc-id"
          }
        }
      },
      "required": [
        "region",
        "functionName",
        "runtime"
      ],
      "default": {
        "region": "cn-hangzhou",
        "functionName": "my-func",
        "runtime": "nodejs16"
      },
      "if": {
        "properties": {
          "runtime": {
            "type": "string",
            "const": "custom-container"
          }
        }
      },
      "then": {
        "required": [
          "region",
          "functionName",
          "runtime",
          "customContainerConfig"
        ]
      },
      "else": {
        "if": {
          "properties": {
            "runtime": {
              "type": "string",
              "pattern": "^custom"
            }
          }
        },
        "then": {
          "required": [
            "region",
            "functionName",
            "runtime",
            "code"
          ]
        },
        "else": {
          "required": [
            "region",
            "functionName",
            "runtime",
            "code",
            "handler"
          ]
        }
      },
      "examples": [
        "https://github.com/devsapp/fc3/blob/master/__tests__/complete-props.yaml"
      ]
    },
    "IAsyncInvokeConfig": {
      "properties": {
        "destinationConfig": {
          "$ref": "#/definitions/IDestinationConfig",
          "default": {
            "onSuccess": {
              "destination": "acs:fc:<region>::functions/<my-function>"
            }
          }
        },
        "maxAsyncEventAgeInSeconds": {
          "type": "number",
          "default": 18000,
          "minimum": 1,
          "maximum": 2592000
        },
        "maxAsyncRetryAttempts": {
          "type": "number",
          "default": 3,
          "minimum": 0,
          "maximum": 8
        }
      },
      "type": "object"
    },
    "ICdnTriggerConfig": {
      "properties": {
        "eventName": {
          "type": "string"
        },
        "eventVersion": {
          "type": "string"
        },
        "filter": {
          "properties": {
            "domain": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "domain"
          ],
          "type": "object"
        },
        "notes": {
          "type": "string"
        }
      },
      "required": [
        "eventName",
        "eventVersion",
        "filter",
        "notes"
      ],
      "type": "object"
    },
    "ICodeUri": {
      "anyOf": [
        {
          "properties": {
            "ossBucketName": {
              "type": "string"
            },
            "ossObjectName": {
              "type": "string"
            },
            "src": {
              "type": "string"
            }
          },
          "required": [
            "ossBucketName",
            "ossObjectName",
            "src"
          ],
          "type": "object"
        },
        {
          "type": "string"
        }
      ]
    },
    "ICustomContainerConfig": {
      "properties": {
        "accelerationType": {
          "type": "string"
        },
        "acrInstanceID": {
          "type": "string"
        },
        "command": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "entrypoint": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "healthCheckConfig": {
          "$ref": "#/definitions/IHealthCheckConfig"
        },
        "image": {
          "type": "string"
        },
        "port": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "ICustomDNS": {
      "properties": {
        "dnsOptions": {
          "items": {
            "properties": {
              "name": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "nameServers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "searches": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ICustomRuntimeConfig": {
      "properties": {
        "args": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "command": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "healthCheckConfig": {
          "$ref": "#/definitions/IHealthCheckConfig"
        },
        "port": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "IDestination": {
      "properties": {
        "destination": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "IDestinationConfig": {
      "properties": {
        "onFailure": {
          "$ref": "#/definitions/IDestination"
        },
        "onSuccess": {
          "$ref": "#/definitions/IDestination"
        }
      },
      "anyOf": [
        {
          "required": [
            "onFailure"
          ]
        },
        {
          "required": [
            "onSuccess"
          ]
        }
      ],
      "default": {
        "onSuccess": {
          "destination": "acs:fc:<region>::functions/<my-function>"
        }
      },
      "type": "object"
    },
    "IEventBridge": {
      "properties": {
        "asyncInvocationType": {
          "type": "boolean"
        },
        "eventRuleFilterPattern": {
          "type": "string"
        },
        "eventSinkConfig": {
          "properties": {
            "deliveryOption": {
              "additionalProperties": true,
              "properties": {},
              "type": "object"
            }
          },
          "required": [
            "deliveryOption"
          ],
          "type": "object"
        },
        "eventSourceConfig": {
          "properties": {
            "eventSourceParameters": {
              "additionalProperties": true,
              "properties": {},
              "type": "object"
            },
            "eventSourceType": {
              "type": "string"
            }
          },
          "required": [
            "eventSourceParameters",
            "eventSourceType"
          ],
          "type": "object"
        },
        "runOptions": {
          "additionalProperties": true,
          "properties": {},
          "type": "object"
        },
        "triggerEnable": {
          "type": "boolean"
        }
      },
      "required": [
        "asyncInvocationType",
        "eventRuleFilterPattern",
        "eventSinkConfig",
        "eventSourceConfig",
        "runOptions",
        "triggerEnable"
      ],
      "type": "object"
    },
    "IGpuConfig": {
      "properties": {
        "gpuMemorySize": {
          "type": "number",
          "default": 1024,
          "minimum": 1024,
          "maximum": 24576,
          "multipleOf": 1024
        },
        "gpuType": {
          "type": "string",
          "enum": [
            "fc.gpu.tesla.1",
            "fc.gpu.ampere.1"
          ],
          "default": "fc.gpu.tesla.1"
        }
      },
      "required": [
        "gpuMemorySize",
        "gpuType"
      ],
      "type": "object"
    },
    "IHealthCheckConfig": {
      "properties": {
        "failureThreshold": {
          "type": "number"
        },
        "httpGetUrl": {
          "type": "string"
        },
        "initialDelaySeconds": {
          "type": "number"
        },
        "periodSeconds": {
          "type": "number"
        },
        "successThreshold": {
          "type": "number"
        },
        "timeoutSeconds": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "IHttpTriggerConfig": {
      "properties": {
        "authConfig": {
          "type": "string"
        },
        "authType": {
          "enum": [
            "anonymous",
            "function"
          ],
          "type": "string",
          "default": "anonymous"
        },
        "disableURLInternet": {
          "type": "boolean"
        },
        "methods": {
          "items": {
            "enum": [
              "DELETE",
              "GET",
              "HEAD",
              "OPTIONS",
              "PATCH",
              "POST",
              "PUT"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "authType",
        "methods"
      ],
      "type": "object"
    },
    "IKV": {
      "type": "object"
    },
    "ILifecycleHook": {
      "properties": {
        "handler": {
          "type": "string"
        },
        "timeout": {
          "type": "integer",
          "minimum": 1
        }
      },
      "type": "object"
    },
    "ILogConfig": {
      "properties": {
        "enableInstanceMetrics": {
          "type": "boolean"
        },
        "enableRequestMetrics": {
          "type": "boolean"
        },
        "logBeginRule": {
          "enum": [
            "DefaultRegex",
            "None"
          ],
          "type": "string"
        },
        "logstore": {
          "type": "string"
        },
        "project": {
          "type": "string"
        }
      },
      "required": [
        "logstore",
        "project"
      ],
      "type": "object"
    },
    "ILogTriggerConfig": {
      "properties": {
        "enable": {
          "type": "boolean"
        },
        "functionParameter": {
          "additionalProperties": {},
          "type": "object"
        },
        "jobConfig": {
          "properties": {
            "maxRetryTime": {
              "type": "string"
            },
            "triggerInterval": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "logConfig": {
          "properties": {
            "logstore": {
              "type": "string"
            },
            "project": {
              "type": "string"
            }
          },
          "required": [
            "logstore",
            "project"
          ],
          "type": "object"
        },
        "sourceConfig": {
          "properties": {
            "logstore": {
              "type": "string"
            }
          },
          "required": [
            "logstore"
          ],
          "type": "object"
        }
      },
      "required": [
        "enable",
        "jobConfig",
        "logConfig",
        "sourceConfig"
      ],
      "type": "object"
    },
    "IMnsTriggerConfig": {
      "properties": {
        "filterTag": {
          "type": "string"
        },
        "notifyContentFormat": {
          "enum": [
            "JSON",
            "STREAM"
          ],
          "type": "string"
        },
        "notifyStrategy": {
          "enum": [
            "BACKOFF_RETRY",
            "EXPONENTIAL_DECAY_RETRY"
          ],
          "type": "string"
        }
      },
      "required": [
        "notifyContentFormat",
        "notifyStrategy"
      ],
      "type": "object"
    },
    "INasConfig": {
      "properties": {
        "groupId": {
          "type": "number",
          "default": 0
        },
        "userId": {
          "type": "number",
          "default": 0
        },
        "mountPoints": {
          "items": {
            "properties": {
              "enableTLS": {
                "type": "boolean",
                "default": false
              },
              "mountDir": {
                "type": "string",
                "default": "/mnt/test"
              },
              "serverAddr": {
                "type": "string",
                "default": "<my-nas>.<region>.nas.aliyuncs.com:/test"
              }
            },
            "required": [
              "mountDir",
              "serverAddr"
            ],
            "type": "object",
            "default": {
              "mountDir": "/mnt/test",
              "serverAddr": "<my-nas>.<region>.nas.aliyuncs.com:/test",
              "enableTLS": false
            }
          },
          "type": "array",
          "default": [
            {
              "mountDir": "/mnt/test",
              "serverAddr": "<my-nas>.<region>.nas.aliyuncs.com:/test",
              "enableTLS": false
            }
          ]
        }
      },
      "required": [
        "userId",
        "groupId",
        "mountPoints"
      ],
      "type": "object"
    },
    "IOssMountConfig": {
      "properties": {
        "mountPoints": {
          "items": {
            "properties": {
              "bucketName": {
                "type": "string"
              },
              "bucketPath": {
                "type": "string",
                "default": ""
              },
              "endpoint": {
                "type": "string"
              },
              "mountDir": {
                "type": "string"
              },
              "readOnly": {
                "type": "boolean",
                "default": false
              }
            },
            "required": [
              "bucketName",
              "endpoint",
              "mountDir"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "mountPoints"
      ],
      "type": "object"
    },
    "IOssTriggerConfig": {
      "properties": {
        "events": {
          "items": {
            "enum": [
              "oss:ObjectCreated:*",
              "oss:ObjectCreated:AppendObject",
              "oss:ObjectCreated:CompleteMultipartUpload",
              "oss:ObjectCreated:CopyObject",
              "oss:ObjectCreated:InitiateMultipartUpload",
              "oss:ObjectCreated:PostObject",
              "oss:ObjectCreated:PutObject",
              "oss:ObjectCreated:PutSymlink",
              "oss:ObjectCreated:UploadPart",
              "oss:ObjectCreated:UploadPartCopy",
              "oss:ObjectModified:UpdateObjectMeta",
              "oss:ObjectRemoved:AbortMultipartUpload",
              "oss:ObjectRemoved:DeleteObject",
              "oss:ObjectRemoved:DeleteObjects"
            ],
            "type": "string",
            "default": [
              "oss:ObjectCreated:PostObject",
              "oss:ObjectCreated:PutObject",
              "oss:ObjectCreated:CompleteMultipartUpload"
            ]
          },
          "type": "array"
        },
        "filter": {
          "properties": {
            "key": {
              "properties": {
                "prefix": {
                  "type": "string"
                },
                "suffix": {
                  "type": "string"
                }
              },
              "required": [
                "prefix",
                "suffix"
              ],
              "type": "object"
            }
          },
          "required": [
            "key"
          ],
          "type": "object"
        }
      },
      "required": [
        "events",
        "filter"
      ],
      "type": "object"
    },
    "IOtsConfig": {
      "type": "object",
      "const": {}
    },
    "IRegion": {
      "enum": [
        "ap-northeast-1",
        "ap-northeast-2",
        "ap-south-1",
        "ap-southeast-1",
        "ap-southeast-2",
        "ap-southeast-3",
        "ap-southeast-5",
        "ap-southeast-7",
        "cn-beijing",
        "cn-chengdu",
        "cn-hangzhou",
        "cn-hongkong",
        "cn-huhehaote",
        "cn-qingdao",
        "cn-shanghai",
        "cn-shenzhen",
        "cn-zhangjiakou",
        "eu-central-1",
        "eu-west-1",
        "us-east-1",
        "us-west-1"
      ],
      "type": "string",
      "default": "cn-hangzhou"
    },
    "IRuntime": {
      "enum": [
        "custom",
        "custom-container",
        "custom.debian10",
        "dotnetcore2.1",
        "dotnetcore3.1",
        "go1",
        "java11",
        "java8",
        "nodejs10",
        "nodejs12",
        "nodejs14",
        "nodejs16",
        "php7.2",
        "python2.7",
        "python3",
        "python3.10",
        "python3.9"
      ],
      "type": "string",
      "default": "nodejs16"
    },
    "ITimerTriggerConfig": {
      "properties": {
        "cronExpression": {
          "type": "string"
        },
        "enable": {
          "type": "boolean"
        },
        "payload": {
          "type": "string"
        }
      },
      "required": [
        "cronExpression",
        "enable"
      ],
      "type": "object"
    },
    "ITracingConfig": {
      "properties": {
        "jaegerConfig": {
          "properties": {
            "endpoint": {
              "type": "string"
            }
          },
          "required": [
            "endpoint"
          ],
          "type": "object"
        },
        "params": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ITrigger": {
      "properties": {
        "description": {
          "type": "string"
        },
        "invocationRole": {
          "type": "string"
        },
        "qualifier": {
          "type": "string"
        },
        "sourceArn": {
          "type": "string"
        },
        "triggerConfig": {
          "anyOf": [
            {
              "$ref": "#/definitions/IOssTriggerConfig"
            },
            {
              "$ref": "#/definitions/ILogTriggerConfig"
            },
            {
              "$ref": "#/definitions/ITimerTriggerConfig"
            },
            {
              "$ref": "#/definitions/IHttpTriggerConfig"
            },
            {
              "$ref": "#/definitions/IMnsTriggerConfig"
            },
            {
              "$ref": "#/definitions/ICdnTriggerConfig"
            },
            {
              "$ref": "#/definitions/IEventBridge"
            },
            {
              "$ref": "#/definitions/IOtsConfig"
            }
          ]
        },
        "triggerName": {
          "type": "string"
        },
        "triggerType": {
          "$ref": "#/definitions/ITriggerType"
        }
      },
      "required": [
        "triggerConfig",
        "triggerName",
        "triggerType"
      ],
      "type": "object"
    },
    "ITriggerType": {
      "enum": [
        "cdn_events",
        "eventbridge",
        "http",
        "log",
        "mns_topic",
        "oss",
        "tablestore",
        "timer"
      ],
      "type": "string"
    },
    "IVpcConfig": {
      "properties": {
        "securityGroupId": {
          "type": "string"
        },
        "vSwitchIds": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "const": "auto",
              "type": "string"
            }
          ]
        },
        "vpcId": {
          "type": "string"
        }
      },
      "required": [
        "securityGroupId",
        "vSwitchIds",
        "vpcId"
      ],
      "type": "object"
    },
    "ICertConfig": {
      "anyOf": [
        {
          "properties": {
            "certName": {
              "type": "string"
            },
            "certificate": {
              "type": "string"
            },
            "privateKey": {
              "type": "string"
            }
          },
          "required": [
            "certName",
            "certificate",
            "privateKey"
          ],
          "type": "object"
        },
        {
          "properties": {
            "certId": {
              "type": "string"
            }
          },
          "required": [
            "certId"
          ],
          "type": "object"
        }
      ]
    },
    "IWafConfig": {
      "properties": {
        "enableWAF": {
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "enableWAF"
      ],
      "type": "object"
    },
    "ITLSConfig": {
      "properties": {
        "minVersion": {
          "type": "string",
          "enum": [
            "TLSv1.0",
            "TLSv1.1",
            "TLSv1.2",
            "TLSv1.3"
          ],
          "default": "TLSv1.0"
        },
        "maxVersion": {
          "type": "string",
          "enum": [
            "TLSv1.0",
            "TLSv1.1",
            "TLSv1.2",
            "TLSv1.3"
          ],
          "default": "TLSv1.3"
        },
        "cipherSuites": {
          "items": {
            "enum": [
              "TLS_RSA_WITH_RC4_128_SHA",
              "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
              "TLS_RSA_WITH_AES_128_CBC_SHA",
              "TLS_RSA_WITH_AES_256_CBC_SHA",
              "TLS_RSA_WITH_AES_128_CBC_SHA256",
              "TLS_RSA_WITH_AES_128_GCM_SHA256",
              "TLS_RSA_WITH_AES_256_GCM_SHA384",
              "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
              "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
              "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
              "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
              "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
              "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
              "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
              "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
              "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
              "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
              "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
              "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
              "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
              "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
              "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
            ],
            "type": "string",
            "default": "TLS_RSA_WITH_RC4_128_SHA"
          },
          "type": "array",
          "default": [
            "TLS_RSA_WITH_RC4_128_SHA",
            "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
            "TLS_RSA_WITH_AES_128_CBC_SHA",
            "TLS_RSA_WITH_AES_256_CBC_SHA",
            "TLS_RSA_WITH_AES_128_CBC_SHA256",
            "TLS_RSA_WITH_AES_128_GCM_SHA256",
            "TLS_RSA_WITH_AES_256_GCM_SHA384",
            "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
            "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
            "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
            "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
            "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
            "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
            "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
            "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
            "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
            "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
            "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
            "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
            "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
            "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
            "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
          ]
        }
      },
      "required": [
        "minVersion",
        "maxVersion",
        "cipherSuites"
      ],
      "type": "object"
    },
    "IRouteConfig": {
      "properties": {
        "routes": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/IPathConfig"
          }
        }
      },
      "required": [
        "routes"
      ],
      "type": "object"
    },
    "IPathConfig": {
      "properties": {
        "functionName": {
          "type": "string",
          "default": "my-func"
        },
        "path": {
          "type": "string",
          "default": "/*"
        },
        "qualifier": {
          "type": "string",
          "default": "LATEST"
        },
        "methods": {
          "items": {
            "enum": [
              "DELETE",
              "GET",
              "HEAD",
              "OPTIONS",
              "PATCH",
              "POST",
              "PUT"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "rewriteConfig": {
          "$ref": "#/definitions/IRewriteConfig"
        }
      },
      "required": [
        "functionName",
        "path"
      ],
      "type": "object"
    },
    "IRewriteConfig": {
      "properties": {
        "equalRules": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/IRules"
          }
        },
        "regexRules": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/IRules"
          }
        },
        "wildcardRules": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/IRules"
          }
        }
      },
      "type": "object"
    },
    "IRules": {
      "type": "object",
      "properties": {
        "match": {
          "type": "string"
        },
        "replacement": {
          "type": "string"
        }
      }
    }
  }
}