DATASOURCE::ALB::LoadBalancers is used to query the basic information about created Application Load Balancer (ALB) instances.

Syntax

{
  "Type": "DATASOURCE::ALB::LoadBalancers",
  "Properties": {
    "LoadBalancerNames": List,
    "LoadBalancerBussinessStatus": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "VpcIds": List,
    "LoadBalancerIds": List,
    "PayType": String,
    "AddressType": String,
    "LoadBalancerStatus": String,
    "Tags": List
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
LoadBalancerNamesListNoYesThe names of the instances that you want to query. You can specify up to 10 names. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
LoadBalancerBussinessStatusStringNoYesThe business state of the instance. Valid values:
  • Abnormal
  • Normal
ZoneIdStringNoYesThe ID of the zone in which the instance is deployed. You can call the DescribeZones operation to query the information about the zone that corresponds to the specified zone ID.
ResourceGroupIdStringNoYesThe ID of the resource group. None.
VpcIdsListNoYesThe IDs of the virtual private clouds (VPCs) in which the instances are deployed. You can specify up to 10 IDs.
LoadBalancerIdsListNoYesThe IDs of the instances. You can specify up to 20 IDs.
PayTypeStringNoYesThe billing method of the instance. Valid values:
  • PostPay (default): pay-as-you-go
  • PrePay: subscription
AddressTypeStringNoYesThe network type of the instance. Valid values:
  • Internet: The instance uses a public IP address. The domain name of the instance is resolved to the public IP address. Therefore, the instance can be accessed over the Internet.
  • Intranet: The instance uses a private IP address. The domain name of the instance is resolved to the private IP address. Therefore, the instance can be accessed only over the VPC in which the instance is deployed.
LoadBalancerStatusStringNoYesThe state of the instance. Valid values:
  • Inactive: The instance is stopped. Instances in the Inactive state do not forward traffic.
  • Active: The instance is running.
  • Provisioning: The instance is being created.
  • Configuring: The configurations of the instance are being changed.
  • CreateFailed: The instance fails to be created. In this case, you are not charged for the instance and the instance must be deleted. By default, the system deletes the instances that are in the CreateFailed state within the last day.
TagsListNoYesThe tags of the instance. You can specify up to 20 tags. For more information, see Tags properties.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
ValueStringNoNoThe value of the tag. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.
KeyStringYesNoThe key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • LoadBalancerIds: the IDs of the instances.
  • LoadBalancers: details of the instances.
PropertyTypeDescriptionConstraint
LoadBalancerIdsListThe IDs of the instances. None.
LoadBalancersListDetails of the instances. None.
AddressAllocatedModeStringThe mode in which the IP address of the instance is assigned. Valid values:
  • Fixed: A static IP address is assigned to the instance.
  • Dynamic: An IP address is dynamically assigned to the instance in each zone.
AddressTypeStringThe network type of the instance. Valid values:
  • Internet: The instance uses a public IP address. The domain name of the instance is resolved to the public IP address. Therefore, the instance can be accessed over the Internet.
  • Intranet: The instance uses a private IP address. The domain name of the instance is resolved to the private IP address. Therefore, the instance can be accessed only over the VPC in which the instance is deployed.
BandwidthPackageIdStringThe ID of the elastic IP address (EIP) bandwidth plan that is associated with the Internet-facing instance. None.
CreateTimeStringThe time when the instance was created. None.
DNSNameStringThe domain name of the instance. None.
LoadBalancerBussinessStatusStringThe business state of the instance. Valid values:
  • Abnormal
  • Normal
LoadBalancerEditionStringThe edition of the instance. The features and billing policies for an instance vary based on the edition of the instance. Valid values:
  • Standard: Standard Edition
  • Basic: Basic Edition
  • StandardWithWaf: WAF-enabled Edition
LoadBalancerIdStringThe ID of the instance. None.
LoadBalancerNameStringThe name of the instance. None.
LoadBalancerStatusStringThe state of the instance. Valid values:
  • Inactive: The instance is stopped. Instances in the Inactive state do not forward traffic.
  • Active: The instance is running.
  • Provisioning: The instance is being created.
  • Configuring: The configurations of the instance are being changed.
  • CreateFailed: The instance failed to be created. In this case, you are not charged for the instance and the instance must be deleted. By default, the system deletes the instances that are in the CreateFailed state within the last day.
ResourceGroupIdStringThe ID of the resource group. None.
VpcIdStringThe ID of the VPC in which the instance is deployed. None.
AddressIpVersionStringThe protocol version of the instance. Valid values:
  • IPv4: IPv4
  • DualStack: dual stack
Ipv6AddressTypeStringThe type of the IPv6 address that is used by the instance. Valid values:
  • Internet: The instance uses a public IP address. The domain name of the instance is resolved to the public IP address. Therefore, the instance can be accessed over the Internet.
  • Intranet: The instance uses a private IP address. The domain name of the instance is resolved to the private IP address. Therefore, the instance can be accessed only over the VPC in which the instance is deployed.
TagsListThe tags of the instance. Sample code:
[ {
      "Key" : "KeyTest",
      "Value" : "alueTest"
    } ]
LogProjectStringThe log project of the instance. None.
LogStoreStringThe Logstore of the instance. None.
PayTypeStringThe billing method of the instance. Valid values:
  • PostPay: pay-as-you-go
  • PrePay: subscription

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::ALB::LoadBalancers
        Properties:
          LoadBalancerBussinessStatus: Normal
    Outputs:
      LoadBalancerIds:
        Description: The list of load balancer IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LoadBalancerIds
      LoadBalancers:
        Description: The list of load balancers.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - LoadBalancers
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::ALB::LoadBalancers",
          "Properties": {
            "LoadBalancerBussinessStatus": "Normal"
          }
        }
      },
      "Outputs": {
        "LoadBalancerIds": {
          "Description": "The list of load balancer IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LoadBalancerIds"
            ]
          }
        },
        "LoadBalancers": {
          "Description": "The list of load balancers.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "LoadBalancers"
            ]
          }
        }
      }
    }