Skip to content

Commit 6642a9e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adding Observability Pipelines Secret Management feature support (DataDog#3729)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 122bef8 commit 6642a9e

46 files changed

Lines changed: 2688 additions & 180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 281 additions & 5 deletions
Large diffs are not rendered by default.

api/datadogV2/model_azure_storage_destination.go

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type AzureStorageDestination struct {
1818
BlobPrefix *string `json:"blob_prefix,omitempty"`
1919
// Configuration for buffer settings on destination components.
2020
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
21+
// Name of the environment variable or secret that holds the Azure Storage connection string.
22+
ConnectionStringKey *string `json:"connection_string_key,omitempty"`
2123
// The name of the Azure Blob Storage container to store logs in.
2224
ContainerName string `json:"container_name"`
2325
// The unique identifier for this component.
@@ -110,6 +112,34 @@ func (o *AzureStorageDestination) SetBuffer(v ObservabilityPipelineBufferOptions
110112
o.Buffer = &v
111113
}
112114

115+
// GetConnectionStringKey returns the ConnectionStringKey field value if set, zero value otherwise.
116+
func (o *AzureStorageDestination) GetConnectionStringKey() string {
117+
if o == nil || o.ConnectionStringKey == nil {
118+
var ret string
119+
return ret
120+
}
121+
return *o.ConnectionStringKey
122+
}
123+
124+
// GetConnectionStringKeyOk returns a tuple with the ConnectionStringKey field value if set, nil otherwise
125+
// and a boolean to check if the value has been set.
126+
func (o *AzureStorageDestination) GetConnectionStringKeyOk() (*string, bool) {
127+
if o == nil || o.ConnectionStringKey == nil {
128+
return nil, false
129+
}
130+
return o.ConnectionStringKey, true
131+
}
132+
133+
// HasConnectionStringKey returns a boolean if a field has been set.
134+
func (o *AzureStorageDestination) HasConnectionStringKey() bool {
135+
return o != nil && o.ConnectionStringKey != nil
136+
}
137+
138+
// SetConnectionStringKey gets a reference to the given string and assigns it to the ConnectionStringKey field.
139+
func (o *AzureStorageDestination) SetConnectionStringKey(v string) {
140+
o.ConnectionStringKey = &v
141+
}
142+
113143
// GetContainerName returns the ContainerName field value.
114144
func (o *AzureStorageDestination) GetContainerName() string {
115145
if o == nil {
@@ -214,6 +244,9 @@ func (o AzureStorageDestination) MarshalJSON() ([]byte, error) {
214244
if o.Buffer != nil {
215245
toSerialize["buffer"] = o.Buffer
216246
}
247+
if o.ConnectionStringKey != nil {
248+
toSerialize["connection_string_key"] = o.ConnectionStringKey
249+
}
217250
toSerialize["container_name"] = o.ContainerName
218251
toSerialize["id"] = o.Id
219252
toSerialize["inputs"] = o.Inputs
@@ -228,12 +261,13 @@ func (o AzureStorageDestination) MarshalJSON() ([]byte, error) {
228261
// UnmarshalJSON deserializes the given payload.
229262
func (o *AzureStorageDestination) UnmarshalJSON(bytes []byte) (err error) {
230263
all := struct {
231-
BlobPrefix *string `json:"blob_prefix,omitempty"`
232-
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
233-
ContainerName *string `json:"container_name"`
234-
Id *string `json:"id"`
235-
Inputs *[]string `json:"inputs"`
236-
Type *AzureStorageDestinationType `json:"type"`
264+
BlobPrefix *string `json:"blob_prefix,omitempty"`
265+
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
266+
ConnectionStringKey *string `json:"connection_string_key,omitempty"`
267+
ContainerName *string `json:"container_name"`
268+
Id *string `json:"id"`
269+
Inputs *[]string `json:"inputs"`
270+
Type *AzureStorageDestinationType `json:"type"`
237271
}{}
238272
if err = datadog.Unmarshal(bytes, &all); err != nil {
239273
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -252,14 +286,15 @@ func (o *AzureStorageDestination) UnmarshalJSON(bytes []byte) (err error) {
252286
}
253287
additionalProperties := make(map[string]interface{})
254288
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
255-
datadog.DeleteKeys(additionalProperties, &[]string{"blob_prefix", "buffer", "container_name", "id", "inputs", "type"})
289+
datadog.DeleteKeys(additionalProperties, &[]string{"blob_prefix", "buffer", "connection_string_key", "container_name", "id", "inputs", "type"})
256290
} else {
257291
return err
258292
}
259293

260294
hasInvalidField := false
261295
o.BlobPrefix = all.BlobPrefix
262296
o.Buffer = all.Buffer
297+
o.ConnectionStringKey = all.ConnectionStringKey
263298
o.ContainerName = *all.ContainerName
264299
o.Id = *all.Id
265300
o.Inputs = *all.Inputs

api/datadogV2/model_microsoft_sentinel_destination.go

Lines changed: 79 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type MicrosoftSentinelDestination struct {
1818
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
1919
// Azure AD client ID used for authentication.
2020
ClientId string `json:"client_id"`
21+
// Name of the environment variable or secret that holds the Azure AD client secret.
22+
ClientSecretKey *string `json:"client_secret_key,omitempty"`
23+
// Name of the environment variable or secret that holds the Data Collection Endpoint (DCE) URI.
24+
DceUriKey *string `json:"dce_uri_key,omitempty"`
2125
// The immutable ID of the Data Collection Rule (DCR).
2226
DcrImmutableId string `json:"dcr_immutable_id"`
2327
// The unique identifier for this component.
@@ -112,6 +116,62 @@ func (o *MicrosoftSentinelDestination) SetClientId(v string) {
112116
o.ClientId = v
113117
}
114118

119+
// GetClientSecretKey returns the ClientSecretKey field value if set, zero value otherwise.
120+
func (o *MicrosoftSentinelDestination) GetClientSecretKey() string {
121+
if o == nil || o.ClientSecretKey == nil {
122+
var ret string
123+
return ret
124+
}
125+
return *o.ClientSecretKey
126+
}
127+
128+
// GetClientSecretKeyOk returns a tuple with the ClientSecretKey field value if set, nil otherwise
129+
// and a boolean to check if the value has been set.
130+
func (o *MicrosoftSentinelDestination) GetClientSecretKeyOk() (*string, bool) {
131+
if o == nil || o.ClientSecretKey == nil {
132+
return nil, false
133+
}
134+
return o.ClientSecretKey, true
135+
}
136+
137+
// HasClientSecretKey returns a boolean if a field has been set.
138+
func (o *MicrosoftSentinelDestination) HasClientSecretKey() bool {
139+
return o != nil && o.ClientSecretKey != nil
140+
}
141+
142+
// SetClientSecretKey gets a reference to the given string and assigns it to the ClientSecretKey field.
143+
func (o *MicrosoftSentinelDestination) SetClientSecretKey(v string) {
144+
o.ClientSecretKey = &v
145+
}
146+
147+
// GetDceUriKey returns the DceUriKey field value if set, zero value otherwise.
148+
func (o *MicrosoftSentinelDestination) GetDceUriKey() string {
149+
if o == nil || o.DceUriKey == nil {
150+
var ret string
151+
return ret
152+
}
153+
return *o.DceUriKey
154+
}
155+
156+
// GetDceUriKeyOk returns a tuple with the DceUriKey field value if set, nil otherwise
157+
// and a boolean to check if the value has been set.
158+
func (o *MicrosoftSentinelDestination) GetDceUriKeyOk() (*string, bool) {
159+
if o == nil || o.DceUriKey == nil {
160+
return nil, false
161+
}
162+
return o.DceUriKey, true
163+
}
164+
165+
// HasDceUriKey returns a boolean if a field has been set.
166+
func (o *MicrosoftSentinelDestination) HasDceUriKey() bool {
167+
return o != nil && o.DceUriKey != nil
168+
}
169+
170+
// SetDceUriKey gets a reference to the given string and assigns it to the DceUriKey field.
171+
func (o *MicrosoftSentinelDestination) SetDceUriKey(v string) {
172+
o.DceUriKey = &v
173+
}
174+
115175
// GetDcrImmutableId returns the DcrImmutableId field value.
116176
func (o *MicrosoftSentinelDestination) GetDcrImmutableId() string {
117177
if o == nil {
@@ -260,6 +320,12 @@ func (o MicrosoftSentinelDestination) MarshalJSON() ([]byte, error) {
260320
toSerialize["buffer"] = o.Buffer
261321
}
262322
toSerialize["client_id"] = o.ClientId
323+
if o.ClientSecretKey != nil {
324+
toSerialize["client_secret_key"] = o.ClientSecretKey
325+
}
326+
if o.DceUriKey != nil {
327+
toSerialize["dce_uri_key"] = o.DceUriKey
328+
}
263329
toSerialize["dcr_immutable_id"] = o.DcrImmutableId
264330
toSerialize["id"] = o.Id
265331
toSerialize["inputs"] = o.Inputs
@@ -276,14 +342,16 @@ func (o MicrosoftSentinelDestination) MarshalJSON() ([]byte, error) {
276342
// UnmarshalJSON deserializes the given payload.
277343
func (o *MicrosoftSentinelDestination) UnmarshalJSON(bytes []byte) (err error) {
278344
all := struct {
279-
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
280-
ClientId *string `json:"client_id"`
281-
DcrImmutableId *string `json:"dcr_immutable_id"`
282-
Id *string `json:"id"`
283-
Inputs *[]string `json:"inputs"`
284-
Table *string `json:"table"`
285-
TenantId *string `json:"tenant_id"`
286-
Type *MicrosoftSentinelDestinationType `json:"type"`
345+
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
346+
ClientId *string `json:"client_id"`
347+
ClientSecretKey *string `json:"client_secret_key,omitempty"`
348+
DceUriKey *string `json:"dce_uri_key,omitempty"`
349+
DcrImmutableId *string `json:"dcr_immutable_id"`
350+
Id *string `json:"id"`
351+
Inputs *[]string `json:"inputs"`
352+
Table *string `json:"table"`
353+
TenantId *string `json:"tenant_id"`
354+
Type *MicrosoftSentinelDestinationType `json:"type"`
287355
}{}
288356
if err = datadog.Unmarshal(bytes, &all); err != nil {
289357
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -311,14 +379,16 @@ func (o *MicrosoftSentinelDestination) UnmarshalJSON(bytes []byte) (err error) {
311379
}
312380
additionalProperties := make(map[string]interface{})
313381
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
314-
datadog.DeleteKeys(additionalProperties, &[]string{"buffer", "client_id", "dcr_immutable_id", "id", "inputs", "table", "tenant_id", "type"})
382+
datadog.DeleteKeys(additionalProperties, &[]string{"buffer", "client_id", "client_secret_key", "dce_uri_key", "dcr_immutable_id", "id", "inputs", "table", "tenant_id", "type"})
315383
} else {
316384
return err
317385
}
318386

319387
hasInvalidField := false
320388
o.Buffer = all.Buffer
321389
o.ClientId = *all.ClientId
390+
o.ClientSecretKey = all.ClientSecretKey
391+
o.DceUriKey = all.DceUriKey
322392
o.DcrImmutableId = *all.DcrImmutableId
323393
o.Id = *all.Id
324394
o.Inputs = *all.Inputs

api/datadogV2/model_observability_pipeline_amazon_data_firehose_source.go

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
//
1515
// **Supported pipeline types:** logs
1616
type ObservabilityPipelineAmazonDataFirehoseSource struct {
17+
// Name of the environment variable or secret that holds the Firehose delivery stream address.
18+
AddressKey *string `json:"address_key,omitempty"`
1719
// AWS authentication credentials used for accessing AWS services such as S3.
1820
// If omitted, the system’s default credentials are used (for example, the IAM role and environment variables).
1921
Auth *ObservabilityPipelineAwsAuth `json:"auth,omitempty"`
@@ -49,6 +51,34 @@ func NewObservabilityPipelineAmazonDataFirehoseSourceWithDefaults() *Observabili
4951
return &this
5052
}
5153

54+
// GetAddressKey returns the AddressKey field value if set, zero value otherwise.
55+
func (o *ObservabilityPipelineAmazonDataFirehoseSource) GetAddressKey() string {
56+
if o == nil || o.AddressKey == nil {
57+
var ret string
58+
return ret
59+
}
60+
return *o.AddressKey
61+
}
62+
63+
// GetAddressKeyOk returns a tuple with the AddressKey field value if set, nil otherwise
64+
// and a boolean to check if the value has been set.
65+
func (o *ObservabilityPipelineAmazonDataFirehoseSource) GetAddressKeyOk() (*string, bool) {
66+
if o == nil || o.AddressKey == nil {
67+
return nil, false
68+
}
69+
return o.AddressKey, true
70+
}
71+
72+
// HasAddressKey returns a boolean if a field has been set.
73+
func (o *ObservabilityPipelineAmazonDataFirehoseSource) HasAddressKey() bool {
74+
return o != nil && o.AddressKey != nil
75+
}
76+
77+
// SetAddressKey gets a reference to the given string and assigns it to the AddressKey field.
78+
func (o *ObservabilityPipelineAmazonDataFirehoseSource) SetAddressKey(v string) {
79+
o.AddressKey = &v
80+
}
81+
5282
// GetAuth returns the Auth field value if set, zero value otherwise.
5383
func (o *ObservabilityPipelineAmazonDataFirehoseSource) GetAuth() ObservabilityPipelineAwsAuth {
5484
if o == nil || o.Auth == nil {
@@ -157,6 +187,9 @@ func (o ObservabilityPipelineAmazonDataFirehoseSource) MarshalJSON() ([]byte, er
157187
if o.UnparsedObject != nil {
158188
return datadog.Marshal(o.UnparsedObject)
159189
}
190+
if o.AddressKey != nil {
191+
toSerialize["address_key"] = o.AddressKey
192+
}
160193
if o.Auth != nil {
161194
toSerialize["auth"] = o.Auth
162195
}
@@ -175,10 +208,11 @@ func (o ObservabilityPipelineAmazonDataFirehoseSource) MarshalJSON() ([]byte, er
175208
// UnmarshalJSON deserializes the given payload.
176209
func (o *ObservabilityPipelineAmazonDataFirehoseSource) UnmarshalJSON(bytes []byte) (err error) {
177210
all := struct {
178-
Auth *ObservabilityPipelineAwsAuth `json:"auth,omitempty"`
179-
Id *string `json:"id"`
180-
Tls *ObservabilityPipelineTls `json:"tls,omitempty"`
181-
Type *ObservabilityPipelineAmazonDataFirehoseSourceType `json:"type"`
211+
AddressKey *string `json:"address_key,omitempty"`
212+
Auth *ObservabilityPipelineAwsAuth `json:"auth,omitempty"`
213+
Id *string `json:"id"`
214+
Tls *ObservabilityPipelineTls `json:"tls,omitempty"`
215+
Type *ObservabilityPipelineAmazonDataFirehoseSourceType `json:"type"`
182216
}{}
183217
if err = datadog.Unmarshal(bytes, &all); err != nil {
184218
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -191,12 +225,13 @@ func (o *ObservabilityPipelineAmazonDataFirehoseSource) UnmarshalJSON(bytes []by
191225
}
192226
additionalProperties := make(map[string]interface{})
193227
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
194-
datadog.DeleteKeys(additionalProperties, &[]string{"auth", "id", "tls", "type"})
228+
datadog.DeleteKeys(additionalProperties, &[]string{"address_key", "auth", "id", "tls", "type"})
195229
} else {
196230
return err
197231
}
198232

199233
hasInvalidField := false
234+
o.AddressKey = all.AddressKey
200235
if all.Auth != nil && all.Auth.UnparsedObject != nil && o.UnparsedObject == nil {
201236
hasInvalidField = true
202237
}

api/datadogV2/model_observability_pipeline_amazon_s3_source.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type ObservabilityPipelineAmazonS3Source struct {
2626
Tls *ObservabilityPipelineTls `json:"tls,omitempty"`
2727
// The source type. Always `amazon_s3`.
2828
Type ObservabilityPipelineAmazonS3SourceType `json:"type"`
29+
// Name of the environment variable or secret that holds the S3 bucket URL.
30+
UrlKey *string `json:"url_key,omitempty"`
2931
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3032
UnparsedObject map[string]interface{} `json:"-"`
3133
AdditionalProperties map[string]interface{} `json:"-"`
@@ -178,6 +180,34 @@ func (o *ObservabilityPipelineAmazonS3Source) SetType(v ObservabilityPipelineAma
178180
o.Type = v
179181
}
180182

183+
// GetUrlKey returns the UrlKey field value if set, zero value otherwise.
184+
func (o *ObservabilityPipelineAmazonS3Source) GetUrlKey() string {
185+
if o == nil || o.UrlKey == nil {
186+
var ret string
187+
return ret
188+
}
189+
return *o.UrlKey
190+
}
191+
192+
// GetUrlKeyOk returns a tuple with the UrlKey field value if set, nil otherwise
193+
// and a boolean to check if the value has been set.
194+
func (o *ObservabilityPipelineAmazonS3Source) GetUrlKeyOk() (*string, bool) {
195+
if o == nil || o.UrlKey == nil {
196+
return nil, false
197+
}
198+
return o.UrlKey, true
199+
}
200+
201+
// HasUrlKey returns a boolean if a field has been set.
202+
func (o *ObservabilityPipelineAmazonS3Source) HasUrlKey() bool {
203+
return o != nil && o.UrlKey != nil
204+
}
205+
206+
// SetUrlKey gets a reference to the given string and assigns it to the UrlKey field.
207+
func (o *ObservabilityPipelineAmazonS3Source) SetUrlKey(v string) {
208+
o.UrlKey = &v
209+
}
210+
181211
// MarshalJSON serializes the struct using spec logic.
182212
func (o ObservabilityPipelineAmazonS3Source) MarshalJSON() ([]byte, error) {
183213
toSerialize := map[string]interface{}{}
@@ -193,6 +223,9 @@ func (o ObservabilityPipelineAmazonS3Source) MarshalJSON() ([]byte, error) {
193223
toSerialize["tls"] = o.Tls
194224
}
195225
toSerialize["type"] = o.Type
226+
if o.UrlKey != nil {
227+
toSerialize["url_key"] = o.UrlKey
228+
}
196229

197230
for key, value := range o.AdditionalProperties {
198231
toSerialize[key] = value
@@ -208,6 +241,7 @@ func (o *ObservabilityPipelineAmazonS3Source) UnmarshalJSON(bytes []byte) (err e
208241
Region *string `json:"region"`
209242
Tls *ObservabilityPipelineTls `json:"tls,omitempty"`
210243
Type *ObservabilityPipelineAmazonS3SourceType `json:"type"`
244+
UrlKey *string `json:"url_key,omitempty"`
211245
}{}
212246
if err = datadog.Unmarshal(bytes, &all); err != nil {
213247
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -223,7 +257,7 @@ func (o *ObservabilityPipelineAmazonS3Source) UnmarshalJSON(bytes []byte) (err e
223257
}
224258
additionalProperties := make(map[string]interface{})
225259
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
226-
datadog.DeleteKeys(additionalProperties, &[]string{"auth", "id", "region", "tls", "type"})
260+
datadog.DeleteKeys(additionalProperties, &[]string{"auth", "id", "region", "tls", "type", "url_key"})
227261
} else {
228262
return err
229263
}
@@ -244,6 +278,7 @@ func (o *ObservabilityPipelineAmazonS3Source) UnmarshalJSON(bytes []byte) (err e
244278
} else {
245279
o.Type = *all.Type
246280
}
281+
o.UrlKey = all.UrlKey
247282

248283
if len(additionalProperties) > 0 {
249284
o.AdditionalProperties = additionalProperties

0 commit comments

Comments
 (0)