terraform/vendor/github.com/jen20/riviera/sql/api.go

37 lines
1.5 KiB
Go
Raw Normal View History

2016-02-04 00:40:32 +01:00
package sql
import "fmt"
const apiVersion = "2014-04-01-preview"
const apiProvider = "Microsoft.Sql"
func sqlServerDefaultURLPath(resourceGroupName, serverName string) func() string {
return func() string {
return fmt.Sprintf("resourceGroups/%s/providers/%s/servers/%s", resourceGroupName, apiProvider, serverName)
}
}
func sqlElasticPoolDefaultURLPath(resourceGroupName, serverName, elasticPoolName string) func() string {
return func() string {
return fmt.Sprintf("resourceGroups/%s/providers/%s/servers/%s/elasticPools/%s", resourceGroupName, apiProvider, serverName, elasticPoolName)
}
}
func sqlDatabaseDefaultURLPath(resourceGroupName, serverName, databaseName string) func() string {
return func() string {
return fmt.Sprintf("resourceGroups/%s/providers/%s/servers/%s/databases/%s", resourceGroupName, apiProvider, serverName, databaseName)
}
}
2016-05-07 02:36:25 +02:00
func sqlDatabaseFailoverUnplanned(resourceGroupName, serverName, databaseName, linkID string) func() string {
return func() string {
return fmt.Sprintf("resourcegroups/%s/providers/%s/servers/%s/databases/%s/replicationLinks/%s/forceFailoverAllowDataLoss", resourceGroupName, apiProvider, serverName, databaseName, linkID)
}
}
2016-02-04 00:40:32 +01:00
func sqlServerFirewallDefaultURLPath(resourceGroupName, serverName, firewallRuleName string) func() string {
return func() string {
return fmt.Sprintf("resourceGroups/%s/providers/%s/servers/%s/firewallRules/%s", resourceGroupName, apiProvider, serverName, firewallRuleName)
}
}