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,用于查询任务执行状态。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InternetSlbId": {
"Type": "String",
"Description": "Use SLB purchased specified, currently only supports non-shared examples"
},
"AppId": {
"Type": "String",
"Description": "Successful application deployment target ID"
},
"Intranet": {
"Type": "String",
"Description": "Bind private SLB. For example: [{ \"port\": 80, \"targetPort\": 8080, \"protocol\": \"TCP\"}], shows a container port 8080 through port 80 slb exposed service, the protocol is TCP, the blank is ignored."
},
"IntranetSlbId": {
"Type": "String",
"Description": "Use SLB purchased specified, currently only supports non-shared examples"
},
"Internet": {
"Type": "String",
"Description": "Binding public SLB. For example: [{ \"port\": 80, \"targetPort\": 8080, \"protocol\": \"TCP\"}], shows a container port 8080 through port 80 slb exposed service, the protocol is TCP, the blank is ignored."
}
},
"Resources": {
"SlbBinding": {
"Type": "ALIYUN::SAE::SlbBinding",
"Properties": {
"InternetSlbId": {
"Ref": "InternetSlbId"
},
"AppId": {
"Ref": "AppId"
},
"Intranet": {
"Ref": "Intranet"
},
"IntranetSlbId": {
"Ref": "IntranetSlbId"
},
"Internet": {
"Ref": "Internet"
}
}
}
},
"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"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InternetSlbId:
Type: String
Description: 'Use SLB purchased specified, currently only supports non-shared examples'
AppId:
Type: String
Description: Successful application deployment target ID
Intranet:
Type: String
Description: >-
Bind private SLB. For example: [{ "port": 80, "targetPort": 8080,
"protocol": "TCP"}], shows a container port 8080 through port 80 slb
exposed service, the protocol is TCP, the blank is ignored.
IntranetSlbId:
Type: String
Description: 'Use SLB purchased specified, currently only supports non-shared examples'
Internet:
Type: String
Description: >-
Binding public SLB. For example: [{ "port": 80, "targetPort": 8080,
"protocol": "TCP"}], shows a container port 8080 through port 80 slb
exposed service, the protocol is TCP, the blank is ignored.
Resources:
SlbBinding:
Type: 'ALIYUN::SAE::SlbBinding'
Properties:
InternetSlbId:
Ref: InternetSlbId
AppId:
Ref: AppId
Intranet:
Ref: Intranet
IntranetSlbId:
Ref: IntranetSlbId
Internet:
Ref: Internet
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