Skip to content

Commit 84e5b05

Browse files
add updates
1 parent b4895ac commit 84e5b05

4 files changed

Lines changed: 389 additions & 0 deletions

File tree

src/Ydapp/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 更新历史 #
2+
API版本:1.0.0
3+
4+
| 发布时间 | 版本号 | 更新 | 说明 |
5+
|------------|-------|--|-----------------------|
6+
| 2025-04-28 | 1.0.0 | 初始化版本 | *初始化开放接口 |

src/Ydapp/YdappClient.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* Ydapp
4+
*
5+
* @category Jdcloud
6+
* @package Jdcloud\Ydapp
7+
* @author Jdcloud <jdcloud-api@jd.com>
8+
* @license Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
9+
* @link https://www.jdcloud.com/help/faq
10+
*/
11+
12+
namespace Jdcloud\Ydapp;
13+
14+
use Jdcloud\JdCloudClient;
15+
use Jdcloud\Api\Service;
16+
use Jdcloud\Api\DocModel;
17+
use Jdcloud\Api\ApiProvider;
18+
use Jdcloud\PresignUrlMiddleware;
19+
20+
/**
21+
* Client used to interact with ydapp.
22+
*
23+
* @method \Jdcloud\Result describeApps(array $args = [])
24+
* @method \GuzzleHttp\Promise\Promise describeAppsAsync(array $args = [])
25+
* @method \Jdcloud\Result deleteCustomImage(array $args = [])
26+
* @method \GuzzleHttp\Promise\Promise deleteCustomImageAsync(array $args = [])
27+
* @method \Jdcloud\Result describeCustomImages(array $args = [])
28+
* @method \GuzzleHttp\Promise\Promise describeCustomImagesAsync(array $args = [])
29+
* @method \Jdcloud\Result describeCustomRegistryToken(array $args = [])
30+
* @method \GuzzleHttp\Promise\Promise describeCustomRegistryTokenAsync(array $args = [])
31+
* @method \Jdcloud\Result deploy(array $args = [])
32+
* @method \GuzzleHttp\Promise\Promise deployAsync(array $args = [])
33+
* @method \Jdcloud\Result describeDeployTask(array $args = [])
34+
* @method \GuzzleHttp\Promise\Promise describeDeployTaskAsync(array $args = [])
35+
* @method \Jdcloud\Result stopDeployTask(array $args = [])
36+
* @method \GuzzleHttp\Promise\Promise stopDeployTaskAsync(array $args = [])
37+
* @method \Jdcloud\Result describeGroups(array $args = [])
38+
* @method \GuzzleHttp\Promise\Promise describeGroupsAsync(array $args = [])
39+
*/
40+
class YdappClient extends JdCloudClient
41+
{
42+
public function __construct(array $args)
43+
{
44+
$args['with_resolved'] = function (array $args) {
45+
$this->getHandlerList()->appendInit(
46+
PresignUrlMiddleware::wrap(
47+
$this,
48+
$args['endpoint_provider'],
49+
[
50+
'operations' => [
51+
],
52+
'service' => 'ydapp',
53+
'presign_param' => 'PresignedUrl',
54+
]
55+
),
56+
'ydapp'
57+
);
58+
};
59+
60+
parent::__construct($args);
61+
}
62+
}

src/data/manifest.json.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@
469469
'namespace' => 'Xdata',
470470
'versions' => [ 'latest' => 'v1', ],
471471
],
472+
'ydapp' => [
473+
'namespace' => 'Ydapp',
474+
'versions' => [ 'latest' => 'v1', ],
475+
],
472476
'openjrtc' => [
473477
'namespace' => 'Openjrtc',
474478
'versions' => [ 'latest' => 'v1', ],

src/data/ydapp/v1/api-2.json.php

Lines changed: 317 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,317 @@
1+
<?php
2+
// This file was auto-generated
3+
return [
4+
// 'version' => '',
5+
'metadata' =>
6+
[
7+
// 'apiVersion' => '',
8+
// 'endpointPrefix' => 'ydapp',
9+
'protocol' => 'json',
10+
// 'serviceFullName' => 'ydapp',
11+
// 'serviceId' => 'ydapp',
12+
],
13+
'operations' => [
14+
'DescribeApps' => [
15+
'name' => 'DescribeApps',
16+
'http' => [
17+
'method' => 'GET',
18+
'requestUri' => '/2.0.0/apps',
19+
],
20+
'input' => [ 'shape' => 'DescribeAppsRequestShape', ],
21+
'output' => [ 'shape' => 'DescribeAppsResponseShape', ],
22+
],
23+
'DeleteCustomImage' => [
24+
'name' => 'DeleteCustomImage',
25+
'http' => [
26+
'method' => 'DELETE',
27+
'requestUri' => '/2.0.0/app/{appId}/customImage/{imageDigest}',
28+
],
29+
'input' => [ 'shape' => 'DeleteCustomImageRequestShape', ],
30+
'output' => [ 'shape' => 'DeleteCustomImageResponseShape', ],
31+
],
32+
'DescribeCustomImages' => [
33+
'name' => 'DescribeCustomImages',
34+
'http' => [
35+
'method' => 'GET',
36+
'requestUri' => '/2.0.0/app/{appId}/customImages',
37+
],
38+
'input' => [ 'shape' => 'DescribeCustomImagesRequestShape', ],
39+
'output' => [ 'shape' => 'DescribeCustomImagesResponseShape', ],
40+
],
41+
'DescribeCustomRegistryToken' => [
42+
'name' => 'DescribeCustomRegistryToken',
43+
'http' => [
44+
'method' => 'GET',
45+
'requestUri' => '/2.0.0/app/{appId}:customRegistryToken',
46+
],
47+
'input' => [ 'shape' => 'DescribeCustomRegistryTokenRequestShape', ],
48+
'output' => [ 'shape' => 'DescribeCustomRegistryTokenResponseShape', ],
49+
],
50+
'Deploy' => [
51+
'name' => 'Deploy',
52+
'http' => [
53+
'method' => 'POST',
54+
'requestUri' => '/2.0.0/app/{appId}/group/{groupId}/deploy',
55+
],
56+
'input' => [ 'shape' => 'DeployRequestShape', ],
57+
'output' => [ 'shape' => 'DeployResponseShape', ],
58+
],
59+
'DescribeDeployTask' => [
60+
'name' => 'DescribeDeployTask',
61+
'http' => [
62+
'method' => 'GET',
63+
'requestUri' => '/2.0.0/app/{appId}/group/{groupId}/deploy/{deployId}',
64+
],
65+
'input' => [ 'shape' => 'DescribeDeployTaskRequestShape', ],
66+
'output' => [ 'shape' => 'DescribeDeployTaskResponseShape', ],
67+
],
68+
'StopDeployTask' => [
69+
'name' => 'StopDeployTask',
70+
'http' => [
71+
'method' => 'POST',
72+
'requestUri' => '/2.0.0/app/{appId}/group/{groupId}/deploy/{deployId}:stop',
73+
],
74+
'input' => [ 'shape' => 'StopDeployTaskRequestShape', ],
75+
'output' => [ 'shape' => 'StopDeployTaskResponseShape', ],
76+
],
77+
'DescribeGroups' => [
78+
'name' => 'DescribeGroups',
79+
'http' => [
80+
'method' => 'GET',
81+
'requestUri' => '/2.0.0/app/{appId}/groups',
82+
],
83+
'input' => [ 'shape' => 'DescribeGroupsRequestShape', ],
84+
'output' => [ 'shape' => 'DescribeGroupsResponseShape', ],
85+
],
86+
],
87+
'shapes' => [
88+
'App' => [
89+
'type' => 'structure',
90+
'members' => [
91+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
92+
'appName' => [ 'type' => 'string', 'locationName' => 'appName', ],
93+
'systemId' => [ 'type' => 'string', 'locationName' => 'systemId', ],
94+
'createTime' => [ 'type' => 'string', 'locationName' => 'createTime', ],
95+
'updateTime' => [ 'type' => 'string', 'locationName' => 'updateTime', ],
96+
],
97+
],
98+
'Deployment' => [
99+
'type' => 'structure',
100+
'members' => [
101+
'concurrency' => [ 'type' => 'integer', 'locationName' => 'concurrency', ],
102+
'imageType' => [ 'type' => 'string', 'locationName' => 'imageType', ],
103+
'imageVersion' => [ 'type' => 'string', 'locationName' => 'imageVersion', ],
104+
'maxSurge' => [ 'type' => 'integer', 'locationName' => 'maxSurge', ],
105+
'podCount' => [ 'type' => 'integer', 'locationName' => 'podCount', ],
106+
],
107+
],
108+
'Group' => [
109+
'type' => 'structure',
110+
'members' => [
111+
'groupId' => [ 'type' => 'string', 'locationName' => 'groupId', ],
112+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
113+
'groupName' => [ 'type' => 'string', 'locationName' => 'groupName', ],
114+
'appName' => [ 'type' => 'string', 'locationName' => 'appName', ],
115+
'createTime' => [ 'type' => 'string', 'locationName' => 'createTime', ],
116+
'updateTime' => [ 'type' => 'string', 'locationName' => 'updateTime', ],
117+
],
118+
],
119+
'ImageDetail' => [
120+
'type' => 'structure',
121+
'members' => [
122+
'imageDigest' => [ 'type' => 'string', 'locationName' => 'imageDigest', ],
123+
'imagePushedAt' => [ 'type' => 'string', 'locationName' => 'imagePushedAt', ],
124+
'imageSizeMB' => [ 'type' => 'double', 'locationName' => 'imageSizeMB', ],
125+
'imageTags' => [ 'type' => 'list', 'member' => [ 'type' => 'string', ], ],
126+
'lastPullAt' => [ 'type' => 'string', 'locationName' => 'lastPullAt', ],
127+
'registryName' => [ 'type' => 'string', 'locationName' => 'registryName', ],
128+
'repositoryName' => [ 'type' => 'string', 'locationName' => 'repositoryName', ],
129+
'totalPullTimes' => [ 'type' => 'integer', 'locationName' => 'totalPullTimes', ],
130+
],
131+
],
132+
'DescribeAppsResponseShape' => [
133+
'type' => 'structure',
134+
'members' => [
135+
'result' => [ 'shape' => 'DescribeAppsResultShape', ],
136+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
137+
],
138+
],
139+
'DescribeAppsResultShape' => [
140+
'type' => 'structure',
141+
'members' => [
142+
'data' => [ 'type' => 'list', 'member' => [ 'shape' => 'App', ], ],
143+
'totalCount' => [ 'type' => 'long', 'locationName' => 'totalCount', ],
144+
],
145+
],
146+
'DescribeAppsRequestShape' => [
147+
'type' => 'structure',
148+
'members' => [
149+
'pageNum' => [ 'type' => 'integer', 'locationName' => 'pageNum', ],
150+
'pageSize' => [ 'type' => 'integer', 'locationName' => 'pageSize', ],
151+
],
152+
],
153+
'DeleteCustomImageResultShape' => [
154+
'type' => 'structure',
155+
'members' => [
156+
'success' => [ 'type' => 'boolean', 'locationName' => 'success', ],
157+
],
158+
],
159+
'DescribeCustomImagesResultShape' => [
160+
'type' => 'structure',
161+
'members' => [
162+
'imageDetails' => [ 'type' => 'list', 'member' => [ 'shape' => 'ImageDetail', ], ],
163+
'repoUri' => [ 'type' => 'string', 'locationName' => 'repoUri', ],
164+
'totalCount' => [ 'type' => 'long', 'locationName' => 'totalCount', ],
165+
],
166+
],
167+
'DeleteCustomImageRequestShape' => [
168+
'type' => 'structure',
169+
'members' => [
170+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
171+
'imageDigest' => [ 'type' => 'string', 'locationName' => 'imageDigest', ],
172+
],
173+
],
174+
'DeleteCustomImageResponseShape' => [
175+
'type' => 'structure',
176+
'members' => [
177+
'result' => [ 'shape' => 'DeleteCustomImageResultShape', ],
178+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
179+
],
180+
],
181+
'DescribeCustomImagesRequestShape' => [
182+
'type' => 'structure',
183+
'members' => [
184+
'pageNum' => [ 'type' => 'integer', 'locationName' => 'pageNum', ],
185+
'pageSize' => [ 'type' => 'integer', 'locationName' => 'pageSize', ],
186+
'version' => [ 'type' => 'string', 'locationName' => 'version', ],
187+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
188+
],
189+
],
190+
'DescribeCustomImagesResponseShape' => [
191+
'type' => 'structure',
192+
'members' => [
193+
'result' => [ 'shape' => 'DescribeCustomImagesResultShape', ],
194+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
195+
],
196+
],
197+
'DescribeCustomRegistryTokenResultShape' => [
198+
'type' => 'structure',
199+
'members' => [
200+
'authorizationToken' => [ 'type' => 'string', 'locationName' => 'authorizationToken', ],
201+
'expiresAt' => [ 'type' => 'string', 'locationName' => 'expiresAt', ],
202+
'loginCmdLine' => [ 'type' => 'string', 'locationName' => 'loginCmdLine', ],
203+
'registryUri' => [ 'type' => 'string', 'locationName' => 'registryUri', ],
204+
'username' => [ 'type' => 'string', 'locationName' => 'username', ],
205+
],
206+
],
207+
'DescribeCustomRegistryTokenRequestShape' => [
208+
'type' => 'structure',
209+
'members' => [
210+
'renew' => [ 'type' => 'boolean', 'locationName' => 'renew', ],
211+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
212+
],
213+
],
214+
'DescribeCustomRegistryTokenResponseShape' => [
215+
'type' => 'structure',
216+
'members' => [
217+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
218+
'result' => [ 'shape' => 'DescribeCustomRegistryTokenResultShape', ],
219+
],
220+
],
221+
'DeployRequestShape' => [
222+
'type' => 'structure',
223+
'members' => [
224+
'concurrency' => [ 'type' => 'integer', 'locationName' => 'concurrency', ],
225+
'imageType' => [ 'type' => 'string', 'locationName' => 'imageType', ],
226+
'imageVersion' => [ 'type' => 'string', 'locationName' => 'imageVersion', ],
227+
'maxSurge' => [ 'type' => 'integer', 'locationName' => 'maxSurge', ],
228+
'podCount' => [ 'type' => 'integer', 'locationName' => 'podCount', ],
229+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
230+
'groupId' => [ 'type' => 'string', 'locationName' => 'groupId', ],
231+
],
232+
],
233+
'DescribeDeployTaskResponseShape' => [
234+
'type' => 'structure',
235+
'members' => [
236+
'result' => [ 'shape' => 'DescribeDeployTaskResultShape', ],
237+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
238+
],
239+
],
240+
'StopDeployTaskRequestShape' => [
241+
'type' => 'structure',
242+
'members' => [
243+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
244+
'groupId' => [ 'type' => 'string', 'locationName' => 'groupId', ],
245+
'deployId' => [ 'type' => 'long', 'locationName' => 'deployId', ],
246+
],
247+
],
248+
'DescribeDeployTaskResultShape' => [
249+
'type' => 'structure',
250+
'members' => [
251+
'id' => [ 'type' => 'long', 'locationName' => 'id', ],
252+
'log' => [ 'type' => 'string', 'locationName' => 'log', ],
253+
'status' => [ 'type' => 'string', 'locationName' => 'status', ],
254+
'successCount' => [ 'type' => 'integer', 'locationName' => 'successCount', ],
255+
],
256+
],
257+
'DescribeDeployTaskRequestShape' => [
258+
'type' => 'structure',
259+
'members' => [
260+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
261+
'deployId' => [ 'type' => 'long', 'locationName' => 'deployId', ],
262+
'groupId' => [ 'type' => 'string', 'locationName' => 'groupId', ],
263+
],
264+
],
265+
'StopDeployTaskResultShape' => [
266+
'type' => 'structure',
267+
'members' => [
268+
'success' => [ 'type' => 'boolean', 'locationName' => 'success', ],
269+
],
270+
],
271+
'DeployResponseShape' => [
272+
'type' => 'structure',
273+
'members' => [
274+
'result' => [ 'shape' => 'DeployResultShape', ],
275+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
276+
],
277+
],
278+
'DeployResultShape' => [
279+
'type' => 'structure',
280+
'members' => [
281+
'id' => [ 'type' => 'long', 'locationName' => 'id', ],
282+
'log' => [ 'type' => 'string', 'locationName' => 'log', ],
283+
'status' => [ 'type' => 'string', 'locationName' => 'status', ],
284+
'successCount' => [ 'type' => 'integer', 'locationName' => 'successCount', ],
285+
],
286+
],
287+
'StopDeployTaskResponseShape' => [
288+
'type' => 'structure',
289+
'members' => [
290+
'result' => [ 'shape' => 'StopDeployTaskResultShape', ],
291+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
292+
],
293+
],
294+
'DescribeGroupsResponseShape' => [
295+
'type' => 'structure',
296+
'members' => [
297+
'result' => [ 'shape' => 'DescribeGroupsResultShape', ],
298+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
299+
],
300+
],
301+
'DescribeGroupsRequestShape' => [
302+
'type' => 'structure',
303+
'members' => [
304+
'pageNum' => [ 'type' => 'integer', 'locationName' => 'pageNum', ],
305+
'pageSize' => [ 'type' => 'integer', 'locationName' => 'pageSize', ],
306+
'appId' => [ 'type' => 'string', 'locationName' => 'appId', ],
307+
],
308+
],
309+
'DescribeGroupsResultShape' => [
310+
'type' => 'structure',
311+
'members' => [
312+
'data' => [ 'type' => 'list', 'member' => [ 'shape' => 'Group', ], ],
313+
'totalCount' => [ 'type' => 'long', 'locationName' => 'totalCount', ],
314+
],
315+
],
316+
],
317+
];

0 commit comments

Comments
 (0)