ALIYUN::OOS::ApplicationConnection

更新时间:
复制为 MD 格式

ALIYUN::OOS::ApplicationConnection类型用于创建应用连接。

语法

{
  "Type": "ALIYUN::OOS::ApplicationConnection",
  "Properties": {
    "ConnectionCategory": String,
    "ConnectionType": String,
    "EnvVars": List,
    "Name": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ConnectionCategory

String

应用连接的分类。

取值:

  • Sandbox

  • Memory

  • RAG

  • Gateway

  • MCP

ConnectionType

String

应用连接的类型。

取值:

  • AgentRun

  • AgentScopeRuntime

EnvVars

List

应用连接的环境变量。

更多信息,请参考EnvVars属性。最大长度:100。

Name

String

应用连接的名称。

EnvVars语法

"EnvVars": [
  {
    "Value": String,
    "Key": String
  }
]

EnvVars属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

环境变量的键。

Value

String

环境变量的值。

返回值

Fn::GetAtt

ConnectionId:应用连接的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Name:
    Type: String
    Description:
      en: The name of the application connection.
    Required: true
  ConnectionCategory:
    Type: String
    Description:
      en: The category of the application connection.
    AllowedValues:
      - Sandbox
      - Memory
      - RAG
      - Gateway
      - MCP
    Required: true
  ConnectionType:
    Type: String
    Description:
      en: The type of the application connection.
    AllowedValues:
      - AgentRun
      - AgentScopeRuntime
    Required: true
  EnvVars:
    Description:
      en: The environment variables of the application connection.
    Required: true
    Type: Json
    MaxLength: 100
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        Key:
          Type: String
          Description:
            en: The key of the environment variable.
          Required: true
        Value:
          Type: String
          Description:
            en: The value of the environment variable.
          Required: true
Resources:
  ApplicationConnection:
    Type: ALIYUN::OOS::ApplicationConnection
    Properties:
      Name:
        Ref: Name
      ConnectionCategory:
        Ref: ConnectionCategory
      ConnectionType:
        Ref: ConnectionType
      EnvVars:
        Ref: EnvVars
Outputs:
  ConnectionId:
    Value:
      Fn::GetAtt:
        - ApplicationConnection
        - ConnectionId
    Description: The ID of the application connection.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the application connection."
      },
      "Required": true
    },
    "ConnectionCategory": {
      "Type": "String",
      "Description": {
        "en": "The category of the application connection."
      },
      "AllowedValues": [
        "Sandbox",
        "Memory",
        "RAG",
        "Gateway",
        "MCP"
      ],
      "Required": true
    },
    "ConnectionType": {
      "Type": "String",
      "Description": {
        "en": "The type of the application connection."
      },
      "AllowedValues": [
        "AgentRun",
        "AgentScopeRuntime"
      ],
      "Required": true
    },
    "EnvVars": {
      "Description": {
        "en": "The environment variables of the application connection."
      },
      "Required": true,
      "Type": "Json",
      "MaxLength": 100,
      "AssociationProperty": "List[Parameters]",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Key": {
            "Type": "String",
            "Description": {
              "en": "The key of the environment variable."
            },
            "Required": true
          },
          "Value": {
            "Type": "String",
            "Description": {
              "en": "The value of the environment variable."
            },
            "Required": true
          }
        }
      }
    }
  },
  "Resources": {
    "ApplicationConnection": {
      "Type": "ALIYUN::OOS::ApplicationConnection",
      "Properties": {
        "Name": {
          "Ref": "Name"
        },
        "ConnectionCategory": {
          "Ref": "ConnectionCategory"
        },
        "ConnectionType": {
          "Ref": "ConnectionType"
        },
        "EnvVars": {
          "Ref": "EnvVars"
        }
      }
    }
  },
  "Outputs": {
    "ConnectionId": {
      "Value": {
        "Fn::GetAtt": [
          "ApplicationConnection",
          "ConnectionId"
        ]
      },
      "Description": "The ID of the application connection."
    }
  }
}