Skip to content

Commit c99ffb2

Browse files
authored
feat(block): introduce public snapshots (#3027)
1 parent 1d11daa commit c99ffb2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

api/block/v1/block_sdk.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,9 @@ type Snapshot struct {
499499
// Class: storage class of the snapshot.
500500
// Default value: unknown_storage_class
501501
Class StorageClass `json:"class"`
502+
503+
// Public: true if the snapshot can be used by anyone to create a volume from.
504+
Public bool `json:"public"`
502505
}
503506

504507
// VolumeType: volume type.
@@ -578,6 +581,9 @@ type CreateSnapshotRequest struct {
578581

579582
// Tags: list of tags assigned to the snapshot.
580583
Tags []string `json:"tags"`
584+
585+
// Public: snapshots are private by default, public snapshots are mainly used to publish OS images.
586+
Public bool `json:"public"`
581587
}
582588

583589
// CreateVolumeRequest: create volume request.
@@ -865,6 +871,9 @@ type UpdateSnapshotRequest struct {
865871

866872
// Tags: list of tags assigned to the snapshot.
867873
Tags *[]string `json:"tags,omitempty"`
874+
875+
// Public: snapshots are private by default, public snapshots are mainly used to publish OS images.
876+
Public *bool `json:"public,omitempty"`
868877
}
869878

870879
// UpdateVolumeRequest: update volume request.

0 commit comments

Comments
 (0)