Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing metric drain config attrs #70

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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.

Loading