diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 52c13bf6e58..380a344138b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1485,8 +1485,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' logs_config: $ref: '#/components/schemas/AWSLogsConfig' metrics_config: @@ -1552,8 +1550,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' created_at: description: Timestamp of when the account integration was created. format: date-time @@ -1627,8 +1623,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' logs_config: $ref: '#/components/schemas/AWSLogsConfig' metrics_config: @@ -1760,15 +1754,6 @@ components: required: - role_name type: object - AWSCCMConfig: - description: AWS Cloud Cost Management config. - properties: - data_export_configs: - description: List of data export configurations for Cost and Usage Reports. - items: - $ref: '#/components/schemas/DataExportConfig' - type: array - type: object AWSCredentials: description: The definition of `AWSCredentials` object. oneOf: @@ -16814,30 +16799,6 @@ components: example: canceled type: string type: object - DataExportConfig: - description: AWS Cost and Usage Report data export configuration. - properties: - bucket_name: - description: Name of the S3 bucket where the Cost and Usage Report is stored. - example: billing - type: string - bucket_region: - description: AWS region of the S3 bucket. - example: us-east-1 - type: string - report_name: - description: Name of the Cost and Usage Report. - example: cost-and-usage-report - type: string - report_prefix: - description: S3 prefix where the Cost and Usage Report is stored. - example: reports - type: string - report_type: - description: Type of the Cost and Usage Report. - example: CUR2.0 - type: string - type: object DataRelationshipsTeams: description: Associates teams with this schedule in a data structure. properties: diff --git a/api/datadogV2/model_aws_account_create_request_attributes.go b/api/datadogV2/model_aws_account_create_request_attributes.go index a0cf87b0537..1decb7a92df 100644 --- a/api/datadogV2/model_aws_account_create_request_attributes.go +++ b/api/datadogV2/model_aws_account_create_request_attributes.go @@ -24,8 +24,6 @@ type AWSAccountCreateRequestAttributes struct { AwsPartition AWSAccountPartition `json:"aws_partition"` // AWS Regions to collect data from. Defaults to `include_all`. AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - // AWS Cloud Cost Management config. - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` // AWS Logs Collection config. LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"` // AWS Metrics Collection config. @@ -195,34 +193,6 @@ func (o *AWSAccountCreateRequestAttributes) SetAwsRegions(v AWSRegions) { o.AwsRegions = &v } -// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise. -func (o *AWSAccountCreateRequestAttributes) GetCcmConfig() AWSCCMConfig { - if o == nil || o.CcmConfig == nil { - var ret AWSCCMConfig - return ret - } - return *o.CcmConfig -} - -// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AWSAccountCreateRequestAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) { - if o == nil || o.CcmConfig == nil { - return nil, false - } - return o.CcmConfig, true -} - -// HasCcmConfig returns a boolean if a field has been set. -func (o *AWSAccountCreateRequestAttributes) HasCcmConfig() bool { - return o != nil && o.CcmConfig != nil -} - -// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field. -func (o *AWSAccountCreateRequestAttributes) SetCcmConfig(v AWSCCMConfig) { - o.CcmConfig = &v -} - // GetLogsConfig returns the LogsConfig field value if set, zero value otherwise. func (o *AWSAccountCreateRequestAttributes) GetLogsConfig() AWSLogsConfig { if o == nil || o.LogsConfig == nil { @@ -350,9 +320,6 @@ func (o AWSAccountCreateRequestAttributes) MarshalJSON() ([]byte, error) { if o.AwsRegions != nil { toSerialize["aws_regions"] = o.AwsRegions } - if o.CcmConfig != nil { - toSerialize["ccm_config"] = o.CcmConfig - } if o.LogsConfig != nil { toSerialize["logs_config"] = o.LogsConfig } @@ -380,7 +347,6 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err AwsAccountId *string `json:"aws_account_id"` AwsPartition *AWSAccountPartition `json:"aws_partition"` AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"` MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"` ResourcesConfig *AWSResourcesConfig `json:"resources_config,omitempty"` @@ -400,7 +366,7 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - 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"}) + datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "logs_config", "metrics_config", "resources_config", "traces_config"}) } else { return err } @@ -415,10 +381,6 @@ func (o *AWSAccountCreateRequestAttributes) UnmarshalJSON(bytes []byte) (err err o.AwsPartition = *all.AwsPartition } o.AwsRegions = all.AwsRegions - if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.CcmConfig = all.CcmConfig if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true } diff --git a/api/datadogV2/model_aws_account_response_attributes.go b/api/datadogV2/model_aws_account_response_attributes.go index 7bd5813b48c..f6b0d0c9b67 100644 --- a/api/datadogV2/model_aws_account_response_attributes.go +++ b/api/datadogV2/model_aws_account_response_attributes.go @@ -25,8 +25,6 @@ type AWSAccountResponseAttributes struct { AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"` // AWS Regions to collect data from. Defaults to `include_all`. AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - // AWS Cloud Cost Management config. - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` // Timestamp of when the account integration was created. CreatedAt *time.Time `json:"created_at,omitempty"` // AWS Logs Collection config. @@ -208,34 +206,6 @@ func (o *AWSAccountResponseAttributes) SetAwsRegions(v AWSRegions) { o.AwsRegions = &v } -// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise. -func (o *AWSAccountResponseAttributes) GetCcmConfig() AWSCCMConfig { - if o == nil || o.CcmConfig == nil { - var ret AWSCCMConfig - return ret - } - return *o.CcmConfig -} - -// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AWSAccountResponseAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) { - if o == nil || o.CcmConfig == nil { - return nil, false - } - return o.CcmConfig, true -} - -// HasCcmConfig returns a boolean if a field has been set. -func (o *AWSAccountResponseAttributes) HasCcmConfig() bool { - return o != nil && o.CcmConfig != nil -} - -// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field. -func (o *AWSAccountResponseAttributes) SetCcmConfig(v AWSCCMConfig) { - o.CcmConfig = &v -} - // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *AWSAccountResponseAttributes) GetCreatedAt() time.Time { if o == nil || o.CreatedAt == nil { @@ -423,9 +393,6 @@ func (o AWSAccountResponseAttributes) MarshalJSON() ([]byte, error) { if o.AwsRegions != nil { toSerialize["aws_regions"] = o.AwsRegions } - if o.CcmConfig != nil { - toSerialize["ccm_config"] = o.CcmConfig - } if o.CreatedAt != nil { if o.CreatedAt.Nanosecond() == 0 { toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00") @@ -467,7 +434,6 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { AwsAccountId *string `json:"aws_account_id"` AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"` AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"` MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"` @@ -483,7 +449,7 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - 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"}) + 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"}) } else { return err } @@ -498,10 +464,6 @@ func (o *AWSAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) { o.AwsPartition = all.AwsPartition } o.AwsRegions = all.AwsRegions - if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.CcmConfig = all.CcmConfig o.CreatedAt = all.CreatedAt if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true diff --git a/api/datadogV2/model_aws_account_update_request_attributes.go b/api/datadogV2/model_aws_account_update_request_attributes.go index 6257e47c673..de1d861746c 100644 --- a/api/datadogV2/model_aws_account_update_request_attributes.go +++ b/api/datadogV2/model_aws_account_update_request_attributes.go @@ -24,8 +24,6 @@ type AWSAccountUpdateRequestAttributes struct { AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"` // AWS Regions to collect data from. Defaults to `include_all`. AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - // AWS Cloud Cost Management config. - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` // AWS Logs Collection config. LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"` // AWS Metrics Collection config. @@ -203,34 +201,6 @@ func (o *AWSAccountUpdateRequestAttributes) SetAwsRegions(v AWSRegions) { o.AwsRegions = &v } -// GetCcmConfig returns the CcmConfig field value if set, zero value otherwise. -func (o *AWSAccountUpdateRequestAttributes) GetCcmConfig() AWSCCMConfig { - if o == nil || o.CcmConfig == nil { - var ret AWSCCMConfig - return ret - } - return *o.CcmConfig -} - -// GetCcmConfigOk returns a tuple with the CcmConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AWSAccountUpdateRequestAttributes) GetCcmConfigOk() (*AWSCCMConfig, bool) { - if o == nil || o.CcmConfig == nil { - return nil, false - } - return o.CcmConfig, true -} - -// HasCcmConfig returns a boolean if a field has been set. -func (o *AWSAccountUpdateRequestAttributes) HasCcmConfig() bool { - return o != nil && o.CcmConfig != nil -} - -// SetCcmConfig gets a reference to the given AWSCCMConfig and assigns it to the CcmConfig field. -func (o *AWSAccountUpdateRequestAttributes) SetCcmConfig(v AWSCCMConfig) { - o.CcmConfig = &v -} - // GetLogsConfig returns the LogsConfig field value if set, zero value otherwise. func (o *AWSAccountUpdateRequestAttributes) GetLogsConfig() AWSLogsConfig { if o == nil || o.LogsConfig == nil { @@ -362,9 +332,6 @@ func (o AWSAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) { if o.AwsRegions != nil { toSerialize["aws_regions"] = o.AwsRegions } - if o.CcmConfig != nil { - toSerialize["ccm_config"] = o.CcmConfig - } if o.LogsConfig != nil { toSerialize["logs_config"] = o.LogsConfig } @@ -392,7 +359,6 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err AwsAccountId *string `json:"aws_account_id"` AwsPartition *AWSAccountPartition `json:"aws_partition,omitempty"` AwsRegions *AWSRegions `json:"aws_regions,omitempty"` - CcmConfig *AWSCCMConfig `json:"ccm_config,omitempty"` LogsConfig *AWSLogsConfig `json:"logs_config,omitempty"` MetricsConfig *AWSMetricsConfig `json:"metrics_config,omitempty"` ResourcesConfig *AWSResourcesConfig `json:"resources_config,omitempty"` @@ -406,7 +372,7 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - 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"}) + datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "auth_config", "aws_account_id", "aws_partition", "aws_regions", "logs_config", "metrics_config", "resources_config", "traces_config"}) } else { return err } @@ -421,10 +387,6 @@ func (o *AWSAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err err o.AwsPartition = all.AwsPartition } o.AwsRegions = all.AwsRegions - if all.CcmConfig != nil && all.CcmConfig.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.CcmConfig = all.CcmConfig if all.LogsConfig != nil && all.LogsConfig.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true } diff --git a/api/datadogV2/model_awsccm_config.go b/api/datadogV2/model_awsccm_config.go deleted file mode 100644 index 6e20ea8ea24..00000000000 --- a/api/datadogV2/model_awsccm_config.go +++ /dev/null @@ -1,102 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV2 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// AWSCCMConfig AWS Cloud Cost Management config. -type AWSCCMConfig struct { - // List of data export configurations for Cost and Usage Reports. - DataExportConfigs []DataExportConfig `json:"data_export_configs,omitempty"` - // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct - UnparsedObject map[string]interface{} `json:"-"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// NewAWSCCMConfig instantiates a new AWSCCMConfig object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewAWSCCMConfig() *AWSCCMConfig { - this := AWSCCMConfig{} - return &this -} - -// NewAWSCCMConfigWithDefaults instantiates a new AWSCCMConfig object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewAWSCCMConfigWithDefaults() *AWSCCMConfig { - this := AWSCCMConfig{} - return &this -} - -// GetDataExportConfigs returns the DataExportConfigs field value if set, zero value otherwise. -func (o *AWSCCMConfig) GetDataExportConfigs() []DataExportConfig { - if o == nil || o.DataExportConfigs == nil { - var ret []DataExportConfig - return ret - } - return o.DataExportConfigs -} - -// GetDataExportConfigsOk returns a tuple with the DataExportConfigs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AWSCCMConfig) GetDataExportConfigsOk() (*[]DataExportConfig, bool) { - if o == nil || o.DataExportConfigs == nil { - return nil, false - } - return &o.DataExportConfigs, true -} - -// HasDataExportConfigs returns a boolean if a field has been set. -func (o *AWSCCMConfig) HasDataExportConfigs() bool { - return o != nil && o.DataExportConfigs != nil -} - -// SetDataExportConfigs gets a reference to the given []DataExportConfig and assigns it to the DataExportConfigs field. -func (o *AWSCCMConfig) SetDataExportConfigs(v []DataExportConfig) { - o.DataExportConfigs = v -} - -// MarshalJSON serializes the struct using spec logic. -func (o AWSCCMConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.DataExportConfigs != nil { - toSerialize["data_export_configs"] = o.DataExportConfigs - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *AWSCCMConfig) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - DataExportConfigs []DataExportConfig `json:"data_export_configs,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"data_export_configs"}) - } else { - return err - } - o.DataExportConfigs = all.DataExportConfigs - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - return nil -} diff --git a/api/datadogV2/model_data_export_config.go b/api/datadogV2/model_data_export_config.go deleted file mode 100644 index 9b8ab838942..00000000000 --- a/api/datadogV2/model_data_export_config.go +++ /dev/null @@ -1,242 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV2 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// DataExportConfig AWS Cost and Usage Report data export configuration. -type DataExportConfig struct { - // Name of the S3 bucket where the Cost and Usage Report is stored. - BucketName *string `json:"bucket_name,omitempty"` - // AWS region of the S3 bucket. - BucketRegion *string `json:"bucket_region,omitempty"` - // Name of the Cost and Usage Report. - ReportName *string `json:"report_name,omitempty"` - // S3 prefix where the Cost and Usage Report is stored. - ReportPrefix *string `json:"report_prefix,omitempty"` - // Type of the Cost and Usage Report. - ReportType *string `json:"report_type,omitempty"` - // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct - UnparsedObject map[string]interface{} `json:"-"` - AdditionalProperties map[string]interface{} `json:"-"` -} - -// NewDataExportConfig instantiates a new DataExportConfig object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewDataExportConfig() *DataExportConfig { - this := DataExportConfig{} - return &this -} - -// NewDataExportConfigWithDefaults instantiates a new DataExportConfig object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewDataExportConfigWithDefaults() *DataExportConfig { - this := DataExportConfig{} - return &this -} - -// GetBucketName returns the BucketName field value if set, zero value otherwise. -func (o *DataExportConfig) GetBucketName() string { - if o == nil || o.BucketName == nil { - var ret string - return ret - } - return *o.BucketName -} - -// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataExportConfig) GetBucketNameOk() (*string, bool) { - if o == nil || o.BucketName == nil { - return nil, false - } - return o.BucketName, true -} - -// HasBucketName returns a boolean if a field has been set. -func (o *DataExportConfig) HasBucketName() bool { - return o != nil && o.BucketName != nil -} - -// SetBucketName gets a reference to the given string and assigns it to the BucketName field. -func (o *DataExportConfig) SetBucketName(v string) { - o.BucketName = &v -} - -// GetBucketRegion returns the BucketRegion field value if set, zero value otherwise. -func (o *DataExportConfig) GetBucketRegion() string { - if o == nil || o.BucketRegion == nil { - var ret string - return ret - } - return *o.BucketRegion -} - -// GetBucketRegionOk returns a tuple with the BucketRegion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataExportConfig) GetBucketRegionOk() (*string, bool) { - if o == nil || o.BucketRegion == nil { - return nil, false - } - return o.BucketRegion, true -} - -// HasBucketRegion returns a boolean if a field has been set. -func (o *DataExportConfig) HasBucketRegion() bool { - return o != nil && o.BucketRegion != nil -} - -// SetBucketRegion gets a reference to the given string and assigns it to the BucketRegion field. -func (o *DataExportConfig) SetBucketRegion(v string) { - o.BucketRegion = &v -} - -// GetReportName returns the ReportName field value if set, zero value otherwise. -func (o *DataExportConfig) GetReportName() string { - if o == nil || o.ReportName == nil { - var ret string - return ret - } - return *o.ReportName -} - -// GetReportNameOk returns a tuple with the ReportName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataExportConfig) GetReportNameOk() (*string, bool) { - if o == nil || o.ReportName == nil { - return nil, false - } - return o.ReportName, true -} - -// HasReportName returns a boolean if a field has been set. -func (o *DataExportConfig) HasReportName() bool { - return o != nil && o.ReportName != nil -} - -// SetReportName gets a reference to the given string and assigns it to the ReportName field. -func (o *DataExportConfig) SetReportName(v string) { - o.ReportName = &v -} - -// GetReportPrefix returns the ReportPrefix field value if set, zero value otherwise. -func (o *DataExportConfig) GetReportPrefix() string { - if o == nil || o.ReportPrefix == nil { - var ret string - return ret - } - return *o.ReportPrefix -} - -// GetReportPrefixOk returns a tuple with the ReportPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataExportConfig) GetReportPrefixOk() (*string, bool) { - if o == nil || o.ReportPrefix == nil { - return nil, false - } - return o.ReportPrefix, true -} - -// HasReportPrefix returns a boolean if a field has been set. -func (o *DataExportConfig) HasReportPrefix() bool { - return o != nil && o.ReportPrefix != nil -} - -// SetReportPrefix gets a reference to the given string and assigns it to the ReportPrefix field. -func (o *DataExportConfig) SetReportPrefix(v string) { - o.ReportPrefix = &v -} - -// GetReportType returns the ReportType field value if set, zero value otherwise. -func (o *DataExportConfig) GetReportType() string { - if o == nil || o.ReportType == nil { - var ret string - return ret - } - return *o.ReportType -} - -// GetReportTypeOk returns a tuple with the ReportType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataExportConfig) GetReportTypeOk() (*string, bool) { - if o == nil || o.ReportType == nil { - return nil, false - } - return o.ReportType, true -} - -// HasReportType returns a boolean if a field has been set. -func (o *DataExportConfig) HasReportType() bool { - return o != nil && o.ReportType != nil -} - -// SetReportType gets a reference to the given string and assigns it to the ReportType field. -func (o *DataExportConfig) SetReportType(v string) { - o.ReportType = &v -} - -// MarshalJSON serializes the struct using spec logic. -func (o DataExportConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.BucketName != nil { - toSerialize["bucket_name"] = o.BucketName - } - if o.BucketRegion != nil { - toSerialize["bucket_region"] = o.BucketRegion - } - if o.ReportName != nil { - toSerialize["report_name"] = o.ReportName - } - if o.ReportPrefix != nil { - toSerialize["report_prefix"] = o.ReportPrefix - } - if o.ReportType != nil { - toSerialize["report_type"] = o.ReportType - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *DataExportConfig) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - BucketName *string `json:"bucket_name,omitempty"` - BucketRegion *string `json:"bucket_region,omitempty"` - ReportName *string `json:"report_name,omitempty"` - ReportPrefix *string `json:"report_prefix,omitempty"` - ReportType *string `json:"report_type,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"bucket_name", "bucket_region", "report_name", "report_prefix", "report_type"}) - } else { - return err - } - o.BucketName = all.BucketName - o.BucketRegion = all.BucketRegion - o.ReportName = all.ReportName - o.ReportPrefix = all.ReportPrefix - o.ReportType = all.ReportType - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - return nil -} diff --git a/examples/v2/aws-integration/CreateAWSAccount.go b/examples/v2/aws-integration/CreateAWSAccount.go index 7dd920b6842..ce6b5710e32 100644 --- a/examples/v2/aws-integration/CreateAWSAccount.go +++ b/examples/v2/aws-integration/CreateAWSAccount.go @@ -26,17 +26,6 @@ func main() { }}, AwsAccountId: "123456789012", AwsPartition: datadogV2.AWSACCOUNTPARTITION_AWS, - CcmConfig: &datadogV2.AWSCCMConfig{ - DataExportConfigs: []datadogV2.DataExportConfig{ - { - BucketName: datadog.PtrString("my-bucket"), - BucketRegion: datadog.PtrString("us-east-1"), - ReportName: datadog.PtrString("my-report"), - ReportPrefix: datadog.PtrString("reports"), - ReportType: datadog.PtrString("CUR2.0"), - }, - }, - }, LogsConfig: &datadogV2.AWSLogsConfig{ LambdaForwarder: &datadogV2.AWSLambdaForwarderConfig{ Lambdas: []string{ diff --git a/examples/v2/aws-integration/CreateAWSAccount_1716720881.go b/examples/v2/aws-integration/CreateAWSAccount_1716720881.go index ce556276b7f..7a45ce37e45 100644 --- a/examples/v2/aws-integration/CreateAWSAccount_1716720881.go +++ b/examples/v2/aws-integration/CreateAWSAccount_1716720881.go @@ -25,17 +25,6 @@ func main() { }}, AwsAccountId: "123456789012", AwsPartition: datadogV2.AWSACCOUNTPARTITION_AWS, - CcmConfig: &datadogV2.AWSCCMConfig{ - DataExportConfigs: []datadogV2.DataExportConfig{ - { - BucketName: datadog.PtrString("my-bucket"), - BucketRegion: datadog.PtrString("us-east-1"), - ReportName: datadog.PtrString("my-report"), - ReportPrefix: datadog.PtrString("reports"), - ReportType: datadog.PtrString("CUR2.0"), - }, - }, - }, LogsConfig: &datadogV2.AWSLogsConfig{ LambdaForwarder: &datadogV2.AWSLambdaForwarderConfig{ Lambdas: []string{ diff --git a/examples/v2/aws-integration/UpdateAWSAccount.go b/examples/v2/aws-integration/UpdateAWSAccount.go index 361099ccd20..cad32ce159e 100644 --- a/examples/v2/aws-integration/UpdateAWSAccount.go +++ b/examples/v2/aws-integration/UpdateAWSAccount.go @@ -28,17 +28,6 @@ func main() { }}, AwsAccountId: "123456789012", AwsPartition: datadogV2.AWSACCOUNTPARTITION_AWS.Ptr(), - CcmConfig: &datadogV2.AWSCCMConfig{ - DataExportConfigs: []datadogV2.DataExportConfig{ - { - BucketName: datadog.PtrString("updated-bucket"), - BucketRegion: datadog.PtrString("us-west-2"), - ReportName: datadog.PtrString("updated-report"), - ReportPrefix: datadog.PtrString("cost-reports"), - ReportType: datadog.PtrString("CUR2.0"), - }, - }, - }, LogsConfig: &datadogV2.AWSLogsConfig{ LambdaForwarder: &datadogV2.AWSLambdaForwarderConfig{ Lambdas: []string{ diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.freeze index 403f0e6375d..b63a9ddbfcf 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.freeze @@ -1 +1 @@ -2025-12-10T17:32:09.613Z \ No newline at end of file +2025-08-06T17:41:40.185Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.yaml index 8a4c4891893..ec36990e4c0 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_account_returns_AWS_Account_object_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/integration/aws/accounts response: - body: '{"data":{"id":"de1a3b78-ed2e-4f50-9191-1879129d09ff","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"55d4a43935224fe09c096f96392f1ca1"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"ccm_config":{"data_export_configs":[{"report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0","bucket_name":"my-bucket","bucket_region":"us-east-1"}]},"created_at":"2025-12-10T17:32:11.003276673Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce","AWS/Usage"]}},"modified_at":"2025-12-10T17:32:11.003276673Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' + body: '{"data":{"id":"4ee52a3f-d0e9-487b-bde9-cd1cbc0e4cb0","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a4e4a6b4c2cf4638a58b1febc6b856e9"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"created_at":"2025-08-06T17:41:41.111886478Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce"]}},"modified_at":"2025-08-06T17:41:41.111886478Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' code: 200 duration: 0ms headers: @@ -27,7 +27,7 @@ interactions: - '*/*' id: 1 method: DELETE - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/de1a3b78-ed2e-4f50-9191-1879129d09ff + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/4ee52a3f-d0e9-487b-bde9-cd1cbc0e4cb0 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.freeze index dfc78df9ae0..d0e249e860e 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.freeze @@ -1 +1 @@ -2025-12-10T17:32:36.829Z \ No newline at end of file +2025-08-06T17:41:41.364Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.yaml index 4f53be9eb5f..58194c95cf4 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_AWS_Account_object_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE","secret_access_key":"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE","secret_access_key":"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},"aws_account_id":"123456789012","aws_partition":"aws","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/integration/aws/accounts response: - body: '{"data":{"id":"a7d72fb6-ec59-4eca-a905-805dd599d061","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"ccm_config":{"data_export_configs":[{"report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0","bucket_name":"my-bucket","bucket_region":"us-east-1"}]},"created_at":"2025-12-10T17:32:37.014514664Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce","AWS/Usage"]}},"modified_at":"2025-12-10T17:32:37.014514664Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' + body: '{"data":{"id":"c80e30d5-b3f9-45b1-85fc-bad652af206b","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"created_at":"2025-08-06T17:41:41.445076718Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce"]}},"modified_at":"2025-08-06T17:41:41.445076718Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' code: 200 duration: 0ms headers: @@ -27,7 +27,7 @@ interactions: - '*/*' id: 1 method: DELETE - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/a7d72fb6-ec59-4eca-a905-805dd599d061 + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/c80e30d5-b3f9-45b1-85fc-bad652af206b response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.freeze index 2800bbe0aa2..abfd935a03f 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-10T17:34:11.261Z \ No newline at end of file +2025-08-06T17:41:41.716Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.yaml index 91794f00b5a..352c28ee3e8 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Create_an_AWS_integration_returns_Bad_Request_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws-invalid","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws-invalid","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.freeze index 0acb432176a..770d0364bdc 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.freeze @@ -1 +1 @@ -2025-12-10T17:40:36.176Z \ No newline at end of file +2025-08-06T17:41:51.622Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.yaml index b25f3189ac0..8a4586d65ae 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_AWS_Account_object_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/integration/aws/accounts response: - body: '{"data":{"id":"0c2238ef-3b8e-4d25-85df-b18f96ac7031","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a297178885da4934acf9eca79f3e7892"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-12-10T17:40:37.609564422Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:40:37.609564422Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + body: '{"data":{"id":"ab6528e3-5dab-4375-ae47-4ce93d1216e2","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"36416390710445e7be511e1622ee4149"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:52.510132689Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:52.510132689Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' code: 200 duration: 0ms headers: @@ -21,7 +21,7 @@ interactions: status: 200 OK - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"updated-bucket","bucket_region":"us-west-2","report_name":"updated-report","report_prefix":"cost-reports","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: @@ -30,9 +30,9 @@ interactions: - application/json id: 1 method: PATCH - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c2238ef-3b8e-4d25-85df-b18f96ac7031 + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/ab6528e3-5dab-4375-ae47-4ce93d1216e2 response: - body: '{"data":{"id":"0c2238ef-3b8e-4d25-85df-b18f96ac7031","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a297178885da4934acf9eca79f3e7892"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"ccm_config":{"data_export_configs":[{"report_name":"updated-report","report_prefix":"cost-reports","report_type":"CUR2.0","bucket_name":"updated-bucket","bucket_region":"us-west-2"}]},"created_at":"2025-12-10T17:40:37.609564Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:40:37.867410688Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + body: '{"data":{"id":"ab6528e3-5dab-4375-ae47-4ce93d1216e2","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"36416390710445e7be511e1622ee4149"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:52.510132Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:52.717094345Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' code: 200 duration: 0ms headers: @@ -47,7 +47,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c2238ef-3b8e-4d25-85df-b18f96ac7031 + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/ab6528e3-5dab-4375-ae47-4ce93d1216e2 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.freeze index e550a602216..2ad05fcd48b 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-10T17:42:50.556Z \ No newline at end of file +2025-08-06T17:41:53.059Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.yaml index 3655a6a222c..0118ce61e38 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Bad_Request_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/integration/aws/accounts response: - body: '{"data":{"id":"0c358c9f-84fd-4fe5-b0e9-722d787de213","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"84a9c55851ce4a01869c503e990d325b"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-12-10T17:42:52.162655791Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:42:52.162655791Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + body: '{"data":{"id":"dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"f3f5392d608c448ca4910d7adcefa849"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:54.148895503Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:54.148895503Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' code: 200 duration: 0ms headers: @@ -21,7 +21,7 @@ interactions: status: 200 OK - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE","secret_access_key":"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"invalid-bucket","bucket_region":"invalid-region","report_name":"invalid-report","report_prefix":"invalid","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE","secret_access_key":"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},"aws_account_id":"123456789012","aws_partition":"aws","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: @@ -30,10 +30,10 @@ interactions: - application/json id: 1 method: PATCH - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c358c9f-84fd-4fe5-b0e9-722d787de213 + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc response: - body: '{"errors":[{"status":"400","title":"Bad Request","detail":"invalid value","meta":{"ccm_config.data_export_configs[CUR2.0].bucket_region":"invalid - bucket region: invalid-region"}}]}' + body: '{"errors":[{"title":"Generic Error","detail":"cannot switch between role + and key based auth"}]}' code: 400 duration: 0ms headers: @@ -48,7 +48,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c358c9f-84fd-4fe5-b0e9-722d787de213 + url: https://api.datadoghq.com/api/v2/integration/aws/accounts/dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.freeze index 07ac47cd4ec..8c2f55ecb19 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-12-10T17:43:13.852Z \ No newline at end of file +2025-08-06T17:41:54.735Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.yaml index 0b1795e147c..ec489b0b818 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_AWS_Integration/Scenario_Update_an_AWS_integration_returns_Not_Found_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"notfound-bucket","bucket_region":"eu-west-1","report_name":"notfound-report","report_prefix":"notfound","report_type":"CUR2.0"}]},"logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} + {"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]},"sources":["s3"]}},"metrics_config":{"automute_enabled":true,"collect_cloudwatch_alarms":true,"collect_custom_metrics":true,"enabled":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}]},"resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{}},"type":"account"}} form: {} headers: Accept: diff --git a/tests/scenarios/features/v2/aws_integration.feature b/tests/scenarios/features/v2/aws_integration.feature index 9e14d0824b3..30ded64d73f 100644 --- a/tests/scenarios/features/v2/aws_integration.feature +++ b/tests/scenarios/features/v2/aws_integration.feature @@ -12,21 +12,21 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Create an AWS account returns "AWS Account object" response Given new "CreateAWSAccount" request - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "AWS Account object" response Given new "CreateAWSAccount" request - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Bad Request" response Given new "CreateAWSAccount" request - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws-invalid", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws-invalid", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 400 Bad Request @@ -195,7 +195,7 @@ Feature: AWS Integration Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "updated-bucket", "bucket_region": "us-west-2", "report_name": "updated-report", "report_prefix": "cost-reports", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 200 AWS Account object @@ -204,7 +204,7 @@ Feature: AWS Integration Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "invalid-bucket", "bucket_region": "invalid-region", "report_name": "invalid-report", "report_prefix": "invalid", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 400 Bad Request @@ -212,6 +212,6 @@ Feature: AWS Integration Scenario: Update an AWS integration returns "Not Found" response Given new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a" - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "notfound-bucket", "bucket_region": "eu-west-1", "report_name": "notfound-report", "report_prefix": "notfound", "report_type": "CUR2.0"}]}, "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} + And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 404 Not Found