# 规范文档参考:
# 中文：https://github.com/Serverless-Devs/Serverless-Devs/blob/master/spec/zh/0.0.2/serverless_package_model/package_model.md#应用模型规范
# English: https://github.com/Serverless-Devs/Serverless-Devs/blob/master/spec/en/0.0.2/serverless_package_model/package_model.md#Application-model-specification
# --------------
# Package 开发发布最佳实践:
#   - [社区讨论 #62](https://github.com/Serverless-Devs/Serverless-Devs/discussions/62);
#   - [社区讨论 #407](https://github.com/Serverless-Devs/Serverless-Devs/discussions/407);
#   - [社区讨论 #439](https://github.com/Serverless-Devs/Serverless-Devs/discussions/439);

Type: Application
Name: start-java11-mongodb
Provider:
  - 阿里云
Version: 0.0.1
Description: 函数计算访问MongoDB
HomePage: https://github.com/devsapp/start-java11-mongodb
Tags: #标签详情
  - MongoDB
  - Java
Category: Web框架
Service: # 使用的服务
  函数计算:
    Authorities:
      - AliyunFCFullAccess
Parameters:
  type: object
  additionalProperties: false # 不允许增加其他属性
  required: # 必填项
    - region
    - serviceName
    - functionName
    - endpoint
    - tableName
    - instanceName
  properties:
    region:
      title: 地域
      type: string
      default: cn-hangzhou
      description: 创建应用所在的地区
      enum:
        - cn-beijing
        - cn-hangzhou
        - cn-shanghai
        - cn-qingdao
        - cn-zhangjiakou
        - cn-huhehaote
        - cn-shenzhen
        - cn-chengdu
        - cn-hongkong
        - ap-southeast-1
        - ap-southeast-2
        - ap-southeast-3
        - ap-southeast-5
        - ap-northeast-1
        - eu-central-1
        - eu-west-1
        - us-west-1
        - us-east-1
        - ap-south-1
    roleArn:
      title: 服务角色
      type: string
      default: ''
      description: 函数执行时所扮演的角色
      x-role:
        type: object
        name: mongodbbackuprole
        pattern: '^acs:ram::[0-9]*:role/.*$'
        service: fc
        description: 应用所属的函数计算服务配置的 role, 请提前创建好对应的 role, 授信函数计算服务, 并配置好 AliyunFCDefaultRolePolicy policy。
        authorities:
          - AliyunFCDefaultRolePolicy
    serviceName:
      title: 服务名
      type: string
      default: start-java11-mongodb
      description: 应用的服务名称
    functionName:
      title: 函数名
      type: string
      default: start-java11-mongodb
      description: 应用的函数名称
    MONGO_URL:
      title: MongoDB 数据库地址
      type: string
      description: 数据库所在地址(mongodb://xxxxxx)
    MONGO_DATABASE:
      title: 数据库名
      type: string
      description: 指定数据库名(users)
