ALIYUN::SAE::SlbBinding类型用于为应用绑定SLB。
语法
{
"Type": "ALIYUN::SAE::SlbBinding",
"Properties": {
"InternetSlbId": String,
"AppId": String,
"Intranet": String,
"IntranetSlbId": String,
"Internet": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|
InternetSlbId | String | 否 | 否 | 公网SLB ID。 | 目前只支持非共享型实例 。 |
AppId | String | 是 | 否 | 部署成功的目标应用ID。 | 无 |
Intranet | String | 否 | 否 | 绑定私网SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示将容器的8080端口通过SLB的80端口暴露服务,协议为TCP。 | 无 |
IntranetSlbId | String | 否 | 否 | 私网SLB ID。 | 目前只支持非共享型实例。 |
Internet | String | 否 | 否 | 绑定公网SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示将容器的8080端口通过SLB的80端口暴露服务,协议为TCP。 | 无 |
返回值
Fn::GetAtt
- AppId:应用ID。
- ChangeOrderId:发布单ID,用于查询任务执行状态。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SlbInstanceId:
AssociationProperty: ALIYUN::SLB::Instance::InstanceId
Type: String
AppId:
Type: String
Description: Successful application deployment target ID
Resources:
SlbBinding:
Type: ALIYUN::SAE::SlbBinding
Properties:
AppId:
Ref: AppId
InternetSlbId:
Ref: SlbInstanceId
Outputs:
AppId:
Description: Successful application deployment target ID
Value:
Fn::GetAtt:
- SlbBinding
- AppId
ChangeOrderId:
Description: Return to release a single ID, used to query task execution status.
Value:
Fn::GetAtt:
- SlbBinding
- ChangeOrderId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SlbInstanceId":{
"AssociationProperty":"ALIYUN::SLB::Instance::InstanceId",
"Type":"String",
},
"AppId": {
"Type": "String",
"Description": "Successful application deployment target ID"
}
},
"Resources": {
"SlbBinding": {
"Type": "ALIYUN::SAE::SlbBinding",
"Properties": {
"AppId": {
"Ref": "AppId"
},
"InternetSlbId": {
"Ref": "SlbInstanceId"
}
}
}
},
"Outputs": {
"AppId": {
"Description": "Successful application deployment target ID",
"Value": {
"Fn::GetAtt": [
"SlbBinding",
"AppId"
]
}
},
"ChangeOrderId": {
"Description": "Return to release a single ID, used to query task execution status.",
"Value": {
"Fn::GetAtt": [
"SlbBinding",
"ChangeOrderId"
]
}
}
}
}