/
types_http_requests.go
54 lines (46 loc) · 2.19 KB
/
types_http_requests.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package types
// NewRequestObjFunc is a function that creates a new instance of the type to
// which the request body is serialized.
type NewRequestObjFunc func() interface{}
// VolumeCreateRequest is the JSON body for creating a new volume.
type VolumeCreateRequest struct {
Name string `json:"name"`
AvailabilityZone *string `json:"availabilityZone,omitempty"`
Encrypted *bool `json:"encrypted,omitempty"`
EncryptionKey *string `json:"encryptionKey,omitempty"`
IOPS *int64 `json:"iops,omitempty"`
Size *int64 `json:"size,omitempty"`
Type *string `json:"type,omitempty"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// VolumeCopyRequest is the JSON body for copying a volume.
type VolumeCopyRequest struct {
VolumeName string `json:"volumeName"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// VolumeSnapshotRequest is the JSON body for snapshotting a volume.
type VolumeSnapshotRequest struct {
SnapshotName string `json:"snapshotName"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// VolumeAttachRequest is the JSON body for attaching a volume to an instance.
type VolumeAttachRequest struct {
Force bool `json:"force,omitempty"`
NextDeviceName *string `json:"nextDeviceName,omitempty"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// VolumeDetachRequest is the JSON body for detaching a volume from an instance.
type VolumeDetachRequest struct {
Force bool `json:"force,omitempty"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// SnapshotCopyRequest is the JSON body for copying a snapshot.
type SnapshotCopyRequest struct {
SnapshotName string `json:"snapshotName"`
DestinationID string `json:"destinationID"`
Opts map[string]interface{} `json:"opts,omitempty"`
}
// SnapshotRemoveRequest is the JSON body for removing a snapshot.
type SnapshotRemoveRequest struct {
Opts map[string]interface{} `json:"opts,omitempty"`
}