ALIYUN::GA::EndpointGroup is used to create an endpoint group.

Syntax

{
  "Type": "ALIYUN::GA::EndpointGroup",
  "Properties": {
    "HealthCheckIntervalSeconds": Integer,
    "EndpointGroupRegion": String,
    "TrafficPercentage": Integer,
    "Description": String,
    "HealthCheckPath": String,
    "HealthCheckProtocol": String,
    "ThresholdCount": Integer,
    "HealthCheckPort": Integer,
    "AcceleratorId": String,
    "EndpointConfigurations": List,
    "Name": String,
    "ListenerId": String
  }
}

Properties

Property Type Required Editable Description Constraint
HealthCheckIntervalSeconds String No Yes The interval between two consecutive health checks. Unit: seconds.
EndpointGroupRegion String Yes No The region ID of the endpoint group. None
TrafficPercentage String No Yes The weight of the endpoint group when the corresponding listener is associated with multiple endpoint groups. None
Description String No Yes The description of the endpoint group. None
HealthCheckPath String No Yes The path set as the destination on the targets for health checks. None
HealthCheckProtocol String No Yes The protocol that is used to connect with the targets for health checks. Valid values:
  • tcp
  • http
  • https
ThresholdCount String No Yes The number of consecutive failed heath checks that must occur before declaring an endpoint unhealthy. None
HealthCheckPort String No Yes The port used for health check. None
AcceleratorId String Yes No The ID of the GA instance. None
EndpointConfigurations List Yes Yes Endpoint. A maximum of four endpoints can be set.

For more information, see EndpointConfigurations properties.

Name String No Yes The name of the endpoint group. None
ListenerId String Yes No The ID of the listener. None

EndpointConfigurations syntax

"EndpointConfigurations": [
  {
    "Type": String,
    "Endpoint": String,
    "Weight": Integer
  }
]

EndpointConfigurations properties

Property Type Required Editable Description Constraint
Type String Yes Yes The type of the endpoint. Valid values: Valid values:
  • Domain: indicates the custom Domain name.
  • Ip: Enter the IP address.
Endpoint String Yes Yes The IP address or domain name of endpoint N in the endpoint group. None
Weight Integer Yes Yes The weight of endpoint N in the endpoint group. None

Response parameters

Fn::GetAtt

EndpointGroupId: the ID of the endpoint group.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "HealthCheckIntervalSeconds": {
      "Type": "Number",
      "Description": "The interval between two consecutive health checks. Unit: seconds."
    },
    "EndpointGroupRegion": {
      "Type": "String",
      "Description": "The region ID of the endpoint group."
    },
    "TrafficPercentage": {
      "Type": "Number",
      "Description": "The weight of the endpoint group when the corresponding listener is associated with\nmultiple endpoint groups."
    },
    "Description": {
      "Type": "String",
      "Description": "The description of the endpoint group."
    },
    "HealthCheckPath": {
      "Type": "String",
      "Description": "The path set as the destination on the targets for health checks."
    },
    "HealthCheckProtocol": {
      "Type": "String",
      "Description": "The protocol that is used to connect with the targets for health checks.\ntcp: TCP protocol\nhttp: HTTP protocol\nhttps: HTTPS protocol",
      "AllowedValues": [
        "tcp",
        "http",
        "https"
      ]
    },
    "ThresholdCount": {
      "Type": "Number",
      "Description": "The number of consecutive failed heath checks that must occur before declaring an endpoint unhealthy."
    },
    "HealthCheckPort": {
      "Type": "Number",
      "Description": "The port that is used to connect with the targets for health checks."
    },
    "AcceleratorId": {
      "Type": "String",
      "Description": "The ID of the Global Accelerator instance with which the endpoint group will be associated."
    },
    "EndpointConfigurations": {
      "Type": "Json",
      "Description": "",
      "MinLength": 1,
      "MaxLength": 4
    },
    "Name": {
      "Type": "String",
      "Description": "The name of the endpoint group."
    },
    "ListenerId": {
      "Type": "String",
      "Description": "The ID of the listener to be associated with the endpoint group."
    }
  },
  "Resources": {
    "EndpointGroup": {
      "Type": "ALIYUN::GA::EndpointGroup",
      "Properties": {
        "HealthCheckIntervalSeconds": {
          "Ref": "HealthCheckIntervalSeconds"
        },
        "EndpointGroupRegion": {
          "Ref": "EndpointGroupRegion"
        },
        "TrafficPercentage": {
          "Ref": "TrafficPercentage"
        },
        "Description": {
          "Ref": "Description"
        },
        "HealthCheckPath": {
          "Ref": "HealthCheckPath"
        },
        "HealthCheckProtocol": {
          "Ref": "HealthCheckProtocol"
        },
        "ThresholdCount": {
          "Ref": "ThresholdCount"
        },
        "HealthCheckPort": {
          "Ref": "HealthCheckPort"
        },
        "AcceleratorId": {
          "Ref": "AcceleratorId"
        },
        "EndpointConfigurations": {
          "Ref": "EndpointConfigurations"
        },
        "Name": {
          "Ref": "Name"
        },
        "ListenerId": {
          "Ref": "ListenerId"
        }
      }
    }
  },
  "Outputs": {
    "EndpointGroupId": {
      "Description": "The ID of the endpoint group.",
      "Value": {
        "Fn::GetAtt": [
          "EndpointGroup",
          "EndpointGroupId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  HealthCheckIntervalSeconds:
    Type: Number
    Description: 'The interval between two consecutive health checks. Unit: seconds.'
  EndpointGroupRegion:
    Type: String
    Description: The region ID of the endpoint group.
  TrafficPercentage:
    Type: Number
    Description: >-
      The weight of the endpoint group when the corresponding listener is
      associated with

      multiple endpoint groups.
  Description:
    Type: String
    Description: The description of the endpoint group.
  HealthCheckPath:
    Type: String
    Description: The path set as the destination on the targets for health checks.
  HealthCheckProtocol:
    Type: String
    Description: |-
      The protocol that is used to connect with the targets for health checks.
      tcp: TCP protocol
      http: HTTP protocol
      https: HTTPS protocol
    AllowedValues:
      -tcp
      -http
      -https
  ThresholdCount:
    Type: Number
    Description: >-
      The number of consecutive failed heath checks that must occur before
      declaring an endpoint unhealthy.
  HealthCheckPort:
    Type: Number
    Description: The port that is used to connect with the targets for health checks.
  AcceleratorId:
    Type: String
    Description: >-
      The ID of the Global Accelerator instance with which the endpoint group
      will be associated.
  EndpointConfigurations:
    Type: Json
    Description: ''
    MinLength: 1
    MaxLength: 4
  Name:
    Type: String
    Description: The name of the endpoint group.
  ListenerId:
    Type: String
    Description: The ID of the listener to be associated with the endpoint group.
Resources:
  EndpointGroup:
    Type: 'ALIYUN::GA::EndpointGroup'
    Properties:
      HealthCheckIntervalSeconds:
        Ref: HealthCheckIntervalSeconds
      EndpointGroupRegion:
        Ref: EndpointGroupRegion
      TrafficPercentage:
        Ref: TrafficPercentage
      Description:
        Ref: Description
      HealthCheckPath:
        Ref: HealthCheckPath
      HealthCheckProtocol:
        Ref: HealthCheckProtocol
      ThresholdCount:
        Ref: ThresholdCount
      HealthCheckPort:
        Ref: HealthCheckPort
      AcceleratorId:
        Ref: AcceleratorId
      EndpointConfigurations:
        Ref: EndpointConfigurations
      Name:
        Ref: Name
      ListenerId:
        Ref: ListenerId
Outputs:
  EndpointGroupId:
    Description: The ID of the endpoint group.
    Value:
      'Fn::GetAtt':
        -EndpointGroup
        -EndpointGroupId