Skip to content

Commit 680673e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update specs for AWS account updates and creation for CCM configs (#3514)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2ec8cb3 commit 680673e

22 files changed

Lines changed: 564 additions & 34 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,8 @@ components:
14961496
$ref: '#/components/schemas/AWSAccountPartition'
14971497
aws_regions:
14981498
$ref: '#/components/schemas/AWSRegions'
1499+
ccm_config:
1500+
$ref: '#/components/schemas/AWSCCMConfig'
14991501
logs_config:
15001502
$ref: '#/components/schemas/AWSLogsConfig'
15011503
metrics_config:
@@ -1561,6 +1563,8 @@ components:
15611563
$ref: '#/components/schemas/AWSAccountPartition'
15621564
aws_regions:
15631565
$ref: '#/components/schemas/AWSRegions'
1566+
ccm_config:
1567+
$ref: '#/components/schemas/AWSCCMConfig'
15641568
created_at:
15651569
description: Timestamp of when the account integration was created.
15661570
format: date-time
@@ -1634,6 +1638,8 @@ components:
16341638
$ref: '#/components/schemas/AWSAccountPartition'
16351639
aws_regions:
16361640
$ref: '#/components/schemas/AWSRegions'
1641+
ccm_config:
1642+
$ref: '#/components/schemas/AWSCCMConfig'
16371643
logs_config:
16381644
$ref: '#/components/schemas/AWSLogsConfig'
16391645
metrics_config:
@@ -1765,6 +1771,15 @@ components:
17651771
required:
17661772
- role_name
17671773
type: object
1774+
AWSCCMConfig:
1775+
description: AWS Cloud Cost Management config.
1776+
properties:
1777+
data_export_configs:
1778+
description: List of data export configurations for Cost and Usage Reports.
1779+
items:
1780+
$ref: '#/components/schemas/DataExportConfig'
1781+
type: array
1782+
type: object
17681783
AWSCredentials:
17691784
description: The definition of `AWSCredentials` object.
17701785
oneOf:
@@ -16354,6 +16369,30 @@ components:
1635416369
example: canceled
1635516370
type: string
1635616371
type: object
16372+
DataExportConfig:
16373+
description: AWS Cost and Usage Report data export configuration.
16374+
properties:
16375+
bucket_name:
16376+
description: Name of the S3 bucket where the Cost and Usage Report is stored.
16377+
example: billing
16378+
type: string
16379+
bucket_region:
16380+
description: AWS region of the S3 bucket.
16381+
example: us-east-1
16382+
type: string
16383+
report_name:
16384+
description: Name of the Cost and Usage Report.
16385+
example: cost-and-usage-report
16386+
type: string
16387+
report_prefix:
16388+
description: S3 prefix where the Cost and Usage Report is stored.
16389+
example: reports
16390+
type: string
16391+
report_type:
16392+
description: Type of the Cost and Usage Report.
16393+
example: CUR2.0
16394+
type: string
16395+
type: object
1635716396
DataRelationshipsTeams:
1635816397
description: Associates teams with this schedule in a data structure.
1635916398
properties:

api/datadogV2/model_aws_account_create_request_attributes.go

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ type AWSAccountCreateRequestAttributes struct {
2424
AwsPartition AWSAccountPartition `json:"aws_partition"`
2525
// AWS Regions to collect data from. Defaults to `include_all`.
2626
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
27+
// AWS Cloud Cost Management config.
28+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
2729
// AWS Logs Collection config.
2830
LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"`
2931
// AWS Metrics Collection config.
@@ -193,6 +195,34 @@ func (o *AWSAccountCreateRequestAttributes) SetAwsRegions(v AWSRegions) {
193195
o.AwsRegions = &v
194196
}
195197

198+
// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise.
199+
func (o *AWSAccountCreateRequestAttributes) GetCcmConfig() AWSCCMConfig {
200+
if o == nil || o.CcmConfig == nil {
201+
var ret AWSCCMConfig
202+
return ret
203+
}
204+
return *o.CcmConfig
205+
}
206+
207+
// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise
208+
// and a boolean to check if the value has been set.
209+
func (o *AWSAccountCreateRequestAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) {
210+
if o == nil || o.CcmConfig == nil {
211+
return nil, false
212+
}
213+
return o.CcmConfig, true
214+
}
215+
216+
// HasCcmConfig returns a boolean if a field has been set.
217+
func (o *AWSAccountCreateRequestAttributes) HasCcmConfig() bool {
218+
return o != nil && o.CcmConfig != nil
219+
}
220+
221+
// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field.
222+
func (o *AWSAccountCreateRequestAttributes) SetCcmConfig(v AWSCCMConfig) {
223+
o.CcmConfig = &v
224+
}
225+
196226
// GetLogsConfig returns the LogsConfig field value if set, zero value otherwise.
197227
func (o *AWSAccountCreateRequestAttributes) GetLogsConfig() AWSLogsConfig {
198228
if o == nil || o.LogsConfig == nil {
@@ -320,6 +350,9 @@ func (o AWSAccountCreateRequestAttributes) MarshalJSON() ([]byte, error) {
320350
if o.AwsRegions != nil {
321351
toSerialize["aws_regions"] = o.AwsRegions
322352
}
353+
if o.CcmConfig != nil {
354+
toSerialize["ccm_config"] = o.CcmConfig
355+
}
323356
if o.LogsConfig != nil {
324357
toSerialize["logs_config"] = o.LogsConfig
325358
}
@@ -347,6 +380,7 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
347380
AwsAccountId *string `json:"aws_account_id"`
348381
AwsPartition *AWSAccountPartition `json:"aws_partition"`
349382
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
383+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
350384
LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"`
351385
MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"`
352386
ResourcesConfig *AWSResourcesConfig `json:"resources_config,omitempty"`
@@ -366,7 +400,7 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
366400
}
367401
additionalProperties := make(map[string]interface{})
368402
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
369-
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "logs_config", "metrics_config", "resources_config", "traces_config"})
403+
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "ccm_config", "logs_config", "metrics_config", "resources_config", "traces_config"})
370404
} else {
371405
return err
372406
}
@@ -381,6 +415,10 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
381415
o.AwsPartition = *all.AwsPartition
382416
}
383417
o.AwsRegions = all.AwsRegions
418+
if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil {
419+
hasInvalidField = true
420+
}
421+
o.CcmConfig = all.CcmConfig
384422
if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil {
385423
hasInvalidField = true
386424
}

api/datadogV2/model_aws_account_response_attributes.go

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type AWSAccountResponseAttributes struct {
2525
AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"`
2626
// AWS Regions to collect data from. Defaults to `include_all`.
2727
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
28+
// AWS Cloud Cost Management config.
29+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
2830
// Timestamp of when the account integration was created.
2931
CreatedAt *time.Time `json:"created_at,omitempty"`
3032
// AWS Logs Collection config.
@@ -206,6 +208,34 @@ func (o *AWSAccountResponseAttributes) SetAwsRegions(v AWSRegions) {
206208
o.AwsRegions = &v
207209
}
208210

211+
// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise.
212+
func (o *AWSAccountResponseAttributes) GetCcmConfig() AWSCCMConfig {
213+
if o == nil || o.CcmConfig == nil {
214+
var ret AWSCCMConfig
215+
return ret
216+
}
217+
return *o.CcmConfig
218+
}
219+
220+
// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise
221+
// and a boolean to check if the value has been set.
222+
func (o *AWSAccountResponseAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) {
223+
if o == nil || o.CcmConfig == nil {
224+
return nil, false
225+
}
226+
return o.CcmConfig, true
227+
}
228+
229+
// HasCcmConfig returns a boolean if a field has been set.
230+
func (o *AWSAccountResponseAttributes) HasCcmConfig() bool {
231+
return o != nil && o.CcmConfig != nil
232+
}
233+
234+
// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field.
235+
func (o *AWSAccountResponseAttributes) SetCcmConfig(v AWSCCMConfig) {
236+
o.CcmConfig = &v
237+
}
238+
209239
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
210240
func (o *AWSAccountResponseAttributes) GetCreatedAt() time.Time {
211241
if o == nil || o.CreatedAt == nil {
@@ -393,6 +423,9 @@ func (o AWSAccountResponseAttributes) MarshalJSON() ([]byte, error) {
393423
if o.AwsRegions != nil {
394424
toSerialize["aws_regions"] = o.AwsRegions
395425
}
426+
if o.CcmConfig != nil {
427+
toSerialize["ccm_config"] = o.CcmConfig
428+
}
396429
if o.CreatedAt != nil {
397430
if o.CreatedAt.Nanosecond() == 0 {
398431
toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00")
@@ -434,6 +467,7 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
434467
AwsAccountId *string `json:"aws_account_id"`
435468
AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"`
436469
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
470+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
437471
CreatedAt *time.Time `json:"created_at,omitempty"`
438472
LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"`
439473
MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"`
@@ -449,7 +483,7 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
449483
}
450484
additionalProperties := make(map[string]interface{})
451485
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
452-
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "created_at", "logs_config", "metrics_config", "modified_at", "resources_config", "traces_config"})
486+
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "ccm_config", "created_at", "logs_config", "metrics_config", "modified_at", "resources_config", "traces_config"})
453487
} else {
454488
return err
455489
}
@@ -464,6 +498,10 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
464498
o.AwsPartition = all.AwsPartition
465499
}
466500
o.AwsRegions = all.AwsRegions
501+
if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil {
502+
hasInvalidField = true
503+
}
504+
o.CcmConfig = all.CcmConfig
467505
o.CreatedAt = all.CreatedAt
468506
if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil {
469507
hasInvalidField = true

api/datadogV2/model_aws_account_update_request_attributes.go

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ type AWSAccountUpdateRequestAttributes struct {
2424
AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"`
2525
// AWS Regions to collect data from. Defaults to `include_all`.
2626
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
27+
// AWS Cloud Cost Management config.
28+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
2729
// AWS Logs Collection config.
2830
LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"`
2931
// AWS Metrics Collection config.
@@ -201,6 +203,34 @@ func (o *AWSAccountUpdateRequestAttributes) SetAwsRegions(v AWSRegions) {
201203
o.AwsRegions = &v
202204
}
203205

206+
// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise.
207+
func (o *AWSAccountUpdateRequestAttributes) GetCcmConfig() AWSCCMConfig {
208+
if o == nil || o.CcmConfig == nil {
209+
var ret AWSCCMConfig
210+
return ret
211+
}
212+
return *o.CcmConfig
213+
}
214+
215+
// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise
216+
// and a boolean to check if the value has been set.
217+
func (o *AWSAccountUpdateRequestAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) {
218+
if o == nil || o.CcmConfig == nil {
219+
return nil, false
220+
}
221+
return o.CcmConfig, true
222+
}
223+
224+
// HasCcmConfig returns a boolean if a field has been set.
225+
func (o *AWSAccountUpdateRequestAttributes) HasCcmConfig() bool {
226+
return o != nil && o.CcmConfig != nil
227+
}
228+
229+
// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field.
230+
func (o *AWSAccountUpdateRequestAttributes) SetCcmConfig(v AWSCCMConfig) {
231+
o.CcmConfig = &v
232+
}
233+
204234
// GetLogsConfig returns the LogsConfig field value if set, zero value otherwise.
205235
func (o *AWSAccountUpdateRequestAttributes) GetLogsConfig() AWSLogsConfig {
206236
if o == nil || o.LogsConfig == nil {
@@ -332,6 +362,9 @@ func (o AWSAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) {
332362
if o.AwsRegions != nil {
333363
toSerialize["aws_regions"] = o.AwsRegions
334364
}
365+
if o.CcmConfig != nil {
366+
toSerialize["ccm_config"] = o.CcmConfig
367+
}
335368
if o.LogsConfig != nil {
336369
toSerialize["logs_config"] = o.LogsConfig
337370
}
@@ -359,6 +392,7 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
359392
AwsAccountId *string `json:"aws_account_id"`
360393
AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"`
361394
AwsRegions *AWSRegions `json:"aws_regions,omitempty"`
395+
CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"`
362396
LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"`
363397
MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"`
364398
ResourcesConfig *AWSResourcesConfig `json:"resources_config,omitempty"`
@@ -372,7 +406,7 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
372406
}
373407
additionalProperties := make(map[string]interface{})
374408
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
375-
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "logs_config", "metrics_config", "resources_config", "traces_config"})
409+
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "ccm_config", "logs_config", "metrics_config", "resources_config", "traces_config"})
376410
} else {
377411
return err
378412
}
@@ -387,6 +421,10 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err
387421
o.AwsPartition = all.AwsPartition
388422
}
389423
o.AwsRegions = all.AwsRegions
424+
if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil {
425+
hasInvalidField = true
426+
}
427+
o.CcmConfig = all.CcmConfig
390428
if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil {
391429
hasInvalidField = true
392430
}

0 commit comments

Comments
 (0)