All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::NLB::LoadBalancers

Last Updated:Nov 27, 2024

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,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

LoadBalancerNames

List

No

Yes

The names of the NLB instances.

You can query up to 20 instances in a request.

AddressIpVersion

String

No

Yes

The protocol version.

Valid values:

  • ipv4

  • DualStack

LoadBalancerBussinessStatus

String

No

Yes

The business status of the NLB 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 clouds (VPCs) in which the NLB instances reside.

You can query up to 10 VPCs in a request.

LoadBalancerIds

List

No

Yes

The IDs of the NLB 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 NLB 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 of the instance.

LoadBalancerStatus

String

No

Yes

The status of the NLB instance.

Valid values:

  • Inactive: The NLB instance is stopped. The listeners of the NLB instance in the Inactive state do not forward traffic.

  • Active: The NLB instance is running.

  • Provisioning: The NLB instance is being created.

  • Configuring: The configurations of the NLB instance are being changed.

  • Deleting: The NLB instance is being deleted.

  • Deleted: The NLB instance is deleted.

Tags

List

No

Yes

The tags of the NLB instance.

You can add up to 20 tags in a request.

Ipv6AddressType

String

No

Yes

The type of the IPv6 address that is used by the NLB 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 of the instance.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Key

String

Yes

No

The tag key.

The tag key must be 1 to 128 characters in length and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • LoadBalancerIds: the IDs of the NLB instances.

  • LoadBalancers: details of the NLB instances.

Property

Type

Description

Constraint

LoadBalancerIds

List

The IDs of the NLB instances.

None.

LoadBalancers

List

Details of the NLB instances.

None.

LoadBalancerId

String

The ID of the NLB instance.

None.

LoadBalancerName

String

The name of the NLB instance.

None.

LoadBalancerType

String

The type of the Server Load Balancer (SLB) 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 NLB 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 of the instance.

AddressIpVersion

String

The protocol version.

Valid values:

  • ipv4

  • DualStack

Ipv6AddressType

String

The type of the IPv6 address that is used by the NLB 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 of the instance.

LoadBalancerStatus

String

The status of the NLB instance.

Valid values:

  • Inactive: The NLB instance is stopped. The listeners of the NLB instance in the Inactive state do not forward traffic.

  • Active: The NLB instance is running.

  • Provisioning: The NLB instance is being created.

  • Configuring: The configurations of the NLB instance are being changed.

  • Deleting: The NLB instance is being deleted.

  • Deleted: The NLB instance is deleted.

LoadBalancerBusinessStatus

String

The business status of the NLB instance.

Valid values:

  • Abnormal

  • Normal

VpcId

String

The ID of the VPC in which the NLB instance resides.

None.

CreateTime

String

The time when the NLB 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.

None.

BandwidthPackageId

String

The ID of the Internet Shared Bandwidth instance that is associated with the Internet-facing instance.

None.

SecurityGroupIds

List

The security groups to which the NLB instance is added.

[ "sg-bp67acfmxazb4p****" ]

CrossZoneEnabled

Boolean

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

Valid values:

  • true

  • false

Tags

List

The tags.

Example:

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

PayType

String

The billing method of the NLB instance.

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

Examples

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
{
  "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"
        ]
      }
    }
  }
}