/
awsServiceInterface.go
39 lines (32 loc) · 1.41 KB
/
awsServiceInterface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package services
type AWSQuotaInfo struct {
Service string // service the quota applies to
Region string // the region this quota applies to
ResourceId string // if there can be multiple usages for one quota, aws id (Cloudformation format)
QuotaName string // the name of the quota
Quotacode string // servicequota code
QuotaValue float64 // the quota value
UsageValue float64 // the usage value
Unit string // unit of the quota/usage
Global bool // whether the quota is global or not
}
type AWSQuotaOverride struct {
Service string // service the quota applies to
QuotaName string // the name of the quota
QuotaValue float64 // the quota value
}
type Svcquota interface {
// Get Usage retrieve the quotas and usage for the given service
GetUsage() []AWSQuotaInfo
// Retrieves all the applied quotas for the given service. For some quotas,
// only the default values are available
GetAllAppliedQuotas() map[string]AWSQuotaInfo
// GetAllDefaultQuotas retrieves all the default quotas for the given
// service. Usage of those resources are not retrieved/calculated
GetAllDefaultQuotas() map[string]AWSQuotaInfo
// Overrides the given quota for the service with a new value
SetQuotasOverride(quotaOverride []AWSQuotaOverride)
// GetRequiredPermissions returns a list of the IAM permissions required
// to retrieve the usage for this service.
GetRequiredPermissions() []string
}