All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::NLB::LoadBalancers

Last Updated:May 05, 2023

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

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

LoadBalancerNames

List

No

Yes

The names of the instances that you want to query.

You can query up to 20 instances in a request.

AddressIpVersion

String

No

Yes

The protocol version of the instance.

Valid values:

  • ipv4: IPv4

  • DualStack: dual stack

LoadBalancerBussinessStatus

String

No

Yes

The business state of the instance.

Valid values:

  • Abnormal

  • Normal

ZoneId

String

No

Yes

The zone ID.

None.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

VpcIds

List

No

Yes

The IDs of the virtual private cloud (VPCs) in which the instances are deployed.

You can query up to 10 VPC IDs in a request.

LoadBalancerIds

List

No

Yes

The IDs of the instances.

You can query up to 20 instances in a request.

AddressType

String

No

Yes

The type of the IPv4 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.

LoadBalancerStatus

String

No

Yes

The 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.

  • Deleting: The instance is being deleted.

  • Deleted: The instance is deleted.

Tags

List

No

Yes

The tags of the instance.

You can specify up to 20 tags in a request.

Ipv6AddressType

String

No

Yes

The 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.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The value of the tag.

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:.

Key

String

Yes

No

The key of the tag.

The tag key must be 1 to 128 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.

Property

Type

Description

Constraint

LoadBalancerIds

List

The IDs of the instances.

None.

LoadBalancers

List

Details of the instances.

None.

LoadBalancerId

String

The ID of the instance.

None.

LoadBalancerName

String

The name of the instance.

None.

LoadBalancerType

String

The type of the instance.

Only Network may be returned, which indicates that the instance is an NLB instance.

AddressType

String

The type of the IPv4 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.

AddressIpVersion

String

The protocol version of the instance.

Valid values:

  • ipv4: IPv4

  • DualStack: dual stack

Ipv6AddressType

String

The 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.

LoadBalancerStatus

String

The 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.

  • Deleting: The instance is being deleted.

  • Deleted: The instance is deleted.

LoadBalancerBusinessStatus

String

The business state of the instance.

Valid values:

  • Abnormal

  • Normal

VpcId

String

The ID of the VPC in which the instance is deployed.

None.

CreateTime

String

The time when the instance was created.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

ResourceGroupId

String

The ID of the resource group.

None.

DNSName

String

The domain name of the instance.

None.

BandwidthPackageId

String

The ID of the elastic IP address (EIP) bandwidth plan that is associated with the Internet-facing instance.

None.

SecurityGroupIds

List

The IDs of the security groups to which the instance is added.

[ "sg-bp67acfmxazb4p****" ]

CrossZoneEnabled

Boolean

Indicates whether cross-zone load balancing is enabled for the instance.

Valid values:

  • true

  • false

Tags

List

The tags of the instance.

Sample code:

[ {
      "Key" : "KeyTest",
      "Value" : "ValueTest"
    } ]

PayType

String

The billing method of the instance.

Only PostPay may be returned, which indicates that the instance uses the pay-as-you-go billing method.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::NLB::LoadBalancers
        Properties:
          AddressIpVersion: ipv4
    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::NLB::LoadBalancers",
          "Properties": {
            "AddressIpVersion": "ipv4"
          }
        }
      },
      "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"
            ]
          }
        }
      }
    }