-
Notifications
You must be signed in to change notification settings - Fork 7
/
urls.go
29 lines (22 loc) · 838 Bytes
/
urls.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
package cluster
import "github.com/huaweicloud/terraform-provider-hcs/huaweicloudstack/sdk/huaweicloud"
const (
resourcePath = "clusters"
)
func createURL(c *golangsdk.ServiceClient) string {
return c.ServiceURL(resourcePath)
}
func resourceURL(c *golangsdk.ServiceClient, id string) string {
return c.ServiceURL(resourcePath, id)
}
func listURL(c *golangsdk.ServiceClient) string {
return c.ServiceURL(resourcePath)
}
// resetPasswordURL /v1.0/{project_id}/clusters/{cluster_id}/reset-password
func resetPasswordURL(c *golangsdk.ServiceClient, clusterId string) string {
return c.ServiceURL(resourcePath, clusterId, "reset-password")
}
// resizeURL /v1.0/{project_id}/clusters/{cluster_id}/resize
func resizeURL(c *golangsdk.ServiceClient, clusterId string) string {
return c.ServiceURL(resourcePath, clusterId, "resize")
}