All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::EventBridge::Connection

Last Updated:Jul 22, 2026

ALIYUN::EventBridge::Connection is used to create connection configurations.

Syntax

{
  "Type": "ALIYUN::EventBridge::Connection",
  "Properties": {
    "ConnectionName": String,
    "NetworkParameters": Map,
    "AuthParameters": Map,
    "Description": String
  }
}

Properties

Property Type Required Editable Description Constraints
ConnectionName String Yes No Connection configuration name. Maximum length: 127 characters. Minimum length: 2 characters.
NetworkParameters Map Yes Yes Network configuration data structure. For more information, see the NetworkParameters properties.
AuthParameters Map No Yes Authentication data structure. For more information, see the AuthParameters properties.
Description String No Yes Connection configuration description. Maximum length: 255 characters.

AuthParameters syntax

"AuthParameters": {
  "OauthParameters": Map,
  "BasicAuthParameters": Map,
  "ApiKeyAuthParameters": Map,
  "AuthorizationType": String
}

AuthParameters properties

Property Type Required Editable Description Constraints
ApiKeyAuthParameters Map No Yes API KEY data structure. For more information, see the ApiKeyAuthParameters properties.
AuthorizationType String No Yes Authentication type. Valid values:
  • BASIC_AUTH: basic authentication. Adds Authorization: Basic Base64(username:password) to the request header. Username and Password are required.

  • API_KEY_AUTH: API key authentication. Adds Token: token_value to the request header. ApiKeyName and ApiKeyValue are required.

  • OAUTH_AUTH: OAuth 2.0 authorization. Uses an Access Token mechanism to access protected resources securely. AuthorizationEndpoint, OauthHttpParameters, and HttpMethod are required.

BasicAuthParameters Map No Yes Basic authentication data structure. For more information, see the BasicAuthParameters properties.
OauthParameters Map No Yes OAuth authentication parameters data structure. For more information, see the OauthParameters properties.

OauthParameters syntax

"OauthParameters": {
  "ClientParameters": Map,
  "OauthHttpParameters": Map,
  "AuthorizationEndpoint": String,
  "HttpMethod": String
}

OauthParameters properties

Property Type Required Editable Description Constraints
AuthorizationEndpoint String No Yes Authorization endpoint address. Maximum length: 127 characters.
ClientParameters Map No Yes Custom parameters data structure. For more information, see the ClientParameters properties.
HttpMethod String No Yes Method for probe type. Valid values: GET, POST, HEAD, DELETE, PUT, and PATCH.
OauthHttpParameters Map No Yes OAuth authentication request parameters. For more information, see the OauthHttpParameters properties.

ClientParameters syntax

"ClientParameters": {
  "ClientSecret": String,
  "ClientId": String
}

ClientParameters properties

Property Type Required Editable Description Constraints
ClientId String No Yes Client ID. None.
ClientSecret String No Yes Application client secret. None.

OauthHttpParameters syntax

"OauthHttpParameters": {
  "HeaderParameters": List,
  "QueryStringParameters": List,
  "BodyParameters": List
}

OauthHttpParameters properties

Property Type Required Editable Description Constraints
BodyParameters List No Yes Request body parameter data structure list. For more information, see the BodyParameters properties.
HeaderParameters List No Yes Request header parameter list. For more information, see the HeaderParameters properties.
QueryStringParameters List No Yes Request path parameter data structure. For more information, see the QueryStringParameters properties.

HeaderParameters syntax

"HeaderParameters": [
  {
    "IsValueSecret": Boolean,
    "Value": String,
    "Key": String
  }
]

HeaderParameters properties

Property Type Required Editable Description Constraints
IsValueSecret Boolean No Yes Whether authentication is required. None.
Key String No Yes Request header parameter key. None.
Value String No Yes Request header parameter value. None.

QueryStringParameters syntax

"QueryStringParameters": [
  {
    "IsValueSecret": Boolean,
    "Value": String,
    "Key": String
  }
]

QueryStringParameters properties

Property Type Required Editable Description Constraints
IsValueSecret Boolean No Yes Whether authentication is required. None.
Key String No Yes Request path parameter key. None.
Value String No Yes Request path parameter value. None.

BodyParameters syntax

"BodyParameters": [
  {
    "IsValueSecret": Boolean,
    "Value": String,
    "Key": String
  }
]

BodyParameters properties

Property Type Required Editable Description Constraints
IsValueSecret Boolean No Yes Whether authentication is required. None.
Key String No Yes Request body parameter key. None.
Value String No Yes Request body parameter value. None.

BasicAuthParameters syntax

"BasicAuthParameters": {
  "Username": String,
  "Password": String
}

BasicAuthParameters properties

Property Type Required Editable Description Constraints
Password String No Yes Basic authentication password. None.
Username String No Yes Basic authentication username. None.

ApiKeyAuthParameters syntax

"ApiKeyAuthParameters": {
  "ApiKeyValue": String,
  "ApiKeyName": String
}

ApiKeyAuthParameters properties

Property Type Required Editable Description Constraints
ApiKeyName String No Yes API key name. None.
ApiKeyValue String No Yes API key value. None.

NetworkParameters syntax

"NetworkParameters": {
  "VpcId": String,
  "NetworkType": String,
  "SecurityGroupId": String,
  "VswitcheId": String
}

NetworkParameters properties

Property Type Required Editable Description Constraints
NetworkType String Yes Yes Network type. Valid values:
  • PublicNetwork: public network.

  • PrivateNetwork: private network.

Note: If you select PrivateNetwork, VpcId, VswitcheId, and SecurityGroupId are required.
SecurityGroupId String No Yes Security group ID. None.
VpcId String No Yes VPC ID. None.
VswitcheId String No Yes VSwitch ID. None.

Return values

Fn::GetAtt

  • ConnectionName: The name of the connection configuration.

  • AuthParameters: The authentication data structure.

  • Description: The description of the connection configuration.

  • NetworkParameters: The network configuration data structure.

  • CreateTime: The time when the resource was created.

Examples

Scenario 1: Create a public network EventBridge connection with Basic Auth authentication

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"
        ]
      }
    }
  }
}

Scenario 2: Create a VPC private network EventBridge connection with API Key authentication

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"
        ]
      }
    }
  }
}

Scenario 3: Create a VPC private network EventBridge connection with OAuth 2.0 authentication, with complete authorization parameters configured

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"
        ]
      }
    }
  }
}