// List Retrieve all the buckets for the specified project.
//
// See more: https://docs.atlas.mongodb.com/reference/api/cloud-backup/export/get-all-export-buckets/
List Retrieve all the buckets for the specified project.


// List Retrieve all the buckets for the specified project . // // See more : https : // docs . atlas . mongodb . com / reference / api / cloud - backup / export / get - all - export - buckets /
func (c CloudProviderSnapshotExportBucketsServiceOp) List(ctx context.Context, projectID string, options *ListOptions) (*CloudProviderSnapshotExportBuckets, *Response, error) {
	if projectID == "" {
		return nil, nil, NewArgError("projectID", "must be set")
	}
	path := fmt.Sprintf(cloudProviderSnapshotExportBucketsPath, projectID)
	path, err := setListOptions(path, options)
	if err != nil {
		return nil, nil, err
	}
	req, err := c.Client.NewRequest(ctx, http.MethodGet, path, nil)
	if err != nil {
		return nil, nil, err
	}
	root := new(CloudProviderSnapshotExportBuckets)
	resp, err := c.Client.Do(ctx, req, root)
	if err != nil {
		return nil, resp, err
	}
	if l := root.Links; l != nil {
		resp.Links = l
	}
	return root, resp, nil
}
func ( c CloudProviderSnapshotExportBucketsServiceOp ) List ( ctx context . Context , projectID string , options * ListOptions ) ( * CloudProviderSnapshotExportBuckets , * Response , error ) { if projectID == " " { return nil , nil , NewArgError ( " " , " " ) } path := fmt . Sprintf ( cloudProviderSnapshotExportBucketsPath , projectID ) path , err := setListOptions ( path , options ) if err != nil { return nil , nil , err } req , err := c . Client . NewRequest ( ctx , http . MethodGet , path , nil ) if err != nil { return nil , nil , err } root := new ( CloudProviderSnapshotExportBuckets ) resp , err := c . Client . Do ( ctx , req , root ) if err != nil { return nil , resp , err } if l := root . Links ; l != nil { resp . Links = l } return root , resp , nil }
List Retrieve all the buckets for the specified project.
List Retrieve all the buckets for the specified project .