ALIYUN::ESA::EdgeContainerApp

ALIYUN::ESA::EdgeContainerApp类型用于创建边缘容器的应用。

语法

{
  "Type": "ALIYUN::ESA::EdgeContainerApp",
  "Properties": {
    "EdgeContainerAppName": String,
    "ServicePort": Integer,
    "TargetPort": Integer,
    "HealthCheckFailTimes": Integer,
    "HealthCheckInterval": Integer,
    "HealthCheckUri": String,
    "HealthCheckHost": String,
    "HealthCheckTimeout": Integer,
    "HealthCheckSuccTimes": Integer,
    "HealthCheckMethod": String,
    "HealthCheckPort": Integer,
    "HealthCheckHttpCode": String,
    "HealthCheckType": String,
    "Remarks": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

EdgeContainerAppName

String

应用名称。

必须小写字母打头,支持小写字母,数字,横杠。长度限制 6~128 字符。

ServicePort

Integer

服务端端口号。

范围 1~65535。

TargetPort

Integer

后端端口。

应用的服务端口,范围 1~65535。

HealthCheckFailTimes

Integer

健康检查连续失败次数。

如果应用健康,经过多少次连续探测后都是失败返回,则认为应用为不健康状态。

  • 取值:1~10

  • 默认:5

HealthCheckInterval

Integer

健康检查的时间间隔。

取值:1~50

  • 默认值:5

  • 单位:

HealthCheckUri

String

用于健康检查的 URI。

  • 长度限制为 1~80

  • 默认值:"/"

HealthCheckHost

String

用于健康检查的域名。

不填写则默认为空。

HealthCheckTimeout

Integer

接收来自运行状况检查的响应需要等待的时间。

如果后端 ECS 在指定的时间内没有正确响应,则判定为健康检查失败。

  • 取值:1~100

  • 默认值:3

  • 单位:

HealthCheckSuccTimes

Integer

健康检查连续成功次数。

如果应用不健康,经过多少次连续探测后都是成功返回,则认为应用恢复健康状态。

  • 取值:1~10

  • 默认值:2

HealthCheckMethod

String

监听 HTTP 类型健康检查的健康检查方法。

取值:

  • HEAD(默认值):只请求页面的首部。

  • GET:请求指定的页面信息,并返回实体主体。

HealthCheckPort

Integer

健康检查的端口。

  • 取值范围:1~65535

  • 默认值: 80

HealthCheckHttpCode

String

健康检查正常时的 HTTP 状态码。

取值:

  • http_2xx(默认值)。

  • http_3xx

HealthCheckType

String

健康检查类型。

包括四层和七层探测,不填写默认为空。

取值:

  • l4:表示四层探测。

  • l7:表示七层探测。

Remarks

String

备注信息。

不填写则默认为空。

返回值

Fn::GetAtt

  • HealthCheckFailTimes:健康检查连续失败次数。

  • ServicePort:服务端端口号

  • HealthCheckInterval:健康检查的时间间隔。

  • AppStatus:应用状态信息

  • TargetPort:后端端口

  • DomainName:当前应用绑定的域名

  • HealthCheckUri:用于健康检查的 URI。

  • HealthCheckHost:用于健康检查的域名

  • CreateTime:应用创建时间。

  • GatewayType:网关类型

  • HealthCheckTimeout:接收来自运行状况检查的响应需要等待的时间。

  • HealthCheckSuccTimes:健康检查连续成功次数。

  • QuicCid:是否开启 QUIC 支持。

  • Remarks:应用的备注信息。

  • VersionCount:应用版本数量。

  • HealthCheckMethod:监听 HTTP 类型健康检查的健康检查方法。

  • UpdateTime:应用的上次修改时间。

  • HealthCheckPort:健康检查的端口。

  • EdgeContainerAppName:应用名称

  • HealthCheckHttpCode:健康检查正常时的 HTTP 状态码。

  • HealthCheckType:健康检查类型

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ServicePort:
    Type: Number
    Description:
      en: 'The server port. Valid values: 1 to 65535.'
    Required: true
    MinValue: 1
    MaxValue: 65535
  TargetPort:
    Type: Number
    Description:
      en: 'The backend port, which is also the service port of the application. Valid values: 1 to 65535.'
    Required: true
    MinValue: 1
    MaxValue: 65535
  EdgeContainerAppName:
    Type: String
    Description:
      en: The name of the application. The name must start with a lowercase letter and can contain lowercase letters, digits, and hyphens (-). The name must be 6 to 128 characters in length.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ESA::EdgeContainerApp
    Properties:
      ServicePort:
        Ref: ServicePort
      TargetPort:
        Ref: TargetPort
      EdgeContainerAppName:
        Ref: EdgeContainerAppName
Outputs:
  HealthCheckFailTimes:
    Description: TThe number of consecutive failed health checks required for an application to be considered as unhealthy.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckFailTimes
  ServicePort:
    Description: The server port.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ServicePort
  HealthCheckInterval:
    Description: 'The interval between two consecutive health checks. Unit: seconds. '
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckInterval
  AppStatus:
    Description: The status of the application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AppStatus
  TargetPort:
    Description: The backend port, which is also the service port of the application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TargetPort
  DomainName:
    Description: The domain name that is associated with the application. If no domain name is associated with the application, the value is an empty string.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DomainName
  HealthCheckUri:
    Description: The URI used for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckUri
  HealthCheckHost:
    Description: The domain name that is used for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckHost
  CreateTime:
    Description: The time when the application was created.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  GatewayType:
    Description: The type of the gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GatewayType
  HealthCheckTimeout:
    Description: The timeout period of a health check response.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckTimeout
  HealthCheckSuccTimes:
    Description: 'The number of consecutive successful health checks required for an application to be considered as healthy. '
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckSuccTimes
  QuicCid:
    Description: Indicates whether QUIC is enabled.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - QuicCid
  Remarks:
    Description: The remarks. This parameter is empty by default.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Remarks
  VersionCount:
    Description: The number of versions of the application.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VersionCount
  HealthCheckMethod:
    Description: The HTTP request method for health checks.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckMethod
  UpdateTime:
    Description: The time when the application was last modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UpdateTime
  HealthCheckPort:
    Description: 'The port used for health checks. Valid values: 1 to 65535. Default value: 80.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckPort
  EdgeContainerAppName:
    Description: 'The name of the application. '
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EdgeContainerAppName
  HealthCheckHttpCode:
    Description: The HTTP status code returned for a successful health check.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckHttpCode
  HealthCheckType:
    Description: The health check type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HealthCheckType
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ServicePort": {
      "Type": "Number",
      "Description": {
        "en": "The server port. Valid values: 1 to 65535."
      },
      "Required": true,
      "MinValue": 1,
      "MaxValue": 65535
    },
    "TargetPort": {
      "Type": "Number",
      "Description": {
        "en": "The backend port, which is also the service port of the application. Valid values: 1 to 65535."
      },
      "Required": true,
      "MinValue": 1,
      "MaxValue": 65535
    },
    "EdgeContainerAppName": {
      "Type": "String",
      "Description": {
        "en": "The name of the application. The name must start with a lowercase letter and can contain lowercase letters, digits, and hyphens (-). The name must be 6 to 128 characters in length."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ESA::EdgeContainerApp",
      "Properties": {
        "ServicePort": {
          "Ref": "ServicePort"
        },
        "TargetPort": {
          "Ref": "TargetPort"
        },
        "EdgeContainerAppName": {
          "Ref": "EdgeContainerAppName"
        }
      }
    }
  },
  "Outputs": {
    "HealthCheckFailTimes": {
      "Description": "TThe number of consecutive failed health checks required for an application to be considered as unhealthy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckFailTimes"
        ]
      }
    },
    "ServicePort": {
      "Description": "The server port.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ServicePort"
        ]
      }
    },
    "HealthCheckInterval": {
      "Description": "The interval between two consecutive health checks. Unit: seconds. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckInterval"
        ]
      }
    },
    "AppStatus": {
      "Description": "The status of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AppStatus"
        ]
      }
    },
    "TargetPort": {
      "Description": "The backend port, which is also the service port of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TargetPort"
        ]
      }
    },
    "DomainName": {
      "Description": "The domain name that is associated with the application. If no domain name is associated with the application, the value is an empty string.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DomainName"
        ]
      }
    },
    "HealthCheckUri": {
      "Description": "The URI used for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckUri"
        ]
      }
    },
    "HealthCheckHost": {
      "Description": "The domain name that is used for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckHost"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the application was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "GatewayType": {
      "Description": "The type of the gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GatewayType"
        ]
      }
    },
    "HealthCheckTimeout": {
      "Description": "The timeout period of a health check response.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckTimeout"
        ]
      }
    },
    "HealthCheckSuccTimes": {
      "Description": "The number of consecutive successful health checks required for an application to be considered as healthy. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckSuccTimes"
        ]
      }
    },
    "QuicCid": {
      "Description": "Indicates whether QUIC is enabled.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "QuicCid"
        ]
      }
    },
    "Remarks": {
      "Description": "The remarks. This parameter is empty by default.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Remarks"
        ]
      }
    },
    "VersionCount": {
      "Description": "The number of versions of the application.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VersionCount"
        ]
      }
    },
    "HealthCheckMethod": {
      "Description": "The HTTP request method for health checks.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckMethod"
        ]
      }
    },
    "UpdateTime": {
      "Description": "The time when the application was last modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UpdateTime"
        ]
      }
    },
    "HealthCheckPort": {
      "Description": "The port used for health checks. Valid values: 1 to 65535. Default value: 80.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckPort"
        ]
      }
    },
    "EdgeContainerAppName": {
      "Description": "The name of the application. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EdgeContainerAppName"
        ]
      }
    },
    "HealthCheckHttpCode": {
      "Description": "The HTTP status code returned for a successful health check.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckHttpCode"
        ]
      }
    },
    "HealthCheckType": {
      "Description": "The health check type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HealthCheckType"
        ]
      }
    }
  }
}