github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/autoscaling/v1/policies/urls.go (about)

     1  package policies
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  )
     6  
     7  const resourcePath = "scaling_policy"
     8  
     9  //createURL will build the rest query url of creation
    10  //the create url is endpoint/scaling_policy
    11  func createURL(client *golangsdk.ServiceClient) string {
    12  	return client.ServiceURL(resourcePath)
    13  }
    14  
    15  //deleteURL will build the url of deletion
    16  //its pattern is endpoint/scaling_policy/<policy-id>
    17  func deleteURL(client *golangsdk.ServiceClient, id string) string {
    18  	return client.ServiceURL(resourcePath, id)
    19  }
    20  
    21  //getURL will build the get url of get function
    22  func getURL(client *golangsdk.ServiceClient, id string) string {
    23  	return client.ServiceURL(resourcePath, id)
    24  }
    25  
    26  func updateURL(c *golangsdk.ServiceClient, id string) string {
    27  	return c.ServiceURL(resourcePath, id)
    28  }