@@ -14,7 +14,7 @@ const (
1414// endpoints of the MongoDB Atlas API.
1515// See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot/
1616type CloudProviderSnapshotsService interface {
17- GetAllCloudProviderSnapshots (context.Context , * SnapshotReqPathParameters ) (* CloudProviderSnapshots , * Response , error )
17+ GetAllCloudProviderSnapshots (context.Context , * SnapshotReqPathParameters , * ListOptions ) (* CloudProviderSnapshots , * Response , error )
1818 GetOneCloudProviderSnapshot (context.Context , * SnapshotReqPathParameters ) (* CloudProviderSnapshot , * Response , error )
1919 Create (context.Context , * SnapshotReqPathParameters , * CloudProviderSnapshot ) (* CloudProviderSnapshot , * Response , error )
2020 Delete (context.Context , * SnapshotReqPathParameters ) (* Response , error )
@@ -61,7 +61,7 @@ type SnapshotReqPathParameters struct {
6161
6262//GetAllCloudProviderSnapshots gets all cloud provider snapshots for the specified cluster.
6363//See more: https://docs.atlas.mongodb.com/reference/api/cloud-provider-snapshot-get-all/
64- func (s * CloudProviderSnapshotsServiceOp ) GetAllCloudProviderSnapshots (ctx context.Context , requestParameters * SnapshotReqPathParameters ) (* CloudProviderSnapshots , * Response , error ) {
64+ func (s * CloudProviderSnapshotsServiceOp ) GetAllCloudProviderSnapshots (ctx context.Context , requestParameters * SnapshotReqPathParameters , listOptions * ListOptions ) (* CloudProviderSnapshots , * Response , error ) {
6565 if requestParameters .GroupID == "" {
6666 return nil , nil , NewArgError ("groupId" , "must be set" )
6767 }
@@ -71,6 +71,11 @@ func (s *CloudProviderSnapshotsServiceOp) GetAllCloudProviderSnapshots(ctx conte
7171
7272 path := fmt .Sprintf ("%s/%s/clusters/%s/backup/snapshots" , cloudProviderSnapshotsBasePath , requestParameters .GroupID , requestParameters .ClusterName )
7373
74+ path , err := setListOptions (path , listOptions )
75+ if err != nil {
76+ return nil , nil , err
77+ }
78+
7479 req , err := s .Client .NewRequest (ctx , http .MethodGet , path , nil )
7580 if err != nil {
7681 return nil , nil , err
0 commit comments