From 45cd2ecc2327b9c7b8b784b0a6d94eeb635f84af Mon Sep 17 00:00:00 2001 From: Mario de la Ossa Date: Mon, 23 Dec 2024 17:53:15 -0600 Subject: [PATCH] Add missing metric drain config attrs --- aptible/metric_drain.go | 12 ++++++++++++ ...ntsaccount_idmetric_drains_drain_configuration.go | 6 ++++++ ...ine_response20029_embedded_drain_configuration.go | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/aptible/metric_drain.go b/aptible/metric_drain.go index a7eaeb1..bdd7b4d 100644 --- a/aptible/metric_drain.go +++ b/aptible/metric_drain.go @@ -22,6 +22,9 @@ type MetricDrain struct { APIKey string SeriesURL strfmt.URI AccountID int64 + AuthToken string + Bucket string + Org string } type MetricDrainCreateAttrs struct { @@ -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) { @@ -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, } } @@ -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 { diff --git a/models/accountsaccount_idmetric_drains_drain_configuration.go b/models/accountsaccount_idmetric_drains_drain_configuration.go index f8efe5c..b208bd0 100644 --- a/models/accountsaccount_idmetric_drains_drain_configuration.go +++ b/models/accountsaccount_idmetric_drains_drain_configuration.go @@ -36,6 +36,12 @@ type AccountsaccountIdmetricDrainsDrainConfiguration struct { // username Username string `json:"username,omitempty"` + + AuthToken string `json:"authToken,omitempty"` + + Bucket string `json:"bucket,omitempty"` + + Org string `json:"org,omitempty"` } // Validate validates this accountsaccount idmetric drains drain configuration diff --git a/models/inline_response20029_embedded_drain_configuration.go b/models/inline_response20029_embedded_drain_configuration.go index c545700..1b6ad3a 100644 --- a/models/inline_response20029_embedded_drain_configuration.go +++ b/models/inline_response20029_embedded_drain_configuration.go @@ -36,6 +36,12 @@ type InlineResponse20029EmbeddedDrainConfiguration struct { // username Username string `json:"username,omitempty"` + + AuthToken string `json:"authToken,omitempty"` + + Bucket string `json:"bucket,omitempty"` + + Org string `json:"org,omitempty"` } // Validate validates this inline response 200 29 embedded drain configuration