Skip to content

Commit

Permalink
Add missing metric drain config attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelaossa committed Dec 24, 2024
1 parent cc04d04 commit 45cd2ec
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aptible/metric_drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type MetricDrain struct {
APIKey string
SeriesURL strfmt.URI
AccountID int64
AuthToken string
Bucket string
Org string
}

type MetricDrainCreateAttrs struct {
Expand All @@ -34,6 +37,9 @@ type MetricDrainCreateAttrs struct {
Database string
APIKey string
SeriesURL strfmt.URI
AuthToken string
Bucket string
Org string
}

func (c *Client) CreateMetricDrain(handle string, accountID int64, attrs *MetricDrainCreateAttrs) (*MetricDrain, error) {
Expand All @@ -56,6 +62,9 @@ func (c *Client) CreateMetricDrain(handle string, accountID int64, attrs *Metric
Database: attrs.Database,
APIKey: attrs.APIKey,
SeriesURL: attrs.SeriesURL,
AuthToken: attrs.AuthToken,
Bucket: attrs.Bucket,
Org: attrs.Org,
}
}

Expand Down Expand Up @@ -130,6 +139,9 @@ func (c *Client) GetMetricDrain(metricDrainID int64) (*MetricDrain, error) {
metricDrain.Database = response.Payload.DrainConfiguration.Database
metricDrain.APIKey = response.Payload.DrainConfiguration.APIKey
metricDrain.SeriesURL = response.Payload.DrainConfiguration.SeriesURL
metricDrain.AuthToken = response.Payload.DrainConfiguration.AuthToken
metricDrain.Bucket = response.Payload.DrainConfiguration.Bucket
metricDrain.Org = response.Payload.DrainConfiguration.Org
}

if response.Payload.Links.Database != nil {
Expand Down
6 changes: 6 additions & 0 deletions models/accountsaccount_idmetric_drains_drain_configuration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions models/inline_response20029_embedded_drain_configuration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 45cd2ec

Please sign in to comment.