用量封顶接口
更新时间:2026-11-06
用量封顶接口
设置用量封顶接口
您可以参考API文档获取参数的详细信息:设置用量封顶接口
PHP
1$client = new EoClient($EO_CONFIG);
2$rule = array(
3 'object' => 'site', //站点
4 'enabled' => true,
5 'type' => 'flow',
6 'threshold' => '100GB',
7 'statisticalCycle' => 300,
8 'action' => 'stop',
9);
10
11$resp = $client->setLimitConsumption('test-sdk-eo.baidu.com', $rule);
12print_r($resp);
PHP
1$client = new EoClient($EO_CONFIG);
2$rule = array(
3 'object' => '1.test-sdk-eo.baidu.com', //域名
4 'enabled' => true,
5 'type' => 'flow',
6 'threshold' => '100GB',
7 'statisticalCycle' => 3600,
8 'action' => 'stop',
9);
10
11$resp = $client->setLimitConsumption('test-sdk-eo.baidu.com', $rule);
12print_r($resp);
查询用量封顶接口
您可以参考API文档获取参数的详细信息:查询用量封顶接口
PHP
1$client = new EoClient($EO_CONFIG);
2$query = array(
3 'pageNo' => 1,
4 'pageSize' => 20,
5);
6
7$resp = $client->getLimitConsumption('test-sdk-eo.baidu.com', $query);
8print_r($resp);
删除用量封顶接口
您可以参考API文档获取参数的详细信息:删除用量封顶接口
PHP
1$client = new EoClient($EO_CONFIG);
2$resp = $client->deleteLimitConsumption('test-sdk-eo.baidu.com', 'site');
3print_r($resp);
评价此篇文章
