mirror of
https://github.com/FlipsideCrypto/databricks-sdk-golang.git
synced 2026-02-06 10:57:34 +00:00
update ClusterAPI.create() response
This commit is contained in:
parent
c8ef0a9689
commit
bde69468a6
@ -18,16 +18,16 @@ func (a ClustersAPI) init(client DBClient) ClustersAPI {
|
||||
}
|
||||
|
||||
// Create creates a new Spark cluster
|
||||
func (a ClustersAPI) Create(cluster models.NewCluster) (models.ClusterInfo, error) {
|
||||
var clusterInfo models.ClusterInfo
|
||||
|
||||
func (a ClustersAPI) Create(cluster models.NewCluster) (models.NewClusterResponse, error) {
|
||||
var clusterResp models.NewClusterResponse
|
||||
|
||||
resp, err := a.Client.performQuery(http.MethodPost, "/clusters/create", cluster, nil)
|
||||
if err != nil {
|
||||
return clusterInfo, err
|
||||
return clusterResp, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(resp, &clusterInfo)
|
||||
return clusterInfo, err
|
||||
|
||||
err = json.Unmarshal(resp, &clusterResp)
|
||||
return clusterResp, err
|
||||
}
|
||||
|
||||
// Edit edits the configuration of a cluster to match the provided attributes and size
|
||||
|
||||
5
azure/models/NewClusterResponse.go
Normal file
5
azure/models/NewClusterResponse.go
Normal file
@ -0,0 +1,5 @@
|
||||
package models
|
||||
|
||||
type NewClusterResponse struct {
|
||||
ClusterID string `json:"cluster_id,omitempty" url:"cluster_id,omitempty"`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user