github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/cloudeyeservice/v2/alarmrule/urls.go (about)

     1  package alarmrule
     2  
     3  import "github.com/chnsz/golangsdk"
     4  
     5  const (
     6  	rootPath = "alarms"
     7  )
     8  
     9  func rootURL(c *golangsdk.ServiceClient) string {
    10  	return c.ServiceURL(rootPath)
    11  }
    12  
    13  func listURL(c *golangsdk.ServiceClient, id string) string {
    14  	return c.ServiceURL("alarms?alarm_id=" + id)
    15  }
    16  
    17  func actionURL(c *golangsdk.ServiceClient) string {
    18  	return c.ServiceURL(rootPath, "action")
    19  }
    20  
    21  func batchResourcesURL(c *golangsdk.ServiceClient, id, operation string) string {
    22  	return c.ServiceURL(rootPath, id, "resources", operation)
    23  }
    24  
    25  func policiesURL(c *golangsdk.ServiceClient, id string) string {
    26  	return c.ServiceURL(rootPath, id, "policies")
    27  }
    28  
    29  func resourcesURL(c *golangsdk.ServiceClient, id string) string {
    30  	return c.ServiceURL(rootPath, id, "resources")
    31  }
    32  
    33  func deleteURL(c *golangsdk.ServiceClient) string {
    34  	return c.ServiceURL(rootPath, "batch-delete")
    35  }