实例接口

1. 获取实例列表

GET https://open.cn-east-1.163yun.com/nlb?Action=GetLoadBalancers[&Type=mix][&Limit=10][&Offset=20]&Version=2017-12-05

示例

请求:
GET https://open.cn-east-1.163yun.com/nlb?Action=GetLoadBalancers&Version=2017-12-05

HEADER:
    Content-type: application/json
    

响应:
[
    {
        "InstanceId": "a12b73b1-6345-4efa-a318-3b20a0bcd7aa",
        "TenantId": "34493fd33b874583ac7b24c1f60138fd",
        "Name": "lhb-openapi-10",
        "Network": "public",
        "Description": "test description",
        "Status": "WORKING",
        "SubStatus": "WORKING",
        "InstanceStatus": "UNKNOWN",
        "Createtime": 1524833715419,
        "Updatetime": 1524833738618,
        "Address": "60.191.87.46",
        "Type": "vpc_mix",
        "InstanceNum": 2,
        "VpcId": "753d3b80-4945-4a95-8821-dad1d320cf27",
        "Standard": {
            "ChargeMode": "bandwidth",
            "ChargeType": "RESERVED",
            "BandwidthLimit": 100,
            "AutoRenewPeriod": 0
        },
        "TopAzInfos": [
            {
                "TopAz": "cn-east-1b",
                "SubNetId": "3cc4df3d-525f-4626-a7a0-c3d8461ee126"
            }
        ]
    },
    {
        "InstanceId": "0f6010ed-f4e9-44ec-8619-249125453a5c",
        "TenantId": "34493fd33b874583ac7b24c1f60138fd",
        "Name": "lhb-openapi-9",
        "Network": "public",
        "Description": "test description",
        "Status": "WORKING",
        "SubStatus": "WORKING",
        "InstanceStatus": "UNKNOWN",
        "Createtime": 1524832983397,
        "Updatetime": 1524833016553,
        "Address": "60.191.87.21",
        "Type": "vpc_mix",
        "VpcId": "753d3b80-4945-4a95-8821-dad1d320cf27",
        "Standard": {
            "ChargeMode": "bandwidth",
            "ChargeType": "RESERVED",
            "BandwidthLimit": 100,
            "AutoRenewPeriod": 0
        },
        "TopAzInfos": [
            {
                "TopAz": "cn-east-1b",
                "SubNetId": "3cc4df3d-525f-4626-a7a0-c3d8461ee126"
            }
        ]
    },
]

参数说明

  • http url
参数参数描述是否必选类型范围默认值说明
Type负载均衡类型stringmix/vpc_mix/tcp/http-不填返回所有
Offset偏移number非负整数0-
Limit限制个数number1-20050-

-返回结果

字段字段名称取值特征字段描述
InstanceId实例IDuuidV4实例ID
TenantId租户IDuuidV4租户ID
Name实例名称string长度不超过100,由数字字母以及"-"和"_"组成
Type实例类型mix/vpc_mix/tcp/httpmix为经典网络负载均衡;vpc_mix为vpc网络负载均衡;tcp/http类型不提供创建,只支持老实例维护,新特性不会支持这两种类型
Network网络类型public/private/idc分别公有网/私有网/机房网
Description实例描述string长度不超过200
Address负载均衡地址-访问LB服务的VIP地址,负载均衡实例入口地址,VPC内网返回域名,外网返回外网IP,机房网返回机房网IP
Status实例状态WORKING/DELETING/UPDATING/FAILEDLB实例总状态,分别为正常工作中/删除中/更新中/失败
SubStatus实例子状态CREATE_FAILED/DELETE_FAILED失败时子状态信息
InstanceStatus用户主机状态概览DOWN/UP后端服务只要有一个异常则为DOWN
Createtime创建时间number单位毫秒
Updatetime更新时间number单秒毫秒
InstanceNum用户主机数量number统计用户主机数量,各个目标组里面云主机累加值
VpcIdVpc IduuidV4负载均衡所属VpcId
Standard计费参数json计费相关参数
Standard->ChargeMode计费模式netflow/bandwidthnetflow按流量计费(默认值);bandwidth 按带宽计费
Standard->ChargeType计费类型AMOUNT/RESERVEDAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->BandwidthLimit带宽限制1-1000可以提工单调整上限值
Standard->AutoRenewPeriod自动续费月数1-9,12,24取值为1至9个月,12个月,24个月
TopAzInfos可用区信息array of json-
TopAzInfos->TopAz可用区string可用区
TopAzInfos->SubNetId子网Idstring用户子网

返回码

  • 200 成功
  • 404 租户不存在
  • 500 内部错误

2. 实例详情查询

GET https://open.cn-east-1.163yun.com/nlb?Action=GetLoadBalancer&InstanceId=&Version=2017-12-05

示例

请求:
GET https://open.cn-east-1.163yun.com/nlb?Action=GetLoadBalancer&InstanceId=1049cd9a-3122-4ec1-b484-dd9f6d80e46b&Version=2017-12-05

HEADER:
    Content-type: application/json
    

响应:
{
    "InstanceId": "1049cd9a-3122-4ec1-b484-dd9f6d80e46b",
    "TenantId": "34493fd33b874583ac7b24c1f60138fd",
    "Name": "openapi-testcase3",
    "Network": "public",
    "Description": "test description",
    "Status": "WORKING",
    "SubStatus": "WORKING",
    "InstanceStatus": "UP",
    "Createtime": 1524887229137,
    "Updatetime": 1524900575613,
    "Address": "60.191.87.41",
    "Type": "vpc_mix",
    "InstanceNum": 1,
    "VpcId": "753d3b80-4945-4a95-8821-dad1d320cf27",
    "VpcIps": [
        "192.168.1.53",
        "192.168.1.56",
        "192.168.1.55",
        "192.168.1.54"
    ],
    "Listeners": [
        {
            "ListenerId": "b96b7a16-6836-49a3-bb6b-a092bcbdb969",
            "Name": "openlisten",
            "ListenPort": 8088,
            "Protocol": "http",
            "TraceVip": 0,
            "Balance": "leastconn",
            "Gzip": 0,
            "Createtime": 1524900573054,
            "Updatetime": 1524900573054,
            "Status": "ON",
            "Clusters": [
                {
                    "TargetGroupId": cfd688c7-546e-4f08-8bf8-e70c906328d8,
                    "Name": "opengroup",
                    "ServerName": "1.com",
                    "Path": "/1",
                    "Createtime": 1524896726737,
                    "Updatetime": 1524900573057,
                    "Monitor": {
                        "Protocol": "tcp",
                        "Rise": 2,
                        "Fall": 5,
                        "Timeout": 2000,
                        "Period": 5000
                    },
                    "Policy": {
                        "Mode": "insert",
                        "CookieName": "route_insert_eb13e1ac-7566-44da-82ea-1acb264234f9",
                        "Expire": 30000
                    }
                }
            ]
        }
    ],
    "Standard": {
        "ChargeMode": "bandwidth",
        "ChargeType": "AMOUNT",
        "BandwidthLimit": 100,
        "Size": "high",
        "AutoRenewPeriod": 0
    },
    "Limit": {
        "ListenerLimit": 10,
        "TGroupLimit": 20,
        "TGroupInstanceLimit": 50,
        "DomainLimit": 5,
        "PathLimit": 30
    },
    "TargetGroups": [
        {
            "TargetGroupId": "eb13e1ac-7566-44da-82ea-1acb264234f9",
            "ListenerId": "b96b7a16-6836-49a3-bb6b-a092bcbdb969",
            "Name": "opengroup",
            "UseSamePort": 1,
            "Createtime": 1524896726737,
            "Updatetime": 1524900573057,
            "Instances": [
                {
                    "Id": "7ba2a391-5acb-4602-832c-14c808f1cde4",
                    "Name": "newvpc-5",
                    "Address": "10.177.1.7",
                    "Port": 8080,
                    "Status": "UP",
                    "TopAz": "",
                    "Weight": 100,
                    "Backup": 0
                }
            ]
        }
    ],
    "TopAzInfos": [
        {
            "TopAz": "cn-east-1b",
            "SubNetId": "3cc4df3d-525f-4626-a7a0-c3d8461ee126"
        }
    ],
    "SecurityGroups": [
        "6958c291-67ef-4b85-8aa5-d8262385d190",
        "a37d163a-2647-4ca0-bc6c-cad0f82646e3"
    ]
}

参数说明

  • http url
参数参数描述必选类型范围默认值
InstanceId实例IDuuidV4实例ID无,必需

-返回结果

字段字段名称取值特征补充描述
InstanceId实例IDuuidV4实例Id
TenantId租户IDuuidV4租户ID
Name实例名称string长度不大于100,由数字字母以及"-"和"_"组成
Type实例类型mix/vpc_mix/tcp/httpmix为经典网络负载均衡;vpc_mix为vpc网络负载均衡;tcp/http类型不提供创建,只支持老实例维护,新特性不会支持这两种类型
Network网络类型public/private/idc分别公有网/私有网/机房网
Description实例描述string长度不超过200
AddressIP地址-负载均衡实例入口地址,VPC内网返回域名,外网返回外网IP,机房网返回机房网IP
Status实例状态WORKING/DELETING/UPDATING/FAILEDLB实例总状态,分别为正常工作中/删除中/更新中/失败
SubStatus实例子状态CREATE_FAILED/DELETE_FAILED失败时子状态信息
InstanceStatus用户主机状态概览DOWN/UP用户主机状态只要有一个异常则为DOWN
Createtime创建时间number单位毫秒
Updatetime更新时间number单位毫秒
InstanceNum用户主机数量number统计用户主机数量,各个目标组里面云主机累加值
VpcIdVpc IduuidV4负载均衡实例所属vpc网络Id
Standard计费参数json-
Standard->ChargeMode计费模式netflow/bandwidthnetflow按流量计费(默认值);bandwidth 按带宽计费
Standard->ChargeType计费类型AMOUNT/RESERVEDAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->BandwidthLimit带宽限制1-1000可以提工单调整上限值
Standard->AutoRenewPeriod自动续费月数number取值为1至9个月,12个月,24个月,0表示关闭(默认值)
Standard->Period订单时长number下订单月数,1至9月,12月,24月
TopAzInfos可用区信息array of josn-
TopAzInfos->TopAz可用区string可用区
TopAzInfos->SubNetId子网Idstring用户子网
Listeners监听信息josn-
Listeners->ListenerId监听IDuuidV4-
Listeners->Name监听名字string长度不超过64
Listeners->Status监听状态ON、OFFON表示正常,OFF表示异常
Listeners->ListenPort监听端口numbertcp/tls:2-65535、http:80,1025-65535、https:443,1025-65535
Listeners->Protocol监听协议stringtcp/http/https/tls
Listeners->Createtime监听创建时间number单位毫秒
Listeners->Updatetime监听修改时间number时间戳,单位毫秒
Listeners->TraceVipvip 跟踪0/1在HTTP HEARDER中带NLB-VIP头部,VALUE为Address,配合apm监控
Listeners->Balance负载均衡算法roundrobin/leastconnroundrobin 加权轮询(默认值);leastconn 加权最少连接数
Listeners->Gziphttp压缩0/10代表关闭(默认值);1代表打开gip功能
Listeners->ForwardPort转发X-Forwarded-Port头部0/10代表关闭(默认值);1代表打开该功能
Listeners->CipherSuiteId加密套件ID-https可以指定加密套件,https://www.163yun.com/help/documents/101493766532288512
Listeners->Clusters后端集群json根据path/domain来分流的时候,允许有多个,对于tcp只有一个后端集群
Listeners->Clusters->Id集群IDuuidV4-
Listeners->Clusters->CertIdhttps 证书iduuidV4https必须有
Listeners->Clusters->Name集群名字string备注:字段删除
Listeners->Clusters->Path路径string不超过128,支持多个url,每个url以空格分隔,普通url的格式为:满足以‘/’开头,并且由数字和字母开头的;支持pcre规则的正则表达式;匹配优先级为普通字符串>正则表达式 类型相同时,长度优先
Listeners->Clusters->ServerName域名string长度不超过512,支持多个serverName, 以空格分隔,普通域名由字母数字以及.组成, 通配符域名*.在最前面和.*在最后面;支持pcrl正则表达式,优先级为普通域名> 通配符 > 正则表达式,类型相同时,长度最长先匹配; 整体优先级serverName > path
Listeners->Clusters->ClusterPort集群端口numbertcp:2-65535、http:80,1025-65535、https:443,1025-65535,备注: 没有使用这个字段
Listeners->Clusters->Createime集群创建时间number单位毫秒
Listeners->Clusters->Updatetime集群修改时间number单位毫秒
Listeners->Clusters->TargetGroupId目标组IduuidV4创建监听指定目标组id
Listeners->Clusters->Monitor健康检查json-
Listeners->Clusters->Monitor->Protocol检查协议http/tcp目前仅支持http和tcp,其它协议后期开放
Listeners->Clusters->Monitor->Fall失败阈值2-10默认值为:3
Listeners->Clusters->Monitor->Rise健康阈值2-10默认值为: 2
Listeners->Clusters->Monitor->Url健康检查urlstring以/开头,数字和字母结尾,最长127个字符,默认为/,仅仅在http检查协议时使用
Listeners->Clusters->Monitor->Period健康检查间隔5000-300000默认5000, 单位毫秒
Listeners->Clusters->Monitor->Rstatus健康检查期望返回码string限制为'2xx', '3xx', '4xx', 以“,”分隔,仅仅在http时有效, 没有配置时,返回2xx和3xx代表健康
Listeners->Clusters->Monitor->Timeout超时时间2000-60000默认2000,单位毫秒
Listeners->Clusters->Policy会话保持策略jsonhttp监听有效
Listeners->Clusters->Policy->Mode模式stringinsert或者rewrite模式
Listeners->Clusters->Policy->CookieNamecookie 名字string,长度不超过1000rewrite必选,insert没有使用,由数字字母以及"-"和"_"组成
Listeners->Clusters->Policy->Expire失效时间number,0-86400默认30000,单位秒
SecurityGroups安全组IDarray of string-
VpcIps负载均衡占用的ip 地址array of string
Limit配额信息json-
Limit->TGroupLimit目标组个数限制默认20提工单修改
Limit->TGroupInstanceLimit目标组的云主机个数限制默认50提工单修改
Limit->ListenerLimit监听器个数限制默认10提工单修改
Limit->PathLimit单个监听器Path限制默认30提工单修改
Limit->DomainLimit单个监听器域名限制默认5提工单修改
TargetGroups目标组json-
TargetGroups->Name目标组名字长度不大于32只能由大小写字母和数字组成
TargetGroups->TargetGroupId目标组IduuidV4-
TargetGroups->Createtime创建时间-单位毫秒
TargetGroups->Updatetime修改时间-单位毫秒
TargetGroups->ListenerId绑定监听器Id--
TargetGroups->Instances用户主机array of json-
TargetGroups->Instances->Id云主机uuid--
TargetGroups->Instances->Name云主机名字由数字字母以及"-"和"_"组成, 长度超过64会被截断-
TargetGroups->Instances->AddressIp-主机地址
TargetGroups->Instances->Port云主机端口1-65535-
TargetGroups->Instances->Status云主机状态UP/DOWN健康检查实时状态
TargetGroups->Instances->Weight云主机权重1-100内整数默认100
TargetGroups->Instances->TopAz云主机可用区-可用区
TargetGroups->Instances->Backup备用主机0/11处于备用状态,只有其余非备用的机器都处于异常状态才会转发流量;0处于正常状态(默认值)
TargetGroups->UseSamePort集群所有后端使用相同端口标志0/11表示所有服务器是否使用相同端口

返回码

  • 204 查询成功
  • 404 实例不存在
  • 403 权限错误
  • 500 内部错误

3. 检查实例

POST https://open.cn-east-1.163yun.com/nlb?Action=CheckLoadBalancerParams&Version=2017-12-05

示例

请求:
POST https://open.cn-east-1.163yun.com/nlb?Action=CheckLoadBalancerParams&Version=2017-12-05

HEADER:
    Content-type: application/json
    
BODY:
    {
        "Name": "lb-1",
        "Description" : "test description",
        "Type": "vpc_mix",
        "Network": "public",
        "TopAzInfos": [
            {
                "TopAz":"cn-east-1b", 
                "SubNetId": "13f009c8-e661-41cd-bc58-1f4a79bb728c"
            }
        ],
        "SecurityGroups": [
            "92282f88-4940-4aea-8dfc-4774fe1d90df"
        ],
        "VpcId": "8d71d5e7-e621-46fa-9ab9-69844d698015",
        "Standard": {
            "ChargeType": "AMOUNT",
            "BandwidthLimit": 100,
            "ChargeMode": "netflow",
            "AutoRenewPeriod": 10
        }
    }

响应:
    无 

参数说明

  • http body
参数参数描述是否必选类型范围默认值说明
Name负载均衡名字string长度不大于100,由数字字母以及"-"和"_"组成同一个租户下实例名唯一
Type类型stringmix/vpc_mix/tcp/httphttp备注:默认值修改为vpc_mix
Network网络类型stringpublic/private/idcpublic-
Description用户描述信息string长度不大于200-
Standard->BandwidthLimit带宽限制number1-1000100单位Mbps, 默认值每个可用区不同
Standard->ChargeType计费类型stringAMOUNT/RESERVEDAMOUNTAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->ChargeMode计费方式stringnetflow/bandwidthnetflownetflow按流量计费(默认值);bandwidth 按带宽计费
Standard->AutoRenewPeriod自动续费number1-9,12,24-自动续费月数、0表示关闭
Standard->Period周期number1-9,12,24-下订单月数,1-9,12,24
TopAzInfos指定可用区和子网信息vpc_mix类型为必选array of json--
TopAzInfo->TopAz可用区vpc_mix类型为必选string---
TopAzInfo->SubNetId子网IDvpc_mix类型为必选string--用户子网
SecurityGroups指定安全组vpc_mix类型为必选array of string--
VpcId指定vpc Idvpc_mix类型为必选string--

结果说明

返回码

  • 200 检查成功
  • 400 参数错误
  • 403 权限错误
  • 409 重复创建
  • 500 内部错误

4. 创建实例

POST https://open.cn-east-1.163yun.com/nlb?Action=CreateLoadBalancer&Version=2017-12-05

示例

请求:
POST https://open.cn-east-1.163yun.com/nlb?Action=CreateLoadBalancer&Version=2017-12-05

HEADER:
    Content-type: application/json
    
BODY:
    {
        "Name": "lb-1",
        "Description" : "test description",
        "Type": "vpc_mix",
        "Network": "public"
        "TopAzInfos": [
            {
                "TopAz":"cn-east-1b", 
                "SubNetId": "13f009c8-e661-41cd-bc58-1f4a79bb728c"
            }
        ],
        "SecurityGroups": [
            "92282f88-4940-4aea-8dfc-4774fe1d90df"
        ],
        "VpcId": "8d71d5e7-e621-46fa-9ab9-69844d698015",
        "Standard": {
          "ChargeType": "AMOUNT",
          "BandwithLimit": 100,
          "ChargeMode": "netflow",
          "AutoRenewPeriod": 10
        }
    }

响应:
    {
        "InstanceId": "0213f923-fc3c-4337-ada6-9512c4ff5506",
        "TenantId": "06358fcd-7266-4bad-a664-ab697377a48e",
        "Address": "60.191.87.55",
        "Status": "CREATING",
        "Name": "lb-1",
        "Description" : "test description",
        "Type": "vpc_mix",
        "Network": "public"
        "TopAzInfos": [
            {
                "TopAz":"cn-east-1b", 
                "SubNetId": "13f009c8-e661-41cd-bc58-1f4a79bb728c"
            }
        ],
        "SecurityGroups": [
            "92282f88-4940-4aea-8dfc-4774fe1d90df"
        ],
        "VpcId": "8d71d5e7-e621-46fa-9ab9-69844d698015",
        "Standard": {
          "ChargeType": "AMOUNT",
          "BandwithLimit": 100,
          "ChargeMode": "netflow",
          "AutoRenewPeriod": 10
          "Period": 20,
          "OrderId": "112b8749-0fdb-4add-834a-220471a64f5d"
        }

    }

参数说明

  • http body
参数参数描述是否必选类型范围默认值说明
Name负载均衡名字string长度不大于100,由数字字母以及"-"和"_"组成同一个租户下实例名唯一
Type类型stringmix/vpc_mix/tcp/httphttp备注:默认值修改为vpc_mix
Network网络类型stringpublic/private/idcpublic-
Description用户描述信息string长度不大于200-
Standard->BandwidthLimit带宽限制number1-1000100单位Mbps, 默认值每个可用区不同
Standard->ChargeType计费类型stringAMOUNT/RESERVEDAMOUNTAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->ChargeMode计费方式stringnetflow/bandwidthnetflownetflow按流量计费(默认值);bandwidth 按带宽计费
Standard->AutoRenewPeriod自动续费number1-9,12,240自动续费月数、0表示关闭
Standard->Period周期number1-9,12,240下订单月数,1-9,12,24
TopAzInfos指定可用区和子网信息vpc_mix类型为必选array of json--
TopAzInfo->TopAz可用区vpc_mix类型为必选string---
TopAzInfo->SubNetId子网IDvpc_mix类型为必选string--用户子网
SecurityGroups指定安全组vpc_mix类型为必选array of string--
VpcId指定vpc Idvpc_mix类型为必选string--

-返回结果

字段字段名称取值特征字段描述
InstanceId实例IDuuidV4-
TenantId租户IDuuidV4租户ID
Name实例名称长度不大于100,由数字字母以及"-"和"_"组成-
Type实例类型mix/vpc_mix/tcp/httpmix为经典网络负载均衡;vpc_mix为vpc网络负载均衡;tcp/http类型不提供创建,只支持老实例维护,新特性不会支持这两种类型
Network网络类型public/private/idc分别公有网/私有网/机房网
Description实例描述长度不超过200-
AddressIP地址访问LB服务的VIP地址负载均衡实例入口地址,VPC内网返回域名,外网返回外网IP,机房网返回机房网IP
Status实例状态WORKING/DELETING/UPDATING/FAILEDLB实例总状态,分别为正常工作中/删除中/更新中/失败
SubStatus实例子状态CREATE_FAILED/DELETE_FAILED失败时子状态信息
InstanceStatus用户主机状态概览DOWN/UP用户主机状态只要有一个异常则为DOWN
Createtime创建时间number单位毫秒
Updatetime更新时间number单位毫秒
InstanceNum用户主机数量number统计用户主机数量,各个目标组里面云主机累加值
VpcIdVpc IduuidV4负载均衡实例所属vpc网络Id
Standard计费参数json-
Standard->ChargeMode计费模式netflow/bandwidthAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->ChargeType计费类型AMOUNT/RESERVEDAMOUNT 按小时收费(默认值) RESERVED按月计费
Standard->BandwidthLimit带宽限制1-1000可以提工单调整上限值
Standard->AutoRenewPeriod自动续费月数number取值为1至9个月,12个月,24个月,0表示关闭(默认值)
Standard->Period周期number下订单月数,1-9,12,24
TopAzInfos可用区信息array of json-
TopAzInfos->TopAz可用区string-
TopAzInfos->SubNetId子网信息string-
VpcIdvpc Idstring负载均衡实例所属vpc网络Id
SecurityGroups安全组信息array of string-

返回码

  • 204 创建成功
  • 400 参数错误
  • 403 权限错误
  • 409 重复创建
  • 500 内部错误

5. 删除实例

GET https://open.cn-east-1.163yun.com/nlb?Action=DeleteLoadBalancer&InstanceId=&Version=2017-12-05

示例

请求:
GET https://open.cn-east-1.163yun.com/nlb?Action=DeleteLoadBalancer&InstanceId=87fc274b-4d43-4648-a999-dc916a260246&Version=2017-12-05

HEADER:
    Content-type: application/json
    

响应:
    无

参数说明

  • http url
参数参数描述是否必选类型范围默认值
InstanceId实例IduuidV4--

结果说明

返回码

  • 204 删除成功
  • 400 参数错误
  • 403 权限错误
  • 500 内部错误

6. 修改实例

POST https://open.cn-east-1.163yun.com/nlb?Action=UpdateLoadBalancer&Version=2017-12-05

示例

请求:
POST https://open.cn-east-1.163yun.com/nlb?Action=UpdateLoadBalancer&Version=2017-12-05

HEADER:
    Content-type: application/json
    

BODY:
    {
        "InstanceId": "01dfd813-3bf3-4199-ba97-39f59ab8e64c",
		"description": "update description"
    }
响应:
    无

参数说明

  • http body
参数参数描述是否必选类型范围默认值
InstanceId实例IduuidV4--
Description描述信息string不超过200-

结果说明

返回码

  • 200 修改成功
  • 400 参数错误
  • 403 权限错误
  • 404 目标不存在
  • 500 内部错误

7. 更改规格

POST https://open.cn-east-1.163yun.com/nlb?Action=UpdateLoadBalancerSpec&Version=2017-12-05

示例

请求:
POST https://open.cn-east-1.163yun.com/nlb?Action=UpdateLoadBalancerSpec&Version=2017-12-05

HEADER:
    Content-type: application/json
    

BODY:
    {
        "InstanceId": "01dfd813-3bf3-4199-ba97-39f59ab8e64c",
        "Standard": {
          "BandwidthLimit": 100
        }
    }
响应:
    无

参数说明

  • http body
参数参数描述是否必选类型范围默认值说明
InstanceId实例IDuuidV4---
Standard->BandwidthLimit带宽限制number1-1000内整数, 单位Mbps-最大带宽可配
Standard->ChargeType计费类型stringAMOUNT/RESERVED-AMOUNT按小时、RESERVED按月
Standard->ChargeMode计费方式stringnetflow/bandwidth-netflow流量、bandwidth带宽
Standard->AutoRenewPeriod自动续费number1-9,12,24-自动续费月数,0表示关闭改功能
Standard->OrderId订单IDstring由计费生成-订单支付,无则后台下单余额支付

结果说明

返回码

  • 200 修改成功
  • 400 参数错误
  • 403 权限错误
  • 500 内部错误

8. 订单续费

GET https://open.cn-east-1.163yun.com/nlb?Action=RenewOrder&Version=2017-12-05

示例

请求:
GET https://open.cn-east-1.163yun.com/nlb?Action=RenewOrder&InstanceId=0213f923-fc3c-4337-ada6-9512c4ff5506&Period=14&Version=2017-12-05

HEADER:
    Content-type: application/json
    

响应:
    {
        "OrderId": "074723ee-994c-43b1-a193-86403112390d",
		"Period": 2
    }

参数说明

  • http body
参数参数描述是否必选类型范围默认值
InstanceId实例IDuuidV4--
Period时长月number1-9,12,24-

结果说明

  • OrderId: 订单Id

返回码

  • 200 修改成功
  • 400 参数错误
  • 403 权限错误
  • 409 重复创建
  • 500 内部错误

9. 获取负载均衡实例的总数

GET /nlb?Action=GetLoadBalancerCount&Version=2017-12-05

示例

请求:
GET /nlb?Action=GetLoadBalancerCount&Version=2017-12-05

HEADER:
    Content-type: application/json
    X-Product-Id: ${tenantId}

响应:
    {
    "Mix": 4,
    "Vpc_mix": 3,
    "Http": 1,
    "Tcp": 0,
    "Total": 8
    }

参数说明

  • http header
参数参数描述是否必选类型说明
X-Product-Id租户IDstring定长32租户ID

结果说明

字段字段名称取值特征字段描述
Total总计正整数所有实例的总数
MixMix总计正整数Mix类型实例的总数
Vpc_mixVpc总计正整数Vpc类型实例的总数
HttpHttp总计正整数Http类型实例的总数
TcpTcp总计正整数Tcp类型实例的总数

返回码

  • 200 成功
  • 500 内部错误

10. 获取可用LB资源池ID列表

GET /nlb?Action=DescribeResourcePools&Version=2017-12-05

示例

请求:
GET /nlb?Action=DescribeResourcePools&Version=2017-12-05

HEADER:
    Content-type: application/json
    X-Product-Id: ${tenantId}
响应:
{
  "ResourcePoolList": [
    {
      "PoolId": "82e201ce-2868-40a0-a4d7-5be142b7ee65",
      "PoolName": "pool_1",
      "PoolType": "network",
      "DistributorName": "yiwu",
      "IsDec": 1,
      "Properties": {
        "DistributorUser": "yiwu",
        "Series": "n1"
      }
    }
  ],
  "Code": "Success",
  "Message": "调用成功"
}

参数说明

  • http header
参数参数描述是否必选类型范围默认值说明
TenantId租户IDuuid--

结果说明

字段字段名称取值特征字段描述
ResourcePoolList资源池列表array of json资源池列表
PoolId资源池IDuuid资源池ID
PoolName资源池名称string资源池名称
PoolType资源池类型string资源池类型, compute:计算型资源池、network:网络型资源池、storage:存储型资源池
DistributorName资源池归属的用户组织string资源池归属的用户组织,如yiwu、public
IsDec是否专属独占资源整数1:专属资源;0:公有云资源
Properties自定义属性json所有业务方自定义的属性

返回码

  • 200 成功
  • 500 内部错误