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

45 lines
2.2 KiB
Go
Raw Normal View History

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"`
Kind *string `mapstructure:"kind"`
DatabaseID *string `mapstructure:"databaseId"`
DatabaseName *string `mapstructure:"databaseName"`
Status *string `mapstructure:"status"`
Collation *string `mapstructure:"collation"`
Edition *string `mapstructure:"edition"`
ServiceLevelObjective *string `mapstructure:"serviceLevelObjective"`
MaxSizeInBytes *string `mapstructure:"maxSizeInBytes"`
CreationDate *string `mapstructure:"creationDate"`
CurrentServiceLevelObjectiveID *string `mapstructure:"currentServiceLevelObjectiveId"`
RequestedServiceObjectiveID *string `mapstructure:"requestedServiceObjectiveId"`
RequestedServiceObjectiveName *string `mapstructure:"requestedServiceObjectiveName"`
DefaultSecondaryLocation *string `mapstructure:"defaultSecondaryLocation"`
Encryption *string `mapstructure:"encryption"`
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:"-"`
}
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{}
},
}
}