ALIYUN::EventBridge::Connection类型用于创建连接配置信息。
语法
{
"Type": "ALIYUN::EventBridge::Connection",
"Properties": {
"ConnectionName": String,
"NetworkParameters": Map,
"AuthParameters": Map,
"Description": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ConnectionName |
String |
是 |
否 |
连接配置名称。 |
最大长度为 127 个字符,最小长度为 2 个字符。 |
|
NetworkParameters |
Map |
是 |
是 |
网络配置数据结构。 |
更多信息,请参考NetworkParameters属性。 |
|
AuthParameters |
Map |
否 |
是 |
认证数据结构。 |
更多信息,请参考AuthParameters属性。 |
|
Description |
String |
否 |
是 |
连接配置描述。 |
最大长度为 255 个字符。 |
AuthParameters语法
"AuthParameters": {
"OauthParameters": Map,
"BasicAuthParameters": Map,
"ApiKeyAuthParameters": Map,
"AuthorizationType": String
}
AuthParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ApiKeyAuthParameters |
Map |
否 |
是 |
API KEY 数据结构。 |
更多信息,请参考ApiKeyAuthParameters属性。 |
|
AuthorizationType |
String |
否 |
是 |
认证类型。 |
BASIC:BASIC_AUTH 说明:该授权方式是浏览器遵循 HTTP 协议实现的基本授权方式。在 HTTP 协议通信过程中,HTTP 协议定义了基本认证方式,允许 HTTP 服务器对客户端进行用户身份验证。在请求头中添加 Authorization:Basic 加密(用户名:密码)的固定格式(Base64 编码)。 1. 用户名和密码为必填项。 API KEY:API_KEY_AUTH 说明: 固定格式,在请求头中添加 Token:Token 值。 - ApiKeyName 和 ApiKeyValue 为必填项。 OAUTH:OAUTH_AUTH 说明: OAuth2.0 是一种授权机制。通常情况下,对于未使用 OAuth2.0 等授权机制的系统,客户端可以直接访问资源服务器的资源。为了让用户能够安全地访问数据,在访问过程中加入了 Access Token 机制。客户端需携带 Access Token 才能访问受保护的资源。因此,OAuth2.0 确保资源不会被恶意客户端访问,从而提高了系统的安全性。 - AuthorizationEndpoint、oauthttpparameters 和 HttpMethod 为必填项。 |
|
BasicAuthParameters |
Map |
否 |
是 |
基本认证数据结构。 |
更多信息,请参考BasicAuthParameters属性。 |
|
OauthParameters |
Map |
否 |
是 |
OAuth 认证参数数据结构。 |
更多信息,请参考OauthParameters属性。 |
OauthParameters语法
"OauthParameters": {
"ClientParameters": Map,
"OauthHttpParameters": Map,
"AuthorizationEndpoint": String,
"HttpMethod": String
}
OauthParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
AuthorizationEndpoint |
String |
否 |
是 |
授权端点地址, |
最大长度为 127 个字符。 |
|
ClientParameters |
Map |
否 |
是 |
自定义参数数据结构。 |
更多信息,请参考ClientParameters属性。 |
|
HttpMethod |
String |
否 |
是 |
探测类型的方法。 |
取值:
|
|
OauthHttpParameters |
Map |
否 |
是 |
OAuth 认证请求参数。 |
更多信息,请参考OauthHttpParameters属性。 |
ClientParameters语法
"ClientParameters": {
"ClientSecret": String,
"ClientId": String
}
ClientParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ClientId |
String |
否 |
是 |
客户端 ID。 |
无 |
|
ClientSecret |
String |
否 |
是 |
应用的客户端密钥。 |
无 |
OauthHttpParameters语法
"OauthHttpParameters": {
"HeaderParameters": List,
"QueryStringParameters": List,
"BodyParameters": List
}
OauthHttpParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
BodyParameters |
List |
否 |
是 |
请求体参数数据结构列表。 |
更多信息,请参考BodyParameters属性。 |
|
HeaderParameters |
List |
否 |
是 |
请求头参数列表。 |
更多信息,请参考HeaderParameters属性。 |
|
QueryStringParameters |
List |
否 |
是 |
请求路径参数的数据结构。 |
更多信息,请参考QueryStringParameters属性。 |
HeaderParameters语法
"HeaderParameters": [
{
"IsValueSecret": Boolean,
"Value": String,
"Key": String
}
]
HeaderParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
IsValueSecret |
Boolean |
否 |
是 |
是否需要认证。 |
无 |
|
Key |
String |
否 |
是 |
请求头的参数键。 |
无 |
|
Value |
String |
否 |
是 |
请求头参数值。 |
无 |
QueryStringParameters语法
"QueryStringParameters": [
{
"IsValueSecret": Boolean,
"Value": String,
"Key": String
}
]
QueryStringParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
IsValueSecret |
Boolean |
否 |
是 |
None 是否需要认证。 |
无 |
|
值 |
String |
否 |
是 |
None 请求路径参数值。 |
无 |
|
键 |
String |
否 |
是 |
None 请求路径参数键。 |
无 |
BodyParameters语法
"BodyParameters": [
{
"IsValueSecret": Boolean,
"Value": String,
"Key": String
}
]
BodyParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
IsValueSecret |
Boolean |
否 |
是 |
是否需要认证。 |
无 |
|
值 |
String |
否 |
是 |
请求体参数的值。 |
无 |
|
键 |
String |
否 |
是 |
请求体参数的键。 |
无 |
BasicAuthParameters语法
"BasicAuthParameters": {
"Username": String,
"Password": String
}
BasicAuthParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Password |
String |
否 |
是 |
基本认证密码。 |
无 |
|
Username |
String |
否 |
是 |
基本认证用户名。 |
无 |
ApiKeyAuthParameters语法
"ApiKeyAuthParameters": {
"ApiKeyValue": String,
"ApiKeyName": String
}
ApiKeyAuthParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ApiKeyName |
String |
否 |
是 |
API 密钥的键值。 |
无 |
|
ApiKeyValue |
String |
否 |
是 |
API 密钥值。 |
无 |
NetworkParameters语法
"NetworkParameters": {
"VpcId": String,
"NetworkType": String,
"SecurityGroupId": String,
"VswitcheId": String
}
NetworkParameters属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
NetworkType |
String |
是 |
是 |
网络类型。 |
取值:
- 提示:选择 VPC 时,VpcId、VswitcheId 和 SecurityGroupId 为必填项。 |
|
SecurityGroupId |
String |
否 |
是 |
安全组 ID。 |
无 |
|
VpcId |
String |
否 |
是 |
VPC 的 ID。 |
无 |
|
VswitcheId |
String |
否 |
是 |
交换机 ID。 |
无 |
返回值
Fn::GetAtt
-
ConnectionName:连接配置名称,最大长度为 127 个字符,最小长度为 2 个字符。
-
AuthParameters:认证数据结构。
-
Description:连接配置描述,最大长度为 255 个字符。
-
NetworkParameters:网络配置数据结构。
-
CreateTime:资源的创建时间。
示例
场景 1 :创建使用Basic Auth认证的公网EventBridge连接。
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建使用Basic Auth认证的公网EventBridge连接。
en: Create a public network EventBridge connection with Basic Auth.
Parameters:
ConnectionName:
Type: String
Label:
zh-cn: 连接名称
en: Connection Name
Description:
zh-cn: EventBridge连接配置的名称,2~127个字符。
en: The name of the EventBridge connection, 2 to 127 characters.
MinLength: 2
MaxLength: 127
Default: basic-auth-connection
Username:
Type: String
Label:
zh-cn: 认证用户名
en: Auth Username
Description:
zh-cn: Basic Auth认证的用户名。
en: Username for Basic Auth authentication.
MinLength: 1
Password:
Type: String
Label:
zh-cn: 认证密码
en: Auth Password
Description:
zh-cn: Basic Auth认证的密码。
en: Password for Basic Auth authentication.
NoEcho: true
MinLength: 1
Resources:
Connection:
Type: ALIYUN::EventBridge::Connection
Properties:
ConnectionName:
Ref: ConnectionName
Description: Basic Auth公网连接,用于对接外部Webhook服务。
NetworkParameters:
NetworkType: PublicNetwork
AuthParameters:
AuthorizationType: BASIC_AUTH
BasicAuthParameters:
Username:
Ref: Username
Password:
Ref: Password
Outputs:
ConnectionName:
Label:
zh-cn: 连接名称
en: Connection Name
Description:
zh-cn: 创建成功的连接配置名称。
en: The name of the created connection.
Value:
Fn::GetAtt:
- Connection
- ConnectionName
CreateTime:
Label:
zh-cn: 创建时间
en: Create Time
Value:
Fn::GetAtt:
- Connection
- CreateTime{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "创建使用Basic Auth认证的公网EventBridge连接。",
"en": "Create a public network EventBridge connection with Basic Auth."
},
"Parameters": {
"ConnectionName": {
"Type": "String",
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Description": {
"zh-cn": "EventBridge连接配置的名称,2~127个字符。",
"en": "The name of the EventBridge connection, 2 to 127 characters."
},
"MinLength": 2,
"MaxLength": 127,
"Default": "basic-auth-connection"
},
"Username": {
"Type": "String",
"Label": {
"zh-cn": "认证用户名",
"en": "Auth Username"
},
"Description": {
"zh-cn": "Basic Auth认证的用户名。",
"en": "Username for Basic Auth authentication."
},
"MinLength": 1
},
"Password": {
"Type": "String",
"Label": {
"zh-cn": "认证密码",
"en": "Auth Password"
},
"Description": {
"zh-cn": "Basic Auth认证的密码。",
"en": "Password for Basic Auth authentication."
},
"NoEcho": true,
"MinLength": 1
}
},
"Resources": {
"Connection": {
"Type": "ALIYUN::EventBridge::Connection",
"Properties": {
"ConnectionName": {
"Ref": "ConnectionName"
},
"Description": "Basic Auth公网连接,用于对接外部Webhook服务。",
"NetworkParameters": {
"NetworkType": "PublicNetwork"
},
"AuthParameters": {
"AuthorizationType": "BASIC_AUTH",
"BasicAuthParameters": {
"Username": {
"Ref": "Username"
},
"Password": {
"Ref": "Password"
}
}
}
}
}
},
"Outputs": {
"ConnectionName": {
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Description": {
"zh-cn": "创建成功的连接配置名称。",
"en": "The name of the created connection."
},
"Value": {
"Fn::GetAtt": [
"Connection",
"ConnectionName"
]
}
},
"CreateTime": {
"Label": {
"zh-cn": "创建时间",
"en": "Create Time"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"CreateTime"
]
}
}
}
}场景 2 :创建使用API Key认证的VPC私网EventBridge连接。
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建使用API Key认证的VPC私网EventBridge连接。
en: Create a VPC private network EventBridge connection with API Key auth.
Parameters:
ConnectionName:
Type: String
Label:
zh-cn: 连接名称
en: Connection Name
Description:
zh-cn: EventBridge连接配置的名称,2~127个字符。
en: The name of the EventBridge connection, 2 to 127 characters.
MinLength: 2
MaxLength: 127
Default: apikey-vpc-connection
VpcId:
Type: String
Label:
zh-cn: VPC ID
en: VPC ID
Description:
zh-cn: EventBridge连接所在的VPC ID。
en: The VPC ID for the EventBridge connection.
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VswitcheId:
Type: String
Label:
zh-cn: 交换机ID
en: VSwitch ID
Description:
zh-cn: VPC中的交换机ID。
en: The VSwitch ID within the VPC.
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
SecurityGroupId:
Type: String
Label:
zh-cn: 安全组ID
en: Security Group ID
Description:
zh-cn: VPC中的安全组ID,需允许EventBridge访问目标服务端口。
en: Security group ID in the VPC. Must allow EventBridge to access target service port.
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
ApiKeyName:
Type: String
Label:
zh-cn: API Key名称
en: API Key Name
Description:
zh-cn: API Key的键名,将作为请求头的Header名称传递。
en: The key name of the API Key, passed as a request header name.
Default: X-Api-Key
ApiKeyValue:
Type: String
Label:
zh-cn: API Key值
en: API Key Value
Description:
zh-cn: API Key的值,将作为请求头的Header值传递。
en: The value of the API Key, passed as the request header value.
NoEcho: true
MinLength: 1
Resources:
Connection:
Type: ALIYUN::EventBridge::Connection
Properties:
ConnectionName:
Ref: ConnectionName
Description:
Fn::Sub: API Key私网连接 - VPC ${VpcId}
NetworkParameters:
NetworkType: PrivateNetwork
VpcId:
Ref: VpcId
VswitcheId:
Ref: VswitcheId
SecurityGroupId:
Ref: SecurityGroupId
AuthParameters:
AuthorizationType: API_KEY_AUTH
ApiKeyAuthParameters:
ApiKeyName:
Ref: ApiKeyName
ApiKeyValue:
Ref: ApiKeyValue
Outputs:
ConnectionName:
Label:
zh-cn: 连接名称
en: Connection Name
Value:
Fn::GetAtt:
- Connection
- ConnectionName
NetworkParameters:
Label:
zh-cn: 网络配置
en: Network Parameters
Description:
zh-cn: 连接的网络配置信息,包含VPC、交换机和安全组。
en: Network configuration including VPC, VSwitch and security group.
Value:
Fn::GetAtt:
- Connection
- NetworkParameters
CreateTime:
Label:
zh-cn: 创建时间
en: Create Time
Value:
Fn::GetAtt:
- Connection
- CreateTime{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "创建使用API Key认证的VPC私网EventBridge连接。",
"en": "Create a VPC private network EventBridge connection with API Key auth."
},
"Parameters": {
"ConnectionName": {
"Type": "String",
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Description": {
"zh-cn": "EventBridge连接配置的名称,2~127个字符。",
"en": "The name of the EventBridge connection, 2 to 127 characters."
},
"MinLength": 2,
"MaxLength": 127,
"Default": "apikey-vpc-connection"
},
"VpcId": {
"Type": "String",
"Label": {
"zh-cn": "VPC ID",
"en": "VPC ID"
},
"Description": {
"zh-cn": "EventBridge连接所在的VPC ID。",
"en": "The VPC ID for the EventBridge connection."
},
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VswitcheId": {
"Type": "String",
"Label": {
"zh-cn": "交换机ID",
"en": "VSwitch ID"
},
"Description": {
"zh-cn": "VPC中的交换机ID。",
"en": "The VSwitch ID within the VPC."
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"SecurityGroupId": {
"Type": "String",
"Label": {
"zh-cn": "安全组ID",
"en": "Security Group ID"
},
"Description": {
"zh-cn": "VPC中的安全组ID,需允许EventBridge访问目标服务端口。",
"en": "Security group ID in the VPC. Must allow EventBridge to access target service port."
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"ApiKeyName": {
"Type": "String",
"Label": {
"zh-cn": "API Key名称",
"en": "API Key Name"
},
"Description": {
"zh-cn": "API Key的键名,将作为请求头的Header名称传递。",
"en": "The key name of the API Key, passed as a request header name."
},
"Default": "X-Api-Key"
},
"ApiKeyValue": {
"Type": "String",
"Label": {
"zh-cn": "API Key值",
"en": "API Key Value"
},
"Description": {
"zh-cn": "API Key的值,将作为请求头的Header值传递。",
"en": "The value of the API Key, passed as the request header value."
},
"NoEcho": true,
"MinLength": 1
}
},
"Resources": {
"Connection": {
"Type": "ALIYUN::EventBridge::Connection",
"Properties": {
"ConnectionName": {
"Ref": "ConnectionName"
},
"Description": {
"Fn::Sub": "API Key私网连接 - VPC ${VpcId}"
},
"NetworkParameters": {
"NetworkType": "PrivateNetwork",
"VpcId": {
"Ref": "VpcId"
},
"VswitcheId": {
"Ref": "VswitcheId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
}
},
"AuthParameters": {
"AuthorizationType": "API_KEY_AUTH",
"ApiKeyAuthParameters": {
"ApiKeyName": {
"Ref": "ApiKeyName"
},
"ApiKeyValue": {
"Ref": "ApiKeyValue"
}
}
}
}
}
},
"Outputs": {
"ConnectionName": {
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"ConnectionName"
]
}
},
"NetworkParameters": {
"Label": {
"zh-cn": "网络配置",
"en": "Network Parameters"
},
"Description": {
"zh-cn": "连接的网络配置信息,包含VPC、交换机和安全组。",
"en": "Network configuration including VPC, VSwitch and security group."
},
"Value": {
"Fn::GetAtt": [
"Connection",
"NetworkParameters"
]
}
},
"CreateTime": {
"Label": {
"zh-cn": "创建时间",
"en": "Create Time"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"CreateTime"
]
}
}
}
}场景 3 :创建使用OAuth 2.0认证的VPC私网EventBridge连接,配置完整的授权参数。
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建使用OAuth 2.0认证的VPC私网EventBridge连接,配置完整的授权参数。
en: Create a VPC EventBridge connection with OAuth 2.0 and full authorization config.
Parameters:
ConnectionName:
Type: String
Label:
zh-cn: 连接名称
en: Connection Name
Description:
zh-cn: EventBridge连接配置的名称,2~127个字符。
en: The name of the EventBridge connection, 2 to 127 characters.
MinLength: 2
MaxLength: 127
Default: oauth-vpc-connection
Description:
Type: String
Label:
zh-cn: 连接描述
en: Connection Description
Description:
zh-cn: 连接配置的描述信息,最大255个字符。
en: Connection description, up to 255 characters.
MaxLength: 255
Default: OAuth 2.0私网连接,对接企业SaaS平台。
VpcId:
Type: String
Label:
zh-cn: VPC ID
en: VPC ID
Description:
zh-cn: EventBridge连接所在的VPC ID。
en: The VPC ID for the EventBridge connection.
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VswitcheId:
Type: String
Label:
zh-cn: 交换机ID
en: VSwitch ID
Description:
zh-cn: VPC中的交换机ID。
en: The VSwitch ID within the VPC.
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: ${VpcId}
SecurityGroupId:
Type: String
Label:
zh-cn: 安全组ID
en: Security Group ID
Description:
zh-cn: VPC中的安全组ID。
en: Security group ID in the VPC.
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
AuthorizationEndpoint:
Type: String
Label:
zh-cn: OAuth授权端点
en: Authorization Endpoint
Description:
zh-cn: >-
OAuth 2.0的Token获取端点地址,最大127个字符。
例如:https://auth.example.com/oauth/token
en: >-
OAuth 2.0 token endpoint URL, up to 127 characters.
e.g. https://auth.example.com/oauth/token
MaxLength: 127
HttpMethod:
Type: String
Label:
zh-cn: 授权请求方法
en: Auth Request Method
Description:
zh-cn: 获取OAuth Token时使用的HTTP方法。
en: HTTP method used to obtain the OAuth token.
Default: POST
AllowedValues:
- GET
- POST
- PUT
ClientId:
Type: String
Label:
zh-cn: 客户端ID
en: Client ID
Description:
zh-cn: OAuth 2.0应用的客户端ID。
en: The client ID of the OAuth 2.0 application.
MinLength: 1
ClientSecret:
Type: String
Label:
zh-cn: 客户端密钥
en: Client Secret
Description:
zh-cn: OAuth 2.0应用的客户端密钥。
en: The client secret of the OAuth 2.0 application.
NoEcho: true
MinLength: 1
Resources:
Connection:
Type: ALIYUN::EventBridge::Connection
Properties:
ConnectionName:
Ref: ConnectionName
Description:
Ref: Description
NetworkParameters:
NetworkType: PrivateNetwork
VpcId:
Ref: VpcId
VswitcheId:
Ref: VswitcheId
SecurityGroupId:
Ref: SecurityGroupId
AuthParameters:
AuthorizationType: OAUTH_AUTH
OauthParameters:
AuthorizationEndpoint:
Ref: AuthorizationEndpoint
HttpMethod:
Ref: HttpMethod
ClientParameters:
ClientId:
Ref: ClientId
ClientSecret:
Ref: ClientSecret
OauthHttpParameters:
HeaderParameters:
- Key: Content-Type
Value: application/x-www-form-urlencoded
IsValueSecret: false
BodyParameters:
- Key: grant_type
Value: client_credentials
IsValueSecret: false
- Key: scope
Value: events:write
IsValueSecret: false
Outputs:
ConnectionName:
Label:
zh-cn: 连接名称
en: Connection Name
Value:
Fn::GetAtt:
- Connection
- ConnectionName
NetworkParameters:
Label:
zh-cn: 网络配置
en: Network Parameters
Value:
Fn::GetAtt:
- Connection
- NetworkParameters
AuthParameters:
Label:
zh-cn: 认证配置
en: Auth Parameters
Description:
zh-cn: 连接的OAuth 2.0认证配置信息。
en: The OAuth 2.0 authentication configuration of the connection.
Value:
Fn::GetAtt:
- Connection
- AuthParameters
CreateTime:
Label:
zh-cn: 创建时间
en: Create Time
Value:
Fn::GetAtt:
- Connection
- CreateTime{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "创建使用OAuth 2.0认证的VPC私网EventBridge连接,配置完整的授权参数。",
"en": "Create a VPC EventBridge connection with OAuth 2.0 and full authorization config."
},
"Parameters": {
"ConnectionName": {
"Type": "String",
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Description": {
"zh-cn": "EventBridge连接配置的名称,2~127个字符。",
"en": "The name of the EventBridge connection, 2 to 127 characters."
},
"MinLength": 2,
"MaxLength": 127,
"Default": "oauth-vpc-connection"
},
"Description": {
"Type": "String",
"Label": {
"zh-cn": "连接描述",
"en": "Connection Description"
},
"Description": {
"zh-cn": "连接配置的描述信息,最大255个字符。",
"en": "Connection description, up to 255 characters."
},
"MaxLength": 255,
"Default": "OAuth 2.0私网连接,对接企业SaaS平台。"
},
"VpcId": {
"Type": "String",
"Label": {
"zh-cn": "VPC ID",
"en": "VPC ID"
},
"Description": {
"zh-cn": "EventBridge连接所在的VPC ID。",
"en": "The VPC ID for the EventBridge connection."
},
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VswitcheId": {
"Type": "String",
"Label": {
"zh-cn": "交换机ID",
"en": "VSwitch ID"
},
"Description": {
"zh-cn": "VPC中的交换机ID。",
"en": "The VSwitch ID within the VPC."
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"SecurityGroupId": {
"Type": "String",
"Label": {
"zh-cn": "安全组ID",
"en": "Security Group ID"
},
"Description": {
"zh-cn": "VPC中的安全组ID。",
"en": "Security group ID in the VPC."
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"AuthorizationEndpoint": {
"Type": "String",
"Label": {
"zh-cn": "OAuth授权端点",
"en": "Authorization Endpoint"
},
"Description": {
"zh-cn": "OAuth 2.0的Token获取端点地址,最大127个字符。例如:https://auth.example.com/oauth/token",
"en": "OAuth 2.0 token endpoint URL, up to 127 characters. e.g. https://auth.example.com/oauth/token"
},
"MaxLength": 127
},
"HttpMethod": {
"Type": "String",
"Label": {
"zh-cn": "授权请求方法",
"en": "Auth Request Method"
},
"Description": {
"zh-cn": "获取OAuth Token时使用的HTTP方法。",
"en": "HTTP method used to obtain the OAuth token."
},
"Default": "POST",
"AllowedValues": [
"GET",
"POST",
"PUT"
]
},
"ClientId": {
"Type": "String",
"Label": {
"zh-cn": "客户端ID",
"en": "Client ID"
},
"Description": {
"zh-cn": "OAuth 2.0应用的客户端ID。",
"en": "The client ID of the OAuth 2.0 application."
},
"MinLength": 1
},
"ClientSecret": {
"Type": "String",
"Label": {
"zh-cn": "客户端密钥",
"en": "Client Secret"
},
"Description": {
"zh-cn": "OAuth 2.0应用的客户端密钥。",
"en": "The client secret of the OAuth 2.0 application."
},
"NoEcho": true,
"MinLength": 1
}
},
"Resources": {
"Connection": {
"Type": "ALIYUN::EventBridge::Connection",
"Properties": {
"ConnectionName": {
"Ref": "ConnectionName"
},
"Description": {
"Ref": "Description"
},
"NetworkParameters": {
"NetworkType": "PrivateNetwork",
"VpcId": {
"Ref": "VpcId"
},
"VswitcheId": {
"Ref": "VswitcheId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
}
},
"AuthParameters": {
"AuthorizationType": "OAUTH_AUTH",
"OauthParameters": {
"AuthorizationEndpoint": {
"Ref": "AuthorizationEndpoint"
},
"HttpMethod": {
"Ref": "HttpMethod"
},
"ClientParameters": {
"ClientId": {
"Ref": "ClientId"
},
"ClientSecret": {
"Ref": "ClientSecret"
}
},
"OauthHttpParameters": {
"HeaderParameters": [
{
"Key": "Content-Type",
"Value": "application/x-www-form-urlencoded",
"IsValueSecret": false
}
],
"BodyParameters": [
{
"Key": "grant_type",
"Value": "client_credentials",
"IsValueSecret": false
},
{
"Key": "scope",
"Value": "events:write",
"IsValueSecret": false
}
]
}
}
}
}
}
},
"Outputs": {
"ConnectionName": {
"Label": {
"zh-cn": "连接名称",
"en": "Connection Name"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"ConnectionName"
]
}
},
"NetworkParameters": {
"Label": {
"zh-cn": "网络配置",
"en": "Network Parameters"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"NetworkParameters"
]
}
},
"AuthParameters": {
"Label": {
"zh-cn": "认证配置",
"en": "Auth Parameters"
},
"Description": {
"zh-cn": "连接的OAuth 2.0认证配置信息。",
"en": "The OAuth 2.0 authentication configuration of the connection."
},
"Value": {
"Fn::GetAtt": [
"Connection",
"AuthParameters"
]
}
},
"CreateTime": {
"Label": {
"zh-cn": "创建时间",
"en": "Create Time"
},
"Value": {
"Fn::GetAtt": [
"Connection",
"CreateTime"
]
}
}
}
}