2016-02-04 00:40:32 +01:00
|
|
|
package sql
|
|
|
|
|
|
|
|
import "github.com/jen20/riviera/azure"
|
|
|
|
|
|
|
|
type GetDatabaseResponse struct {
|
|
|
|
ID *string `mapstructure:"id"`
|
|
|
|
Name *string `mapstructure:"name"`
|
|
|
|
Location *string `mapstructure:"location"`
|
|
|
|
Tags *map[string]string `mapstructure:"tags"`
|
2016-02-05 12:28:48 +01:00
|
|
|
Kind *string `mapstructure:"kind"`
|
2016-02-04 00:40:32 +01:00
|
|
|
DatabaseID *string `mapstructure:"databaseId"`
|
|
|
|
DatabaseName *string `mapstructure:"databaseName"`
|
2016-02-05 12:28:48 +01:00
|
|
|
Status *string `mapstructure:"status"`
|
|
|
|
Collation *string `mapstructure:"collation"`
|
2016-02-04 00:40:32 +01:00
|
|
|
Edition *string `mapstructure:"edition"`
|
|
|
|
ServiceLevelObjective *string `mapstructure:"serviceLevelObjective"`
|
|
|
|
MaxSizeInBytes *string `mapstructure:"maxSizeInBytes"`
|
|
|
|
CreationDate *string `mapstructure:"creationDate"`
|
|
|
|
CurrentServiceLevelObjectiveID *string `mapstructure:"currentServiceLevelObjectiveId"`
|
|
|
|
RequestedServiceObjectiveID *string `mapstructure:"requestedServiceObjectiveId"`
|
2016-02-05 12:28:48 +01:00
|
|
|
RequestedServiceObjectiveName *string `mapstructure:"requestedServiceObjectiveName"`
|
2016-02-04 00:40:32 +01:00
|
|
|
DefaultSecondaryLocation *string `mapstructure:"defaultSecondaryLocation"`
|
|
|
|
Encryption *string `mapstructure:"encryption"`
|
2016-02-05 12:28:48 +01:00
|
|
|
EarliestRestoreDate *string `mapstructure:"earliestRestoreDate"`
|
|
|
|
ElasticPoolName *string `mapstructure:"elasticPoolName"`
|
|
|
|
ContainmentState *string `mapstructure:"containmentState"`
|
2016-02-04 00:40:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type GetDatabase struct {
|
|
|
|
Name string `json:"-"`
|
|
|
|
ServerName string `json:"-"`
|
|
|
|
ResourceGroupName string `json:"-"`
|
|
|
|
}
|
|
|
|
|
2016-02-05 00:36:50 +01:00
|
|
|
func (s GetDatabase) APIInfo() azure.APIInfo {
|
|
|
|
return azure.APIInfo{
|
|
|
|
APIVersion: apiVersion,
|
2016-02-04 00:40:32 +01:00
|
|
|
Method: "GET",
|
|
|
|
URLPathFunc: sqlDatabaseDefaultURLPath(s.ResourceGroupName, s.ServerName, s.Name),
|
|
|
|
ResponseTypeFunc: func() interface{} {
|
|
|
|
return &GetDatabaseResponse{}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|