DATASOURCE::SLB::VServerGroups is used to query the server groups of a Classic Load Balancer (CLB) instance.

Syntax

{
  "Type": "DATASOURCE::SLB::VServerGroups",
  "Properties": {
    "LoadBalancerId": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
LoadBalancerIdStringYesYesThe ID of the CLB instance. None.

Return values

Fn::GetAtt

  • VServerGroupIds: the IDs of the server groups.
  • VServerGroups: details of the server groups.
PropertyTypeDescriptionConstraint
VServerGroupIdsListThe IDs of the server groups. None.
VServerGroupsListDetails of the server groups. None.
AssociatedObjectsMapThe items that are associated with the server group. Example:
{
      "Listeners" : [ {
        "Port" : 80,
        "Protocol" : "tcp"
      } ],
      "Rules" : [ {
        "Url" : "/example",
        "Domain" : "www.example.com",
        "RuleName" : "test",
        "RuleId" : "rule-a3x3pg1yohq3lq****"
      } ]
    }
LoadBalancerIdStringThe ID of the CLB instance. None.
CreateTimeStringThe time when the CLB instance was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.
VServerGroupIdStringThe ID of the server group. None.
VServerGroupNameStringThe name of the server group. None.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      LoadBalancerId:
        Type: String
        AssociationProperty: ALIYUN::SLB::Instance::InstanceId
        Description: The ID of the CLB instance.
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::SLB::VServerGroups
        Properties:
          LoadBalancerId:
            Ref: LoadBalancerId
    Outputs:
      VServerGroupIds:
        Description: The list of VServer group IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VServerGroupIds
      VServerGroups:
        Description: The list of VServer groups.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - VServerGroups
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "LoadBalancerId": {
          "Type": "String",
          "AssociationProperty":"ALIYUN::SLB::Instance::InstanceId",
          "Description": "The ID of the CLB instance."
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::SLB::VServerGroups",
          "Properties": {
            "LoadBalancerId": {
              "Ref": "LoadBalancerId"
            }
          }
        }
      },
      "Outputs": {
        "VServerGroupIds": {
          "Description": "The list of VServer group IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VServerGroupIds"
            ]
          }
        },
        "VServerGroups": {
          "Description": "The list of VServer groups.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "VServerGroups"
            ]
          }
        }
      }
    }