源站池接口
更新时间:2026-11-06
源站池接口
创建源站池接口
您可以参考API文档获取参数的详细信息:创建源站池接口
PHP
1$client = new EoClient($EO_CONFIG);
2$originPool = array(
3 'name' => 'test',
4 'originConfig' => array(
5 array(
6 'addr' => 'your.bos.bucket1.name',
7 'type' => 'BUCKET',
8 'host' => 'test.host.com',
9 'weight' => 50,
10 'thirdBucketAuth' => array(
11 'authType' => 'bos',
12 'enabled' => false,
13 ),
14 ),
15 array(
16 'addr' => 'your.bos.bucket2.name',
17 'type' => 'BUCKET',
18 'host' => 'test.host.com',
19 'weight' => 50,
20 'thirdBucketAuth' => array(
21 'authType' => 'bos',
22 'enabled' => true,
23 ),
24 ),
25 array(
26 'addr' => 'test.s3.com',
27 'type' => 'DOMAIN',
28 'host' => 'test.host.com',
29 'weight' => 50,
30 'thirdBucketAuth' => array(
31 'authType' => 'aws_v4',
32 'enabled' => true,
33 'ak' => 'your ak',
34 'sk' => 'your sk',
35 'bucket' => 'your bucket',
36 ),
37 ),
38 array(
39 'addr' => 'test.origin.com',
40 'type' => 'DOMAIN',
41 'weight' => 50,
42 'host' => 'test.host.com',
43 ),
44 array(
45 'addr' => '1.2.3.4',
46 'type' => 'IP',
47 'weight' => 50,
48 'host' => 'test.host.com',
49 ),
50 ),
51);
52
53$resp = $client->createOriginPool('test-sdk-eo.baidu.com', $originPool);
54print_r($resp);
查询源站池接口
您可以参考API文档获取参数的详细信息:查询源站池接口
PHP
1$client = new EoClient($EO_CONFIG);
2$query = array(
3 'originPoolId' => 'geo_LGKm6ryALtnO',
4);
5
6$resp = $client->getOriginPools('test-sdk-eo.baidu.com', $query);
7print_r($resp);
修改源站池接口
您可以参考API文档获取参数的详细信息:修改源站池接口
PHP
1$client = new EoClient($EO_CONFIG);
2$originPool = array(
3 'name' => 'test',
4 'originConfig' => array(
5 array(
6 'addr' => 'your.bos.bucket1.name',
7 'type' => 'BUCKET',
8 'host' => 'test.host.com',
9 'weight' => 50,
10 'thirdBucketAuth' => array(
11 'authType' => 'bos',
12 'enabled' => false,
13 ),
14 ),
15 array(
16 'addr' => 'your.bos.bucket2.name',
17 'type' => 'BUCKET',
18 'host' => 'test.host.com',
19 'weight' => 50,
20 'thirdBucketAuth' => array(
21 'authType' => 'bos',
22 'enabled' => true,
23 ),
24 ),
25 array(
26 'addr' => 'test.s3.com',
27 'type' => 'DOMAIN',
28 'host' => 'test.host.com',
29 'weight' => 50,
30 'thirdBucketAuth' => array(
31 'authType' => 'aws_v4',
32 'enabled' => true,
33 'ak' => 'your ak',
34 'sk' => 'your sk',
35 'bucket' => 'your bucket',
36 ),
37 ),
38 array(
39 'addr' => 'test.origin.com',
40 'type' => 'DOMAIN',
41 'weight' => 50,
42 'host' => 'test.host.com',
43 ),
44 array(
45 'addr' => '1.2.3.4',
46 'type' => 'IP',
47 'weight' => 50,
48 'host' => 'test.host.com',
49 ),
50 ),
51);
52
53$resp = $client->updateOriginPool(
54 'test-sdk-eo.baidu.com',
55 'geo_LGKm6ryALtnO',
56 $originPool
57);
58print_r($resp);
删除源站池接口
您可以参考API文档获取参数的详细信息:删除源站池接口
PHP
1$client = new EoClient($EO_CONFIG);
2$resp = $client->deleteOriginPool(
3 'test-sdk-eo.baidu.com',
4 'geo_tZhP32iF2mWU'
5);
6print_r($resp);
评价此篇文章
