ALIYUN::SAE::SlbBinding类型用于为应用绑定SLB。

语法

{
  "Type": "ALIYUN::SAE::SlbBinding",
  "Properties": {
    "InternetSlbId": String,
    "AppId": String,
    "Intranet": String,
    "IntranetSlbId": String,
    "Internet": String
  }
}

属性

属性名称类型必须允许更新描述约束
属性名称类型必须允许更新描述约束
InternetSlbIdString公网SLB ID。目前只支持非共享型实例 。
AppIdString部署成功的目标应用ID。
IntranetString绑定私网SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示将容器的8080端口通过SLB的80端口暴露服务,协议为TCP。
IntranetSlbIdString私网SLB ID。目前只支持非共享型实例。
InternetString绑定公网SLB。例如:[{"port":80,"targetPort":8080,"protocol":"TCP"}],表示将容器的8080端口通过SLB的80端口暴露服务,协议为TCP。

返回值

Fn::GetAtt

  • AppId:应用ID。
  • ChangeOrderId:发布单ID,用于查询任务执行状态。

示例

    YAML格式

    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

    JSON格式

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