# Get traditional load balancing information - DescribeULB

## Overview

Get CLB Details






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeULB`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **Offset** | int | Data offset, default is 0 |No|
| **Limit** | int | Data pagination value, default is 20 |No|
| **ULBId** | string | The Id of the traditional load balancing instance. If specified, the information of the specified traditional load balancing instance will be returned; if not specified, the information of all traditional load balancing instances in the current data center will be returned. |No|
| **VPCId** | string | VPC that CLB belongs to |No|
| **SubnetId** | string | Subnet ID to which CLB belongs |No|
| **BusinessId** | string | Business Group ID to which CLB belongs |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **TotalCount** | int | Total number of qualified CLB |No|
| **DataSet** | array[[*ULBSet*](#ulbset)] | CLB List, see ULBSet for each parameter detail |No|

#### Data Model


#### ULBSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ULBId** | string | Resource ID of ULB |No|
| **Name** | string | Resource Name of ULB |No|
| **Tag** | string | Business Group Name of Load Balancing |No|
| **Remark** | string | Remarks on Load Balancing |No|
| **BandwidthType** | int | Bandwidth type, enumeration values are: 0, non-shared bandwidth; 1, shared bandwidth. |No|
| **Bandwidth** | int | Bandwidth |No|
| **CreateTime** | int | Creation time of ULB, in Unix Timestamp format |No|
| **IPSet** | array[[*ULBIPSet*](#ulbipset)] | Detailed information list of ULB, see ULBIPSet for specific structure. |No|
| **VServerSet** | array[[*ULBVServerSet*](#ulbvserverset)] | List of VServer instances existing in the Load Balancer instance, see ULBVServerSet structure below for details. |No|
| **ULBType** | string | The type of ULB |No|
| **IPVersion** | string | ULB IP type, enumeration value: IPv6 / IPv4 (internal testing, not yet open to the public) |No|
| **SnatIps** | array[string] | Backward proxy IP of ULB, only returns when there is a proxy IP<br />No |No|
| **ListenType** | string | ULB Listener Type, enumeration values: RequestProxy, request proxy; PacketsTransmit, packet forwarding; Comprehensive, compatible; Pending, undefined |No|
| **VPCId** | string | The ID of the VPC where the ULB is located |No|
| **SubnetId** | string | When ULB is in InnerMode, the subnet ID to which ULB belongs, default is null. |No|
| **BusinessId** | string | Business Group ID to which ULB belongs |No|
| **PrivateIP** | string | The internal IP of ULB, this value is null when ULBType is OuterMode. |No|
| **FirewallSet** | array[[*FirewallSet*](#firewallset)] | Firewall Information, see the specific structure below in FirewallSet |No|
| **EnableLog** | int | Is the ULB log function enabled? 0, Off; 1, On |No|
| **LogSet** | [*LoggerSet*](#loggerset) | Log function related information, only returned when EnableLog is true, see LoggerSet structure below. |No|

#### ULBIPSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **OperatorName** | string | Operator information for Elastic IP, enumeration values are: Bgp: BGP IP International: International IP |No|
| **EIP** | string | Elastic IP Address |No|
| **EIPId** | string | Elastic IP ID |No|
| **BandwidthType** | int | The bandwidth type of Elastic IP, enumeration value: 1 indicates shared bandwidth, 0 ordinary bandwidth type (not yet open to the public) |No|
| **Bandwidth** | int | Bandwidth value of Elastic IP (not yet open to the public) |No|

#### ULBVServerSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **MonitorType** | string | Health check type, enumeration values: Port -> Port check; Path -> Path check; Ping -> Ping detection, Customize -> UDP check<br /><br />The default value for request proxy type is Port, where TCP protocol only supports Port, other protocols support Port and Path; Message forwarding type TCP protocol only supports Port, UDP protocol supports Ping, Port and Customize. |**Yes**|
| **PersistenceType** | string | VServer session persistence method. Enumerated values are: None -> Turn off session persistence; ServerInsert -> Auto-generated; UserDefined -> User-defined. |**Yes**|
| **ULBId** | string | Id of the Load Balancing Instance |No|
| **Domain** | string | Confirm according to MonitorType; When MonitorType is Port, this field is meaningless. When MonitorType is Path, it represents the HTTP check domain. |No|
| **Path** | string | Confirm according to MonitorType; When MonitorType is Port, this field is meaningless. When MonitorType is Path, it represents the HTTP check path. |No|
| **RequestMsg** | string | Confirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the request message sent by UDP check. |No|
| **ResponseMsg** | string | Confirm according to MonitorType; When MonitorType is Customize, this field is meaningful, representing the response message that the UDP check request should receive. |No|
| **VServerId** | string | Id of the VServer instance |No|
| **VServerName** | string | Name of the VServer instance |No|
| **Protocol** | string | The protocol of the VServer instance. Enumeration values are: HTTP, TCP, UDP, HTTPS. |No|
| **FrontendPort** | int | VServer Service Port |No|
| **Method** | string | The mode of VServer load balancing, enumeration values: Roundrobin -> Round Robin; Source -> Source Address; ConsistentHash -> Consistent Hashing; SourcePort -> Source Address (Compute Port); ConsistentHashPort -> Consistent Hashing (Compute Port). |No|
| **PersistenceInfo** | string | Determined by PersistenceType: None or ServerInsert, this field is empty; UserDefined, this field displays the user-defined session string. |No|
| **ClientTimeout** | int | Idle connection recovery time, unit: seconds. |No|
| **Status** | int | The running status of VServer. Enumeration values: 0 -> all rs running normally; 1 -> all rs running abnormally; 2 -> some rs running abnormally. |No|
| **SSLSet** | array[[*ULBSSLSet*](#ulbsslset)] | The SSL certificate information bound to VServer, see ULBSSLSet for specific structure. |No|
| **BackendSet** | array[[*ULBBackendSet*](#ulbbackendset)] | Backend resource information list, see ULBBackendSet structure below. |No|
| **ListenType** | string | Listener type, enumeration values are: RequestProxy -> Request Proxy; PacketsTransmit -> Packet Forwarding |No|
| **PolicySet** | array[[*ULBPolicySet*](#ulbpolicyset)] | Content forwarding information list, see ULBPolicySet for specific structure. |No|
| **EnableCompression** | int | Data compression switch, 0: Off 1: On |No|
| **SecurityPolicy** | [*BindSecurityPolicy*](#bindsecuritypolicy) | Security policy bound to VServer, see BindSecurityPolicy for specific structure. |No|
| **ForwardPort** | int | Redirect port, value range [0-65535]; the default value is 0, representing closure; only the HTTP protocol supports the opening of the redirect function. |No|
| **EnableHTTP2** | int | 0: Off 1: On, used to enable the http2 feature; the default value is 0 |No|

#### FirewallSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **FirewallName** | string | Firewall Name |No|
| **FirewallId** | string | Firewall ID |No|

#### LoggerSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **BucketName** | string | ULB log upload bucket |No|
| **TokenID** | string | TokenID of the token used to upload to the bucket |No|
| **TokenName** | string | Name of the bucket's token |No|

#### ULBSSLSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **SSLId** | string | Id of SSL Certificate |No|
| **SSLName** | string | Name of the SSL Certificate |No|
| **SSLType** | string | SSL Certificate type, currently only Pem type is available |No|
| **SSLContent** | string | Content of the SSL Certificate |No|
| **CreateTime** | int | Creation time of the SSL certificate |No|
| **HashValue** | string | HASH value of SSL certificate |No|
| **BindedTargetSet** | array[[*SSLBindedTargetSet*](#sslbindedtargetset)] | Object bound to the SSL certificate |No|
| **SSLSource** | int | Source of SSL Certificate, Source of SSL Certificate, 0 represents the certificate is from the ULB platform, 1 represents the certificate is from the USSL platform. |No|
| **USSLId** | string | The ID of the USSL Certificate Platform, only appears when SSLSource is 1. |No|
| **Domains** | string | Domain name of the SSL Certificate platform, when there are multiple domain names, extended domain names are not displayed. |No|
| **NotBefore** | int | Certificate Issuance Time |No|
| **NotAfter** | int | Certificate Expiration Time |No|

#### ULBBackendSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **BackendId** | string | Id of the backend resource instance |No|
| **ResourceType** | string | Type of Resource Instance |No|
| **ResourceId** | string | Resource ID of the resource instance |No|
| **ResourceName** | string | Resource name of the resource instance |No|
| **SubResourceType** | string | The type of virtual network card instance bound to the resource |No|
| **SubResourceId** | string | Resource Id of the virtual network card instance bound to the resource |No|
| **SubResourceName** | string | The name of the resource instance of the virtual network card bound to the resource |No|
| **PrivateIP** | string | Intranet IP of the backend service |No|
| **Port** | int | Port for backend service provision |No|
| **Enabled** | int | Whether the instance providing backend services is enabled or not, enumeration values: 0 for disabled, 1 for enabled. |No|
| **Status** | int | The running status of the instance providing backend services, enumeration values: 0 Health check healthy status 1 Health check abnormal |No|
| **SubnetId** | string | The ID of the subnet where the resources providing backend services are located |No|
| **IsBackup** | int | Whether it is a backup, this field will only exist when the Backup attribute of vserver is 1, explanation:<br /><br />0: Main rs<br />1: Backup rs |No|
| **Weight** | int | Backend RS Weight (Effective under Weighted Round Robin Algorithm) |No|
| **VPCId** | string | The VPC where the backend server is located |No|

#### ULBPolicySet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **DomainMatchMode** | string | The matching method of the domain name in the content forwarding rules. Enumerated values: Regular, regular expression; Wildcard, wildcard domain. |No|
| **PolicyId** | string | Content forwarding Id, empty by default under the content forwarding type. |No|
| **PolicyType** | string | Content Type, enumeration values: Custom -> Customer Defined; Default -> Default Content Forwarding |No|
| **Type** | string | The type of content forwarding matching field, enumeration value: Domain -> domain; Path -> path; The default content forwarding type is empty. |No|
| **Match** | string | Content forwarding matching field; empty under the default content forwarding type. |No|
| **PolicyPriority** | int | Content forwarding priority, range [1,9999], the larger the number, the higher the priority. The default content forwarding rule is 0. |No|
| **VServerId** | string | Belonging VServerId |No|
| **TotalCount** | int | Returns the total number of rs under the default content forwarding type |No|
| **BackendSet** | array[[*PolicyBackendSet*](#policybackendset)] | Detailed information about rs under content forwarding, refer to PolicyBackendSet |No|

#### BindSecurityPolicy

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **SecurityPolicyId** | string | Security Policy Group ID |No|
| **SecurityPolicyName** | string | Security Policy Group Name |No|
| **TLSVersion** | string | Minimum TLS Version |No|
| **SSLCiphers** | array[string] | Encryption Suite |No|
| **SecurityPolicyType** | int | Security policy type 0: Predefined 1: Custom |No|

#### PolicyBackendSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **BackendId** | string | The object ID of the added backend resource in ULB, (used in the ULB system, unrelated to the resource's own ID) |No|
| **ResourceType** | string | The type of backend resources added, enumeration values: UHost -> Cloud Host; UPM -> Physical Cloud Host; UDHost -> Private Zone Host; UDocker -> Container; UHybrid->Hybrid Cloud Host; CUBE->Cube; UNI -> Virtual Network Card. |No|
| **ResourceName** | string | Instance name of backend resources |No|
| **SubResourceId** | string | If the resource is bound to an elastic network card, display the resource ID of the elastic network card. |No|
| **SubResourceName** | string | If the resource is bound to an elastic network card, display the resource name of the elastic network card. |No|
| **SubResourceType** | string |  "UNI" or empty  |No|
| **ObjectId** | string | Object ID of backend resources |No|
| **Port** | int | The backend resource service port added |No|
| **PrivateIP** | string | Intranet IP of Backend Resources |No|

#### SSLBindedTargetSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **VServerId** | string | Resource ID of the VServer to which the SSL certificate is bound |No|
| **VServerName** | string | The name of the corresponding VServer |No|
| **ULBId** | string | The resource ID of the ULB instance to which the VServer belongs |No|
| **ULBName** | string | Name of the ULB instance |No|

## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=DescribeULB
&Region=cn-bj2
&ProjectId=project-XXXXX
```

### Response Example
    
```json
{
  "Action": "DescribeULBResponse",
  "DataSet": [
    {
      "Bandwidth": 0,
      "BandwidthType": 0,
      "BusinessId": "",
      "CreateTime": 1529909322,
      "IPSet": [],
      "Name": "ULB",
      "PrivateIP": "",
      "Remark": "",
      "SubnetId": "",
      "Tag": "Default",
      "ULBId": "ulb-XXXX",
      "ULBType": "OuterMode",
      "VPCId": "uvnet-XXX",
      "VServerSet": [
        {
          "BackendSet": [
            {
              "BackendId": "backend-XXXX",
              "Enabled": 1,
              "Port": 80,
              "PrivateIP": "10.25.XXX.17",
              "ResourceId": "uhost-XXXX",
              "ResourceName": "test",
              "ResourceType": "UHost",
              "Status": 0,
              "SubnetId": "subnet-hi50vf"
            }
          ],
          "ClientTimeout": 60,
          "CreateTime": 1529909432,
          "Domain": "",
          "EnableCompression": 1,
          "EnableHTTP2": 1,
          "ForwardPort": 4,
          "FrontendPort": 80,
          "ListenType": "RequestProxy",
          "Method": "Roundrobin",
          "MetricIdSet": [
            {
              "MetricId": "69538bf3-00bc-4385-85cc-XXXX",
              "Type": "OuterMode"
            }
          ],
          "MonitorType": "Port",
          "Path": "",
          "PersistenceInfo": "",
          "PersistenceType": "None",
          "PolicySet": [
            {
              "BackendSet": [
                {
                  "BackendId": "backend-XXXXX",
                  "ObjectId": "b47f082b-684f-4d5c-8dc4-XXXXX",
                  "Port": 80,
                  "PrivateIP": "10.25.XXX.17",
                  "ResourceName": "test"
                }
              ],
              "Match": "",
              "PolicyId": "",
              "PolicyPriority": 0,
              "PolicyType": "Default",
              "TotalCount": 1,
              "Type": "",
              "VServerId": "vserver-XXXX"
            }
          ],
          "Protocol": "HTTP",
          "SSLSet": [],
          "SecurityPolicy": {},
          "Status": 0,
          "VServerId": "vserver-XXXX",
          "VServerName": "VServer"
        }
      ]
    }
  ],
  "RetCode": 0,
  "TotalCount": 1
}
```





