ALIYUN::OOS::ApplicationConnection类型用于创建应用连接。
语法
{
"Type": "ALIYUN::OOS::ApplicationConnection",
"Properties": {
"ConnectionCategory": String,
"ConnectionType": String,
"EnvVars": List,
"Name": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ConnectionCategory |
String |
是 |
否 |
应用连接的分类。 |
取值:
|
|
ConnectionType |
String |
是 |
否 |
应用连接的类型。 |
取值:
|
|
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."
}
}
}该文章对您有帮助吗?