Skip to content

Commit 0cd8af0

Browse files
Tanc009欧林宝
authored andcommitted
update mps/monitor/disk/xdata/streambus apis
1 parent 30a6ca3 commit 0cd8af0

135 files changed

Lines changed: 10230 additions & 308 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Eclipse
2+
.classpath
3+
.project
4+
.settings/
5+
6+
# Intellij
7+
.idea/
8+
*.iml
9+
*.iws
10+
11+
# Mac
12+
.DS_Store
13+
14+
# Maven
15+
target/
16+
17+
**/dependency-reduced-pom.xml

disk/ChangeLog.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
2018-05-10 version 0.5.0
2+
1. 增加云硬盘批量创建接口
3+
2. 增加云硬盘删除接口
4+
3. 增加云硬盘扩容接口
5+
6+
2018-04-24 version 0.4.0
7+
1. 增加云硬盘、快照名字和描述信息变更相关接口
8+
2. 增加删除快照相关接口
9+
3. 完善文档描述,针对逻辑不清楚的地方补充描述
10+
111
2018-04-08 version 0.3.1
212
1. 完善文档描述,针对逻辑不清楚的地方补充描述
313

414
2018-03-31 version: 0.2.0
515
1. 增加snapshot相关接口
6-
2. 增加云硬盘、快照名字和描述信息变更相关接口
716

817
2018-01-31 version: 0.1.0
918
1. 初始版本

disk/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.jdcloud.sdk</groupId>
77
<artifactId>disk</artifactId>
8-
<version>0.3.1</version>
8+
<version>0.5.0</version>
99
<packaging>jar</packaging>
1010
<name>disk</name>
1111
<url>http://www.jdcloud.com</url>
@@ -49,7 +49,7 @@
4949
<dependency>
5050
<groupId>com.jdcloud.sdk</groupId>
5151
<artifactId>core</artifactId>
52-
<version>1.0.0</version>
52+
<version>1.0.1</version>
5353
</dependency>
5454
<dependency>
5555
<groupId>com.jdcloud.sdk</groupId>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018-2025 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* 云硬盘相关接口
17+
* 云硬盘相关接口,提供批量创建云硬盘,查询云硬盘,删除云硬盘,对云硬盘进行扩容,修改云硬盘信息以及使用快照恢复云硬盘等功能。
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.disk.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.disk.model.CreateDisksResponse;
30+
31+
/**
32+
* 创建一块或多块云硬盘
33+
*/
34+
class CreateDisksExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "POST";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/regions/{regionId}/disks";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return CreateDisksResponse.class;
49+
}
50+
}

disk/src/main/java/com/jdcloud/sdk/service/disk/client/CreateSnapshotExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import com.jdcloud.sdk.service.disk.model.CreateSnapshotResponse;
3030

3131
/**
32-
* 为指定云硬盘创建快照调用成功返回后,新生成的快照的状态为 creating
32+
* 为指定云硬盘创建快照,新生成的快照的状态为creating
3333
*/
3434
class CreateSnapshotExecutor extends JdcloudExecutor {
3535

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018-2025 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* 云硬盘相关接口
17+
* 云硬盘相关接口,提供批量创建云硬盘,查询云硬盘,删除云硬盘,对云硬盘进行扩容,修改云硬盘信息以及使用快照恢复云硬盘等功能。
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.disk.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.disk.model.DeleteDiskResponse;
30+
31+
/**
32+
* 删除单个云硬盘
33+
*/
34+
class DeleteDiskExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "DELETE";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/regions/{regionId}/disks/{diskId}";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return DeleteDiskResponse.class;
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2018-2025 JDCLOUD.COM
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http:#www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* 快照相关接口
17+
* 快照相关接口,提供创建快照,查询快照信息,删除快照,修改快照信息等功能。
18+
*
19+
* OpenAPI spec version: v1
20+
* Contact:
21+
*
22+
* NOTE: This class is auto generated by the jdcloud code generator program.
23+
*/
24+
25+
package com.jdcloud.sdk.service.disk.client;
26+
27+
import com.jdcloud.sdk.client.JdcloudExecutor;
28+
import com.jdcloud.sdk.service.JdcloudResponse;
29+
import com.jdcloud.sdk.service.disk.model.DeleteSnapshotResponse;
30+
31+
/**
32+
* 删除单个云硬盘快照:快照状态必须为 available 或 error 状态
33+
*/
34+
class DeleteSnapshotExecutor extends JdcloudExecutor {
35+
36+
@Override
37+
public String method() {
38+
return "DELETE";
39+
}
40+
41+
@Override
42+
public String url() {
43+
return "/regions/{regionId}/snapshots/{snapshotId}";
44+
}
45+
46+
@Override
47+
public Class<? extends JdcloudResponse> returnType() {
48+
return DeleteSnapshotResponse.class;
49+
}
50+
}

disk/src/main/java/com/jdcloud/sdk/service/disk/client/DescribeDiskExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import com.jdcloud.sdk.service.disk.model.DescribeDiskResponse;
3030

3131
/**
32-
* 云硬盘信息详情
32+
* 查询云硬盘信息详情
3333
*/
3434
class DescribeDiskExecutor extends JdcloudExecutor {
3535

disk/src/main/java/com/jdcloud/sdk/service/disk/client/DescribeSnapshotExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import com.jdcloud.sdk.service.disk.model.DescribeSnapshotResponse;
3030

3131
/**
32-
* 云硬盘快照信息详情
32+
* 查询云硬盘快照信息详情
3333
*/
3434
class DescribeSnapshotExecutor extends JdcloudExecutor {
3535

disk/src/main/java/com/jdcloud/sdk/service/disk/client/DiskClient.java

Lines changed: 88 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,27 @@
4646
import com.jdcloud.sdk.service.disk.model.DescribeDiskRequest;
4747
import com.jdcloud.sdk.service.disk.model.DescribeDiskResponse;
4848
import com.jdcloud.sdk.service.disk.client.DescribeDiskExecutor;
49+
import com.jdcloud.sdk.service.disk.model.CreateDisksRequest;
50+
import com.jdcloud.sdk.service.disk.model.CreateDisksResponse;
51+
import com.jdcloud.sdk.service.disk.client.CreateDisksExecutor;
52+
import com.jdcloud.sdk.service.disk.model.ExtendDiskRequest;
53+
import com.jdcloud.sdk.service.disk.model.ExtendDiskResponse;
54+
import com.jdcloud.sdk.service.disk.client.ExtendDiskExecutor;
55+
import com.jdcloud.sdk.service.disk.model.DeleteDiskRequest;
56+
import com.jdcloud.sdk.service.disk.model.DeleteDiskResponse;
57+
import com.jdcloud.sdk.service.disk.client.DeleteDiskExecutor;
4958
import com.jdcloud.sdk.service.disk.model.DescribeSnapshotRequest;
5059
import com.jdcloud.sdk.service.disk.model.DescribeSnapshotResponse;
5160
import com.jdcloud.sdk.service.disk.client.DescribeSnapshotExecutor;
61+
import com.jdcloud.sdk.service.disk.model.DeleteSnapshotRequest;
62+
import com.jdcloud.sdk.service.disk.model.DeleteSnapshotResponse;
63+
import com.jdcloud.sdk.service.disk.client.DeleteSnapshotExecutor;
64+
import com.jdcloud.sdk.service.disk.model.ModifySnpAttributeRequest;
65+
import com.jdcloud.sdk.service.disk.model.ModifySnpAttributeResponse;
66+
import com.jdcloud.sdk.service.disk.client.ModifySnpAttributeExecutor;
67+
import com.jdcloud.sdk.service.disk.model.ModifyDiskAttributeRequest;
68+
import com.jdcloud.sdk.service.disk.model.ModifyDiskAttributeResponse;
69+
import com.jdcloud.sdk.service.disk.client.ModifyDiskAttributeExecutor;
5270

5371
/**
5472
* diskClient
@@ -57,7 +75,7 @@ public class DiskClient extends JdcloudClient {
5775

5876
public final static String ApiVersion = "v1";
5977
private final static String UserAgentPrefix = "JdcloudSdkJava";
60-
public final static String ClientVersion = "1.0.0";
78+
public final static String ClientVersion = "1.0.1";
6179
public final static String DefaultEndpoint = "disk.jdcloud-api.com";
6280
public final static String ServiceName = "disk";
6381
public final static String UserAgent = UserAgentPrefix + "/" + ClientVersion + " " + ServiceName + "/" + ApiVersion;
@@ -100,7 +118,7 @@ public static Builder builder() {
100118

101119

102120
/**
103-
* 为指定云硬盘创建快照调用成功返回后,新生成的快照的状态为 creating
121+
* 为指定云硬盘创建快照,新生成的快照的状态为creating
104122
*
105123
* @param request
106124
* @return
@@ -144,7 +162,7 @@ public DescribeSnapshotsResponse describeSnapshots(DescribeSnapshotsRequest requ
144162
}
145163

146164
/**
147-
* 云硬盘信息详情
165+
* 查询云硬盘信息详情
148166
*
149167
* @param request
150168
* @return
@@ -155,7 +173,40 @@ public DescribeDiskResponse describeDisk(DescribeDiskRequest request) throws Jdc
155173
}
156174

157175
/**
158-
* 云硬盘快照信息详情
176+
* 创建一块或多块云硬盘
177+
*
178+
* @param request
179+
* @return
180+
* @throws JdcloudSdkException
181+
*/
182+
public CreateDisksResponse createDisks(CreateDisksRequest request) throws JdcloudSdkException {
183+
return new CreateDisksExecutor().client(this).execute(request);
184+
}
185+
186+
/**
187+
* 扩容云硬盘到指定大小
188+
*
189+
* @param request
190+
* @return
191+
* @throws JdcloudSdkException
192+
*/
193+
public ExtendDiskResponse extendDisk(ExtendDiskRequest request) throws JdcloudSdkException {
194+
return new ExtendDiskExecutor().client(this).execute(request);
195+
}
196+
197+
/**
198+
* 删除单个云硬盘
199+
*
200+
* @param request
201+
* @return
202+
* @throws JdcloudSdkException
203+
*/
204+
public DeleteDiskResponse deleteDisk(DeleteDiskRequest request) throws JdcloudSdkException {
205+
return new DeleteDiskExecutor().client(this).execute(request);
206+
}
207+
208+
/**
209+
* 查询云硬盘快照信息详情
159210
*
160211
* @param request
161212
* @return
@@ -165,6 +216,39 @@ public DescribeSnapshotResponse describeSnapshot(DescribeSnapshotRequest request
165216
return new DescribeSnapshotExecutor().client(this).execute(request);
166217
}
167218

219+
/**
220+
* 删除单个云硬盘快照:快照状态必须为 available 或 error 状态
221+
*
222+
* @param request
223+
* @return
224+
* @throws JdcloudSdkException
225+
*/
226+
public DeleteSnapshotResponse deleteSnapshot(DeleteSnapshotRequest request) throws JdcloudSdkException {
227+
return new DeleteSnapshotExecutor().client(this).execute(request);
228+
}
229+
230+
/**
231+
* 修改快照的名字或描述信息
232+
*
233+
* @param request
234+
* @return
235+
* @throws JdcloudSdkException
236+
*/
237+
public ModifySnpAttributeResponse modifySnpAttribute(ModifySnpAttributeRequest request) throws JdcloudSdkException {
238+
return new ModifySnpAttributeExecutor().client(this).execute(request);
239+
}
240+
241+
/**
242+
* 修改云硬盘的名字或描述信息
243+
*
244+
* @param request
245+
* @return
246+
* @throws JdcloudSdkException
247+
*/
248+
public ModifyDiskAttributeResponse modifyDiskAttribute(ModifyDiskAttributeRequest request) throws JdcloudSdkException {
249+
return new ModifyDiskAttributeExecutor().client(this).execute(request);
250+
}
251+
168252

169253
public interface Builder {
170254
public Builder credentialsProvider(CredentialsProvider provider);

0 commit comments

Comments
 (0)