Skip to content

Commit 8ad96a8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Observability Pipelines Amazon S3 Generic destination (#3827)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 751df6b commit 8ad96a8

17 files changed

Lines changed: 2065 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42075,6 +42075,191 @@ components:
4207542075
type: string
4207642076
x-enum-varnames:
4207742077
- AMAZON_S3
42078+
ObservabilityPipelineAmazonS3GenericBatchSettings:
42079+
description: Event batching settings
42080+
properties:
42081+
batch_size:
42082+
description: Maximum batch size in bytes.
42083+
example: 100000000
42084+
format: int64
42085+
type: integer
42086+
timeout_secs:
42087+
description: Maximum number of seconds to wait before flushing the batch.
42088+
example: 900
42089+
format: int64
42090+
type: integer
42091+
type: object
42092+
ObservabilityPipelineAmazonS3GenericCompression:
42093+
description: Compression algorithm applied to encoded logs.
42094+
oneOf:
42095+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionZstd'
42096+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionGzip'
42097+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionSnappy'
42098+
ObservabilityPipelineAmazonS3GenericCompressionGzip:
42099+
description: Gzip compression.
42100+
properties:
42101+
algorithm:
42102+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionGzipType'
42103+
level:
42104+
description: Gzip compression level.
42105+
example: 6
42106+
format: int64
42107+
type: integer
42108+
required:
42109+
- algorithm
42110+
- level
42111+
type: object
42112+
ObservabilityPipelineAmazonS3GenericCompressionGzipType:
42113+
default: gzip
42114+
description: The compression type. Always `gzip`.
42115+
enum:
42116+
- gzip
42117+
example: gzip
42118+
type: string
42119+
x-enum-varnames:
42120+
- GZIP
42121+
ObservabilityPipelineAmazonS3GenericCompressionSnappy:
42122+
description: Snappy compression.
42123+
properties:
42124+
algorithm:
42125+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionSnappyType'
42126+
required:
42127+
- algorithm
42128+
type: object
42129+
ObservabilityPipelineAmazonS3GenericCompressionSnappyType:
42130+
default: snappy
42131+
description: The compression type. Always `snappy`.
42132+
enum:
42133+
- snappy
42134+
example: snappy
42135+
type: string
42136+
x-enum-varnames:
42137+
- SNAPPY
42138+
ObservabilityPipelineAmazonS3GenericCompressionZstd:
42139+
description: Zstd compression.
42140+
properties:
42141+
algorithm:
42142+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompressionZstdType'
42143+
level:
42144+
description: Zstd compression level.
42145+
example: 3
42146+
format: int64
42147+
type: integer
42148+
required:
42149+
- algorithm
42150+
- level
42151+
type: object
42152+
ObservabilityPipelineAmazonS3GenericCompressionZstdType:
42153+
default: zstd
42154+
description: The compression type. Always `zstd`.
42155+
enum:
42156+
- zstd
42157+
example: zstd
42158+
type: string
42159+
x-enum-varnames:
42160+
- ZSTD
42161+
ObservabilityPipelineAmazonS3GenericDestination:
42162+
description: 'The `amazon_s3_generic` destination sends your logs to an Amazon
42163+
S3 bucket.
42164+
42165+
42166+
**Supported pipeline types:** logs'
42167+
properties:
42168+
auth:
42169+
$ref: '#/components/schemas/ObservabilityPipelineAwsAuth'
42170+
batch_settings:
42171+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericBatchSettings'
42172+
bucket:
42173+
description: S3 bucket name.
42174+
example: my-bucket
42175+
type: string
42176+
compression:
42177+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericCompression'
42178+
encoding:
42179+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncoding'
42180+
id:
42181+
description: Unique identifier for the destination component.
42182+
example: generic-s3-destination
42183+
type: string
42184+
inputs:
42185+
description: A list of component IDs whose output is used as the `input`
42186+
for this component.
42187+
example:
42188+
- filter-processor
42189+
items:
42190+
type: string
42191+
type: array
42192+
key_prefix:
42193+
description: Optional prefix for object keys.
42194+
type: string
42195+
region:
42196+
description: AWS region of the S3 bucket.
42197+
example: us-east-1
42198+
type: string
42199+
storage_class:
42200+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3DestinationStorageClass'
42201+
type:
42202+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericDestinationType'
42203+
required:
42204+
- id
42205+
- type
42206+
- inputs
42207+
- bucket
42208+
- region
42209+
- storage_class
42210+
- encoding
42211+
- compression
42212+
type: object
42213+
x-pipeline-types:
42214+
- logs
42215+
ObservabilityPipelineAmazonS3GenericDestinationType:
42216+
default: amazon_s3_generic
42217+
description: The destination type. Always `amazon_s3_generic`.
42218+
enum:
42219+
- amazon_s3_generic
42220+
example: amazon_s3_generic
42221+
type: string
42222+
x-enum-varnames:
42223+
- GENERIC_ARCHIVES_S3
42224+
ObservabilityPipelineAmazonS3GenericEncoding:
42225+
description: Encoding format for the destination.
42226+
oneOf:
42227+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingJson'
42228+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingParquet'
42229+
ObservabilityPipelineAmazonS3GenericEncodingJson:
42230+
description: JSON encoding.
42231+
properties:
42232+
type:
42233+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingJsonType'
42234+
required:
42235+
- type
42236+
type: object
42237+
ObservabilityPipelineAmazonS3GenericEncodingJsonType:
42238+
default: json
42239+
description: The encoding type. Always `json`.
42240+
enum:
42241+
- json
42242+
example: json
42243+
type: string
42244+
x-enum-varnames:
42245+
- JSON
42246+
ObservabilityPipelineAmazonS3GenericEncodingParquet:
42247+
description: Parquet encoding.
42248+
properties:
42249+
type:
42250+
$ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericEncodingParquetType'
42251+
required:
42252+
- type
42253+
type: object
42254+
ObservabilityPipelineAmazonS3GenericEncodingParquetType:
42255+
default: parquet
42256+
description: The encoding type. Always `parquet`.
42257+
enum:
42258+
- parquet
42259+
example: parquet
42260+
type: string
42261+
x-enum-varnames:
42262+
- PARQUET
4207842263
ObservabilityPipelineAmazonS3Source:
4207942264
description: 'The `amazon_s3` source ingests logs from an Amazon S3 bucket.
4208042265

@@ -42350,6 +42535,7 @@ components:
4235042535
- $ref: '#/components/schemas/ObservabilityPipelineHttpClientDestination'
4235142536
- $ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination'
4235242537
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3Destination'
42538+
- $ref: '#/components/schemas/ObservabilityPipelineAmazonS3GenericDestination'
4235342539
- $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination'
4235442540
- $ref: '#/components/schemas/AzureStorageDestination'
4235542541
- $ref: '#/components/schemas/ObservabilityPipelineCloudPremDestination'
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// ObservabilityPipelineAmazonS3GenericBatchSettings Event batching settings
12+
type ObservabilityPipelineAmazonS3GenericBatchSettings struct {
13+
// Maximum batch size in bytes.
14+
BatchSize *int64 `json:"batch_size,omitempty"`
15+
// Maximum number of seconds to wait before flushing the batch.
16+
TimeoutSecs *int64 `json:"timeout_secs,omitempty"`
17+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
18+
UnparsedObject map[string]interface{} `json:"-"`
19+
AdditionalProperties map[string]interface{} `json:"-"`
20+
}
21+
22+
// NewObservabilityPipelineAmazonS3GenericBatchSettings instantiates a new ObservabilityPipelineAmazonS3GenericBatchSettings object.
23+
// This constructor will assign default values to properties that have it defined,
24+
// and makes sure properties required by API are set, but the set of arguments
25+
// will change when the set of required properties is changed.
26+
func NewObservabilityPipelineAmazonS3GenericBatchSettings() *ObservabilityPipelineAmazonS3GenericBatchSettings {
27+
this := ObservabilityPipelineAmazonS3GenericBatchSettings{}
28+
return &this
29+
}
30+
31+
// NewObservabilityPipelineAmazonS3GenericBatchSettingsWithDefaults instantiates a new ObservabilityPipelineAmazonS3GenericBatchSettings object.
32+
// This constructor will only assign default values to properties that have it defined,
33+
// but it doesn't guarantee that properties required by API are set.
34+
func NewObservabilityPipelineAmazonS3GenericBatchSettingsWithDefaults() *ObservabilityPipelineAmazonS3GenericBatchSettings {
35+
this := ObservabilityPipelineAmazonS3GenericBatchSettings{}
36+
return &this
37+
}
38+
39+
// GetBatchSize returns the BatchSize field value if set, zero value otherwise.
40+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) GetBatchSize() int64 {
41+
if o == nil || o.BatchSize == nil {
42+
var ret int64
43+
return ret
44+
}
45+
return *o.BatchSize
46+
}
47+
48+
// GetBatchSizeOk returns a tuple with the BatchSize field value if set, nil otherwise
49+
// and a boolean to check if the value has been set.
50+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) GetBatchSizeOk() (*int64, bool) {
51+
if o == nil || o.BatchSize == nil {
52+
return nil, false
53+
}
54+
return o.BatchSize, true
55+
}
56+
57+
// HasBatchSize returns a boolean if a field has been set.
58+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) HasBatchSize() bool {
59+
return o != nil && o.BatchSize != nil
60+
}
61+
62+
// SetBatchSize gets a reference to the given int64 and assigns it to the BatchSize field.
63+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) SetBatchSize(v int64) {
64+
o.BatchSize = &v
65+
}
66+
67+
// GetTimeoutSecs returns the TimeoutSecs field value if set, zero value otherwise.
68+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) GetTimeoutSecs() int64 {
69+
if o == nil || o.TimeoutSecs == nil {
70+
var ret int64
71+
return ret
72+
}
73+
return *o.TimeoutSecs
74+
}
75+
76+
// GetTimeoutSecsOk returns a tuple with the TimeoutSecs field value if set, nil otherwise
77+
// and a boolean to check if the value has been set.
78+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) GetTimeoutSecsOk() (*int64, bool) {
79+
if o == nil || o.TimeoutSecs == nil {
80+
return nil, false
81+
}
82+
return o.TimeoutSecs, true
83+
}
84+
85+
// HasTimeoutSecs returns a boolean if a field has been set.
86+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) HasTimeoutSecs() bool {
87+
return o != nil && o.TimeoutSecs != nil
88+
}
89+
90+
// SetTimeoutSecs gets a reference to the given int64 and assigns it to the TimeoutSecs field.
91+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) SetTimeoutSecs(v int64) {
92+
o.TimeoutSecs = &v
93+
}
94+
95+
// MarshalJSON serializes the struct using spec logic.
96+
func (o ObservabilityPipelineAmazonS3GenericBatchSettings) MarshalJSON() ([]byte, error) {
97+
toSerialize := map[string]interface{}{}
98+
if o.UnparsedObject != nil {
99+
return datadog.Marshal(o.UnparsedObject)
100+
}
101+
if o.BatchSize != nil {
102+
toSerialize["batch_size"] = o.BatchSize
103+
}
104+
if o.TimeoutSecs != nil {
105+
toSerialize["timeout_secs"] = o.TimeoutSecs
106+
}
107+
108+
for key, value := range o.AdditionalProperties {
109+
toSerialize[key] = value
110+
}
111+
return datadog.Marshal(toSerialize)
112+
}
113+
114+
// UnmarshalJSON deserializes the given payload.
115+
func (o *ObservabilityPipelineAmazonS3GenericBatchSettings) UnmarshalJSON(bytes []byte) (err error) {
116+
all := struct {
117+
BatchSize *int64 `json:"batch_size,omitempty"`
118+
TimeoutSecs *int64 `json:"timeout_secs,omitempty"`
119+
}{}
120+
if err = datadog.Unmarshal(bytes, &all); err != nil {
121+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
122+
}
123+
additionalProperties := make(map[string]interface{})
124+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
125+
datadog.DeleteKeys(additionalProperties, &[]string{"batch_size", "timeout_secs"})
126+
} else {
127+
return err
128+
}
129+
o.BatchSize = all.BatchSize
130+
o.TimeoutSecs = all.TimeoutSecs
131+
132+
if len(additionalProperties) > 0 {
133+
o.AdditionalProperties = additionalProperties
134+
}
135+
136+
return nil
137+
}

0 commit comments

Comments
 (0)