Skip to content

Commit 4e1adef

Browse files
committed
[EVS] v2 API Update
1 parent 2d00dbd commit 4e1adef

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package disk
2+
3+
type CreateVolumeRequestBody struct {
4+
//
5+
BssParam BssParamForCreateVolume `json:"bssParam,omitempty"`
6+
//
7+
Volume CreateVolumeOption `json:"volume"`
8+
//
9+
ServerId string `json:"server_id,omitempty"`
10+
//
11+
OSSCHHNTschedulerHints CreateVolumeSchedulerHints `json:"OS-SCH-HNT:scheduler_hints,omitempty"`
12+
}
13+
14+
type BssParamForCreateVolume struct {
15+
//
16+
ChargingMode string `json:"chargingMode,omitempty"`
17+
//
18+
IsAutoPay string `json:"isAutoPay,omitempty"`
19+
//
20+
IsAutoRenew string `json:"isAutoRenew,omitempty"`
21+
//
22+
PeriodNum int32 `json:"periodNum,omitempty"`
23+
//
24+
PeriodType string `json:"periodType,omitempty"`
25+
}
26+
27+
type CreateVolumeOption struct {
28+
//
29+
AvailabilityZone string `json:"availability_zone"`
30+
//
31+
BackupId string `json:"backup_id,omitempty"`
32+
//
33+
Count int32 `json:"count,omitempty"`
34+
//
35+
Description string `json:"description,omitempty"`
36+
//
37+
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
38+
//
39+
ImageRef string `json:"imageRef,omitempty"`
40+
//
41+
Metadata map[string]string `json:"metadata,omitempty"`
42+
//
43+
Multiattach bool `json:"multiattach,omitempty"`
44+
//
45+
Name string `json:"name,omitempty"`
46+
//
47+
Size int32 `json:"size"`
48+
//
49+
SnapshotId string `json:"snapshot_id,omitempty"`
50+
//
51+
VolumeType string `json:"volume_type"`
52+
//
53+
Tags map[string]string `json:"tags,omitempty"`
54+
}
55+
56+
type CreateVolumeSchedulerHints struct {
57+
//
58+
DedicatedStorageId string `json:"dedicated_storage_id,omitempty"`
59+
}
60+
61+
// POST /v2/{project_id}/cloudvolumes
62+
63+
type CreateVolumeResponse struct {
64+
//
65+
JobId string `json:"job_id,omitempty"`
66+
//
67+
OrderId string `json:"order_id,omitempty"`
68+
//
69+
VolumeIds []string `json:"volume_ids,omitempty"`
70+
}

0 commit comments

Comments
 (0)